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: <20201124121943.72etfmpubis6jw3l@pengutronix.de>
Date:   Tue, 24 Nov 2020 13:19:43 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Rob Herring <robh@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Russell King <linux@...linux.org.uk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sascha Hauer <kernel@...gutronix.de>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 3/4] amba: Make the remove callback return void

On Tue, Nov 24, 2020 at 12:48:05PM +0100, Arnd Bergmann wrote:
> On Tue, Nov 24, 2020 at 11:32 AM Uwe Kleine-König
> <u.kleine-koenig@...gutronix.de> wrote:
> >
> > Most amba drivers return 0 in their remove callback. Together with the
> > driver core ignoring the return value anyhow, it doesn't make sense to
> > return a value here.
> >
> > So add a warning to the only driver that could return an error code and
> > change the remove prototype to return void, which makes it explicit that
> > returning an error value doesn't work as expected. This simplifies changing
> > the core remove callback to return void, too.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> 
> Makes sense, I checked that the vfio driver cannot actually return an error
> either, the 'if (vdev)' check seems to be done out of unnecessary caution,
> as the probe would never have succeeded if that was NULL.

Yes I thought this possible, but didn't tried to wrap my head around the
logic there. IMHO this warrants a cleanup, will address this in v2.

Thanks for your feedback,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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