[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeJHjYUNz-O83qm1m8JZtW5t9JJDKxKRpbLtPYXr2VbnQ@mail.gmail.com>
Date: Mon, 5 Nov 2018 14:55:03 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: peng.hao2@....com.cn
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy@...radead.org>,
Darren Hart <dvhart@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
hutao@...fujitsu.com,
Linux Documentation List <linux-doc@...r.kernel.org>
Subject: Re: [PATCH V7 3/9] misc/pvpanic: add MMIO support
On Mon, Nov 5, 2018 at 4:31 AM Peng Hao <peng.hao2@....com.cn> wrote:
>
> On some architectures (e.g. arm64), it's preferable to use MMIO, since
> this can be used standalone. Add MMIO support to the pvpanic driver.
Thanks for an update, looks quite good, though couple of comments below.
> if (acpi_dev_resource_io(res, &r)) {
> - port = r.start;
> + base = (void __iomem *) ioport_map(r.start,
> + r.end - r.start + 1);
I'm so sorry I didn't notice this stuff.
1. ioport_map() already returns void __iomem *. No need to cast.
2. To calculate resource size we have a helper macro resource_size().
> + return AE_OK;
> + } else if (acpi_dev_resource_memory(res, &r)) {
> + base = ioremap(r.start, r.end - r.start + 1);
Ditto for the size calculation.
> return AE_OK;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists