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: <20200727215010.qzhvavmskfoaapi5@mobilestation>
Date:   Tue, 28 Jul 2020 00:50:10 +0300
From:   Serge Semin <Sergey.Semin@...kalelectronics.ru>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Serge Semin <fancer.lancer@...il.com>,
        Hoan Tran <hoan@...amperecomputing.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
        Rob Herring <robh+dt@...nel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/7] gpio: dwapb: Convert driver to using the
 GPIO-lib-based IRQ-chip

On Sat, Jul 25, 2020 at 03:12:49PM +0300, Andy Shevchenko wrote:
> On Sat, Jul 25, 2020 at 2:03 AM Serge Semin
> <Sergey.Semin@...kalelectronics.ru> wrote:
> > On Thu, Jul 23, 2020 at 01:03:17PM +0300, Andy Shevchenko wrote:
> > > On Thu, Jul 23, 2020 at 04:38:55AM +0300, Serge Semin wrote:

...
 
> > > > +           /* This will let us handle the parent IRQ in the driver */
> > > > +           girq->parents = NULL;
> > > > +           girq->num_parents = 0;
> > > > +           girq->parent_handler = NULL;
> 
> > > Shan't we do this before request_irq() call (at least for consistency with the
> > > rest of the drivers)?
> >
> > Technically we shan't. Please elaborate which drivers you are referring to?
> 
> All of them? Recent patches for IRQ chip template do something like
> 
> girq = &...;
> girq->foo = bar;
> ...
> ret = request_irq(...);
> 
> ...and here no more girq->baz = gaz; lines.
> 
> > Even the recent Linus' series "Use irqchip template" mostly does it in the
> > same order.
> 
> Funny, that's what I;m referring to.

It turns out my "mostly" was wrong in this matter. It's 4 out of 17 patches,
which make the initialization in the same order as mine:
drivers/gpio/gpio-max732x.c
drivers/gpio/gpio-pca953x.c
drivers/gpio/gpio-pcf857x.c
drivers/gpio/gpio-adp5588.c

while the rest of them does it in the order suggested by you:
drivers/gpio/gpio-pci-idio-16.c
drivers/gpio/gpio-pcie-idio-24.c
drivers/gpio/gpio-104-idio-16.c
drivers/gpio/gpio-104-dio-48e.c
drivers/gpio/gpio-ws16c48.c
drivers/gpio/gpio-rcar.c
drivers/gpio/gpio-wcove.c
drivers/pinctrl/pinctrl-amd.c
drivers/gpio/gpio-crystalcove.c
drivers/pinctrl/pinctrl-mcp23s08.c
drivers/pinctrl/pinctrl-sx150x.c
drivers/pinctrl/pinctrl-stmfx.c
drivers/gpio/gpio-tc3589x.c

Then, let's use the same order here as the most of the drivers do just for
consistency.

-Sergey 

> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ