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: <20230510062959.ll5cr5s3uhjrdufj@pengutronix.de>
Date: Wed, 10 May 2023 08:29:59 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Bhupesh Sharma <bhupesh.sharma@...aro.org>
Cc: kernel@...gutronix.de, Eric Dumazet <edumazet@...gle.com>,
	netdev@...r.kernel.org,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	linux-stm32@...md-mailman.stormreply.com,
	Vinod Koul <vkoul@...nel.org>, Jose Abreu <joabreu@...opsys.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Simon Horman <simon.horman@...igine.com>,
	Giuseppe Cavallaro <peppe.cavallaro@...com>,
	Paolo Abeni <pabeni@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos:
 Convert to platform remove callback returning void

Hello Bhupesh,

On Tue, May 09, 2023 at 01:21:56PM +0530, Bhupesh Sharma wrote:
> On Mon, 8 May 2023 at 19:56, Uwe Kleine-König
> <u.kleine-koenig@...gutronix.de> wrote:
> >
> > The .remove() callback for a platform driver returns an int which makes
> > many driver authors wrongly assume it's possible to do error handling by
> > returning an error code. However the value returned is (mostly) ignored
> 
> ^^^ mostly, here seems confusing. Only if the return value is ignored
> marking the function
> as 'void' makes sense IMO.

FTR: It's only mostly ignored because a message is emitted:

	dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");

(see platform_remove() in drivers/base/platform.c).

> Also a small note (maybe a TBD) indicating that 'remove_new' will be
> eventually replaced with 'remove' would make reading this easier.

I adapted the commit message for future similar submissions. Thanks for
the feedback.

Best regards
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