lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vdi=EJoBPe8sS8U3h+QaKR2tqyv2KaF=ixsPoE1qpXOHQ@mail.gmail.com>
Date:   Fri, 26 Jan 2018 20:52:18 +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 7:15 PM, Ladislav Michl <ladis@...ux-mips.org> wrote:
> On Wed, Jan 24, 2018 at 06:21:38PM +0200, Andy Shevchenko wrote:

>> > +#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.
>
> Two separate functions were also considered, but I was unable to find small
> common implementation.

Common part is still like you have done.

I'm talking about _naming_ scheme here.

> If code size does not matter or you can provide a hint
> to make this solution small and nice, I'll go for it.

It would be the same as in your initial proposal, since I'm not
talking about duplicating anything.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ