[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeGpj28G60L86d4FDOL1YMAoM5kcdvSC5O6iH4Xi8zfHg@mail.gmail.com>
Date: Wed, 24 Jan 2018 18:21:38 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Ladislav Michl <ladis@...ux-mips.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:MEMORY TECHNOLOGY..." <linux-mtd@...ts.infradead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tom Lendacky <thomas.lendacky@....com>,
Borislav Petkov <bp@...e.de>, Ingo Molnar <mingo@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Philippe Ombredanne <pombredanne@...b.com>,
Kate Stewart <kstewart@...uxfoundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Wei Yongjun <weiyongjun1@...wei.com>
Subject: Re: [PATCH v2 2/3] devres: Add devm_ioremap_shared_resource()
On Wed, Jan 24, 2018 at 12:07 PM, Ladislav Michl <ladis@...ux-mips.org> wrote:
> Implement managed ioremap function for shared resources.
> +#define devm_ioremap_resource(dev, res) \
> + __devm_ioremap_resource(dev, res, false)
> +#define devm_ioremap_shared_resource(dev, res) \
> + __devm_ioremap_resource(dev, res, true)
> +void __iomem *__devm_ioremap_resource(struct device *dev, struct resource *res,
> + bool shared);
I would rather do the following:
_resource() -> _resource_exclusive()
#define _resource() _resource_exclusive()
Add _resource_shared()
And use long names below in this file whenever refer to exclusive or
shared variant.
> void devm_iounmap(struct device *dev, void __iomem *addr);
> int check_signature(const volatile void __iomem *io_addr,
> const unsigned char *signature, int length);
> +
> void devm_ioremap_release(struct device *dev, void *res);
This part doesn't belong to the change.
> + * When possible, use devm_ioremap_resource() or
> + * devm_ioremap_shared_resource() instead.
> - * Checks that a resource is a valid memory region, requests the memory
> - * region and ioremaps it. All operations are managed and will be undone
> - * on driver detach.
> + * Checks that a resource is a valid memory region, eventually requests the
> + * memory region and ioremaps it. All operations are managed and will be
> + * undone on driver detach.
Wording is changed and no clue in commit message why.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists