Re: [PATCH v12 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

From: Andy Shevchenko
Date: Tue Feb 06 2018 - 14:44:45 EST


On Mon, Feb 5, 2018 at 4:25 PM, John Garry <john.garry@xxxxxxxxxx> wrote:
> On 05/02/2018 13:16, Andy Shevchenko wrote:
>> On Thu, Feb 1, 2018 at 1:32 PM, John Garry <john.garry@xxxxxxxxxx> wrote:

>> resource_size_t is dynamic width type, you will see a compiler
>> warning. For this we have
>> %pap specifier.
>>
>> Moreover, in some cases it's useful to print struct resource via %pR or
>> %pr.

> I have already fixed this up in my rework.

Good!

>>>> +/* All the host devices which apply indirect-IO can be listed here. */
>>>> +static const struct acpi_device_id acpi_indirect_host_id[] = {
>>>> + {""},
>>>> +};
>>
>>
>> The idea of terminator is to be such (remove comma there). And it's
>> basically redundant to have an empty string there. Moreover, it's a
>> waste of resources in ro section.
>
>
> OK, the comma should be removed. So what is the preferred acpi device id
> array sentinel? I see {}, {"", 0}, and {""} used.

The rule of thumb --- whatever has more entries in the kernel.
In case of similarity I would prefer simple {} because it suits for
termination slightly better (for my opinion, some cases might
potentially have {"", non_null_vakue}).

--
With Best Regards,
Andy Shevchenko