From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="S5R5fTR8" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085E79A for ; Mon, 4 Dec 2023 14:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FSF3wAnCN5s1es4f03Qs0QtNoyq0HjREj/OCLktKFKc=; b=S5R5fTR8eepxWVP/jqGw2ktC4i RjtHH6evbesOonEN/WAcUBl6htFZnQ9z3TLph2uDSaRggIiulcqbcV4utJsbd4OxA9nJ4A5I14oMg fQeHRtoo2+vSz5CJxwGriwNC3jR8FaXxM+0MV+jUoxtj0oyB+7WQDBewu5NuzzEBNy4kHRLxqgrR0 wRJUXoCklx+fESuTWOYnioGiOkreb7zCBdPV9InQSplbBJPUixRQRuOeR1yRTLxCWWGm2N+CiAxyT ehan98prwDPUV4t37x9v47N+VoEh65xhyutBdOVbdtIS8Db5nGzw8SpDwcu3bMBsvYKgwiUIhgtXF 5k6sayTg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44324) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rAHlF-000660-2Z; Mon, 04 Dec 2023 22:49:57 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rAHlG-00014p-Ji; Mon, 04 Dec 2023 22:49:58 +0000 Date: Mon, 4 Dec 2023 22:49:58 +0000 From: "Russell King (Oracle)" To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , netdev@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH net-next v2 4/9] net: sfp: Convert to platform remove callback returning void Message-ID: References: <7c1d50d559c0e0e36a20eb3e410f6e9d3f884b6f.1701713943.git.u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7c1d50d559c0e0e36a20eb3e410f6e9d3f884b6f.1701713943.git.u.kleine-koenig@pengutronix.de> Sender: Russell King (Oracle) On Mon, Dec 04, 2023 at 07:30:44PM +0100, Uwe Kleine-König 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 ignored (apart > from emitting a warning) and this typically results in resource leaks. > > To improve here there is a quest to make the remove callback return > void. In the first step of this quest all drivers are converted to > .remove_new(), which already returns void. Eventually after all drivers > are converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Reviewed-by: Russell King (Oracle) > Link: https://lore.kernel.org/r/20231117095922.876489-6-u.kleine-koenig@pengutronix.de > Signed-off-by: Uwe Kleine-König Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!