[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABGGiswPUe2PEmi_7a7SsB6vK7WVHysOoNkueoG+3h4RdfmB8Q@mail.gmail.com>
Date: Fri, 22 Feb 2019 08:22:33 -0600
From: Rob Herring <rob.herring@...aro.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Keerthy <j-keerthy@...com>,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH] drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
On Thu, Feb 21, 2019 at 1:56 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Thu, Feb 21, 2019 at 6:27 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> >
> > We only build devm_ioremap_resource() if HAS_IOMEM is selected, so this
> > dependency must cascade down to devm_platform_ioremap_resource().
>
> > +#ifdef CONFIG_HAS_IOMEM
> > void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
> > unsigned int index)
> > {
> > @@ -96,6 +97,7 @@ void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
> > return devm_ioremap_resource(&pdev->dev, res);
> > }
> > EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource);
> > +#endif /* CONFIG_HAS_IOMEM */
>
> What about declaration in *.h?
>
> Perhaps you may just do this inside the function?
Just a drive by comment, but IMO we should just get rid of HAS_IOMEM
altogether. It is really just a !UML option as I think every other
arch enables it. If folks really want to disable drivers on UML, just
disable the subsystems.
Though now with kunit mocking, there's a desire to enable HAS_IOMEM on UML, too.
Rob
Powered by blists - more mailing lists