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]
Date:   Sat, 24 Sep 2022 13:42:37 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: Re: [PATCH] pcmcia: at91_cf: switch to using gpiod API

On 24/09/2022 10:33:29+0200, Arnd Bergmann wrote:
> On Sat, Sep 24, 2022, at 8:04 AM, Dmitry Torokhov wrote:
> > This patch switches the driver to use newer gpiod API instead of legacy
> > gpio API. This moves us closer to the goal of stopping exporting
> > OF-specific APIs of gpiolib.
> >
> > While at it, stop using module-global for regmap.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> 
> This looks good to me overall. Three comments:
> 
> > @@ -63,7 +62,7 @@ struct at91_cf_socket {
> > 
> >  static inline int at91_cf_present(struct at91_cf_socket *cf)
> >  {
> > -	return !gpio_get_value(cf->board->det_pin);
> > +	return gpiod_get_value(cf->board->det_pin);
> >  }
> 
> a) The change in polarity looks wrong here, I can't really tell
> from the patch. If this is intentional, maybe explain it in
> the changelog. With that addressed (either way)
> 
> Reviewed-by: Arnd Bergmann <arnd@...db.de>
> 
> 
> b) In case you are doing more patches like this one at the moment,
> note that I'm in the process of removing all unused board files
> for arch/arm/, which will in turn make a lot of drivers unused.
> I should be able to provide a branch soon, which can be used to
> identify drivers that don't have DT support any more and don't
> have any board files. Rather than converting them to gpio
> descriptors, we can probably just remove those drivers.
> 
> c) I'm not sure about the state of the at91_cf driver. Apparently
> we used to have three drivers for the same hardware (pcmcia,
> pata and ide), and only the pcmcia driver remained in the tree
> after drivers/ide/ was removed and pata_at91 did not get converted
> to DT. I think in the long run we will remove the pcmcia layer,
> so if you are actually trying to use this hardware, we may want to
> revive the pata variant and drop this one instead.
> There is no dts file in tree that actually declares either of them,
> so chances are that nobody is actually using the CF slot on at91
> any more.
> 

I'm pretty sure it is broken since eaa9a21dd14b ("pcmcia: at91_cf: Use
syscon to configure the MC/smc") as this change has never been tested.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ