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="hsz3y+hw" 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 557DBD8 for ; Fri, 17 Nov 2023 04:28:22 -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=Fis/JlPpua9SQilrCVejEM8RMkkoIyD4dH+yAJHa/yA=; b=hsz3y+hwsflKHMT/W02jQ+xIjJ 0ixCO9qNu9+TiZIaB0eoJk4WLR0IsrqMobjg37DzHNOao/c63OUOG0Aov+6ODAJiNivovi4gYw8FB rtiQIAt+pLXbv2C1gwdoYjRPP1h3917j34hu44YhOO3oP27TqlF/GoCqzp8b5CJQamiM++peIDCAO 9i+QtYBohBBJdPbV9OAcVXV1Z8I8Kg0JxlLmGA82ysRwtDtJudcmHFdztPCOfBrzxGB4fH2opKyAi 9JsLsx27CwYdNpyNGcZYqAEaf9t3YOobx6AzlAw05dyz1T1fk7UuUj5Rxfn9q5Ygv2zqN3lYjzwCv T/eSSRPA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53150) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r3xxF-0002pu-0R; Fri, 17 Nov 2023 12:28:13 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r3xxF-00007E-Eu; Fri, 17 Nov 2023 12:28:13 +0000 Date: Fri, 17 Nov 2023 12:28:13 +0000 From: "Russell King (Oracle)" To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH net-next 05/10] net: sfp: Convert to platform remove callback returning void Message-ID: References: <20231117095922.876489-1-u.kleine-koenig@pengutronix.de> <20231117095922.876489-6-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: <20231117095922.876489-6-u.kleine-koenig@pengutronix.de> Sender: Russell King (Oracle) On Fri, Nov 17, 2023 at 10:59:28AM +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. > > 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!