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] [thread-next>] [day] [month] [year] [list]
Message-ID: <01b1781e9ec9c474227ad914fea49db8a3a3712d.camel@fi.rohmeurope.com>
Date:   Fri, 21 May 2021 10:20:38 +0000
From:   "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To:     "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>
CC:     linux-power <linux-power@...rohmeurope.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "bgolaszewski@...libre.com" <bgolaszewski@...libre.com>,
        "michael@...le.cc" <michael@...le.cc>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>
Subject: Re: [PATCH v2 1/3] gpio: regmap: Support few IC specific operations


On Fri, 2021-05-21 at 13:09 +0300, Andy Shevchenko wrote:
> On Fri, May 21, 2021 at 12:53 PM Matti Vaittinen
> <matti.vaittinen@...rohmeurope.com> wrote:
> > The set_config and init_valid_mask GPIO operations are usually very
> > IC
> > specific. Allow IC drivers to provide these custom operations at
> > gpio-regmap registration.
> 
> Thanks for this. In general (from design p.o.v.) looks good to me,
> one
> question below, though.
> 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> > 
> > ---
> > Changelog v2: (based on suggestions by Michael Walle)
> >   - drop gpio_regmap_set_drvdata()
> 
> But why do we have gpio_regmap_get_drvdata()

I was thinking the drivers might still need to get the drvdata. But now
I don't see how they could easily get it via this API. Yes, the
regmap_gpio struct (which is used to obtain the data via this API) is
returned by the registration - but the only place where IC driver could
store this is in the drvdata :) So yes, this is next to useless now.

Sure this API could be used in probe, after the registration - but
there the driver should have access to drvdata and config anyways.

I'll drop also the gpio_regmap_get_drvdata() in next version. Thanks
for pointing this out.

>  and why is it different
> now to the new member handling?

Hmm. I am unsure what you mean by this?

> 
> >   - drop checks and WARN() for pretty much impossible cases

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ