Yeah, looking at the code, it looks too busy with ACPI_NUM_OSI_STRINGS and the additional level of indirection. My only suggestion would be that ARRAY_SIZE should really be ARRAY_LENGTH to differentiate it better from the behavior of the sizeof() operator. Bob > -----Original Message----- > From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi- > owner@xxxxxxxxxxxxxxx] On Behalf Of Bjorn Helgaas > Sent: Thursday, April 20, 2006 7:48 AM > To: Moore, Robert > Cc: Brown, Len; linux-acpi@xxxxxxxxxxxxxxx; Andrew Morton > Subject: Re: [1/2] ACPI: make _OSI strings static > > On Tuesday 18 April 2006 16:29, Moore, Robert wrote: > > Actually, I find this even more readable: > > #define ACPI_NUM_OSI_STRINGS ACPI_ARRAY_SIZE (acpi_valid_osi_strings) > > > > and leave the existing code as: > > for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { > > The typical Linux style is to use > > for (i = 0; i < ARRAY_SIZE(acpi_valid_osi_strings); i++) { > > rather than > > for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { > > because you can easily verify the loop bounds without having > to look up ACPI_NUM_OSI_STRINGS, which is defined elsewhere. > But you have to use your own judgment. > - > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html