[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 0/2] code style exercise: Drivers folder samples
On Mon, 17 Feb 2025, Jan Beulich wrote: > On 16.02.2025 11:21, Oleksandr Andrushchenko wrote: > > 1. Const string arrays reformatting > > In case the length of items change we might need to introduce a bigger > > change wrt new formatting of unaffected lines > > ============================================================================== > > > > --- a/xen/drivers/acpi/tables.c > > +++ b/xen/drivers/acpi/tables.c > > @@ -38,10 +38,10 @@ > > -static const char *__initdata > > -mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" }; > > -static const char *__initdata > > -mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" }; > > +static const char *__initdata mps_inti_flags_polarity[] = { "dfl", "high", > > + "res", "low" }; > > +static const char *__initdata mps_inti_flags_trigger[] = { "dfl", "edge", > > "res", > > > > --- a/xen/drivers/acpi/utilities/utglobal.c > > +++ b/xen/drivers/acpi/utilities/utglobal.c > > static const char *const > > acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { > > - "SystemMemory", > > - "SystemIO", > > - "PCI_Config", > > - "EmbeddedControl", > > - "SMBus", > > - "CMOS", > > - "PCIBARTarget", > > - "DataTable" > > + "SystemMemory", "SystemIO", "PCI_Config", "EmbeddedControl", > > + "SMBus", "CMOS", "PCIBARTarget", "DataTable" > > }; > > Why in the world would a tool need to touch anything like the two examples > above? My take is that the code is worse readability-wise afterwards. I think the output is acceptable: not necessarily better than before, but also not significantly worse. To me, the main takeaway is that there are many unavoidable but unnecessary changes.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |