[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfXoAHNH2BnfNLbFfdCqUk3rxU_QWfxTx7ZyLgV0qxotQ@mail.gmail.com>
Date: Mon, 5 Feb 2018 15:16:03 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: John Garry <john.garry@...wei.com>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Rob Herring <robh+dt@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Mark Rutland <mark.rutland@....com>,
Olof Johansson <olof@...om.net>,
Hanjun Guo <hanjun.guo@...aro.org>, dann.frazier@...onical.com,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linuxarm <linuxarm@...wei.com>, linux-pci@...r.kernel.org,
Corey Minyard <minyard@....org>,
devicetree <devicetree@...r.kernel.org>,
Linux-Arch <linux-arch@...r.kernel.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v12 7/9] ACPI: Translate the I/O range of non-MMIO devices
before scanning
On Thu, Feb 1, 2018 at 1:32 PM, John Garry <john.garry@...wei.com> wrote:
I'm not going through all patch, by one thing I would like you to pay
attention on, i.e.
printing resource_size_t and struct resource
>> + dev_err(dev, "translate bus-addr(0x%llx) fail!\n",
>> + resource->start);
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.
Consider reading kernel documentation about these (printk-formats.rst).
>> +struct acpi_indirectio_host_data {
>> + resource_size_t io_size;
>> + resource_size_t io_start;
>> +};
Why not utilize struct resource?
If it's coming from platform / firmware it should *never* have types
like size_t, unsigned long, resource_size_t, etc.
>> +/* 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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists