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:   Fri, 13 Nov 2020 10:21:28 +0100
From:   Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com, linux-pwm@...r.kernel.org,
        arm-soc <linux-arm-kernel@...ts.infradead.org>,
        linux-devicetree <devicetree@...r.kernel.org>, wahrenst@....net,
        Linux Input <linux-input@...r.kernel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, Philipp Zabel <p.zabel@...gutronix.de>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        Stephen Boyd <sboyd@...nel.org>,
        linux-rpi-kernel@...ts.infradead.org,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v4 02/11] firmware: raspberrypi: Introduce
 devm_rpi_firmware_get()

On Thu, 2020-11-12 at 18:25 +0100, Bartosz Golaszewski wrote:
> On Thu, Nov 12, 2020 at 5:44 PM Nicolas Saenz Julienne
> <nsaenzjulienne@...e.de> wrote:
> > Itroduce devm_rpi_firmware_get(), it'll simplify the firmware handling
> > for most consumers.
> > 
> > Suggested-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> > ---
> > 
> > Changes since v2:
> > - Introduce devm_rpi_firmware_get()
> > 
> >  drivers/firmware/raspberrypi.c             | 31 +++++++++++++++++++++-
> >  include/soc/bcm2835/raspberrypi-firmware.h |  8 ++++++
> >  2 files changed, 38 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
> > index 438e17074a97..4ab2dfdc82ad 100644
> > --- a/drivers/firmware/raspberrypi.c
> > +++ b/drivers/firmware/raspberrypi.c
> > @@ -237,10 +237,17 @@ static void rpi_firmware_delete(struct kref *kref)
> >         kfree(fw);
> >  }
> > 
> > -void rpi_firmware_put(struct rpi_firmware *fw)
> > +static void __rpi_firmware_put(void *data)
> >  {
> 
> The '__' prefix is very vague and usually used for unlocked variants
> of functions. The casting to void * in rpi_firmware_put() is also
> unneeded. I would much prefer that the devres release callback be
> called devm_rpi_firmware_put() and that it call rpi_firmware_put()
> which would then call kref_put().

Yes, that's better. I'll change it.

Regards,
Nicolas


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ