From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB4ADC07545 for ; Wed, 25 Oct 2023 13:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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-Owner; bh=3wcjZepnU84Qfxl/BPIk0nFLRIBDRcQgkycCJUubpSg=; b=XXfSTsI3ueVXE5 T+/HcBl5BY7W0m6wem1EdGNMW0qZ59qoTpfulM7eK0PBA/k7zV+xyFMnGxeTsP59OJcL/d+nNsMEn sj5KZO+p/lFaezo8FR8JUxNlp9+LQYgF/LksiMReKybcoHIp0Q+WNSqjE8UhJGu02Lbo7ku9Ln3sB JF2W+6UqDwG1A5sF3tAtUsOLQJcAupcqQF+3YcEJ25czeiLvWlZzl3S+bBbPfyNOm5F2y5ZotXsb8 r7jDjWW675YEO+MJj2tNh221OsyKkbdTAxTWwQ0zyNUglSSqdLw2SVCiFBrk0bPy89NusPHUJp7C+ u+BsDD3EHrFzB5Epi1MA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvdyB-00CP9B-09; Wed, 25 Oct 2023 13:30:47 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvdy9-00CP8d-0a for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 13:30:46 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c5056059e0so86384291fa.3 for ; Wed, 25 Oct 2023 06:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1698240643; x=1698845443; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=0ZH17l6JfmmIfOTgKCDriWdpZ0VqXYa+A6C7wL+m3E8=; b=FFa+wkW7yood4jRoxVd50j9Vq++rsyocR3joTF3/f3fObFQq7hRC1YvN2nPRCJBzHt 9JJtbMoAixL2n5s5TNL8xLMqLGbY2f0lVMRBoy8smnkbxv+aSinda9iW8IHHaAnDqaN5 +aIYLQzYRdQg0vVuPmYoL5Z5tx/kXdxGr3s1ySQuD+bUNil+ayeQSrDPulQ4lTBfejIJ 9naDW4d69eJIohPJ+ma69WMsYkHTrfArfh9Jmuzh+gjQ1OrVzapNQ4Qj5r59Eck+fora mAnIbmio9hrCaMbhwdIn/V1vzDsBqjx9I2ioClfhvk/nmoRRu+n6Hp9xpTcwPlkGo8t1 SBfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698240643; x=1698845443; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0ZH17l6JfmmIfOTgKCDriWdpZ0VqXYa+A6C7wL+m3E8=; b=gHNrZhd3P3DtyFuwG8QxpYR/SgrfeeGo8oKqb/riHVtGJ4ztAZ1IQalnLY+GxOszYg FRfVVWAYSmCEBg8GtOtF9ccNcPjlwhJ1HD6JPNg/yGlLy73FYi4Z0quL3DvgufeafbxR 5js1wk4HagAQ5621UcU423NrWY3BoVqgtGt/H2sgqxSo50AjXesxpyFbEE3tLEhYNibF 3ZT7U3AwQPbJyADRq+larHYpGFdXxm8yyoe8v6c0E56RGsVLUd0HLolntR7/PZ+CVTp9 Q5RScsrZNSMVWnv2zCL5ppGwenQL23LbLmR+RrtXSyr1OJRgFWR5Ww9YKhrW+IvjLeL9 iz8w== X-Gm-Message-State: AOJu0YxRZ0MnrTkZDBj3eBDgqdBL8YOj1RvMwusFavkT5grseNdOPShv SNZf/O4Mj7axJ0bQ2N9NLizpkA== X-Google-Smtp-Source: AGHT+IGZo6iDT1CA4AvNNgTcmn/zXM3EPbZ85Dap4S3WUMvTVsxabE0rDAp36X7juUzHFkcqhdEUeg== X-Received: by 2002:a2e:bc22:0:b0:2c0:17bc:124e with SMTP id b34-20020a2ebc22000000b002c017bc124emr13053833ljf.38.1698240643124; Wed, 25 Oct 2023 06:30:43 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id i18-20020a05600c481200b00407b93d8085sm19072989wmo.27.2023.10.25.06.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:30:42 -0700 (PDT) Date: Wed, 25 Oct 2023 15:30:41 +0200 From: Corentin LABBE To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Herbert Xu , "David S. Miller" , Hans Ulli Kroll , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 17/42] crypto: gemini/sl3516-ce - Convert to platform remove callback returning void Message-ID: References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-61-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231020075521.2121571-61-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_063045_221650_D54BB6C1 X-CRM114-Status: GOOD ( 26.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Fri, Oct 20, 2023 at 09:55:39AM +0200, Uwe Kleine-K=F6nig a =E9crit : > 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=F6nig > --- > drivers/crypto/gemini/sl3516-ce-core.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > = > diff --git a/drivers/crypto/gemini/sl3516-ce-core.c b/drivers/crypto/gemi= ni/sl3516-ce-core.c > index 0f43c6e39bb9..1d1a889599bb 100644 > --- a/drivers/crypto/gemini/sl3516-ce-core.c > +++ b/drivers/crypto/gemini/sl3516-ce-core.c > @@ -505,7 +505,7 @@ static int sl3516_ce_probe(struct platform_device *pd= ev) > return err; > } > = > -static int sl3516_ce_remove(struct platform_device *pdev) > +static void sl3516_ce_remove(struct platform_device *pdev) > { > struct sl3516_ce_dev *ce =3D platform_get_drvdata(pdev); > = > @@ -518,8 +518,6 @@ static int sl3516_ce_remove(struct platform_device *p= dev) > #ifdef CONFIG_CRYPTO_DEV_SL3516_DEBUG > debugfs_remove_recursive(ce->dbgfs_dir); > #endif > - > - return 0; > } > = > static const struct of_device_id sl3516_ce_crypto_of_match_table[] =3D { > @@ -530,7 +528,7 @@ MODULE_DEVICE_TABLE(of, sl3516_ce_crypto_of_match_tab= le); > = > static struct platform_driver sl3516_ce_driver =3D { > .probe =3D sl3516_ce_probe, > - .remove =3D sl3516_ce_remove, > + .remove_new =3D sl3516_ce_remove, > .driver =3D { > .name =3D "sl3516-crypto", > .pm =3D &sl3516_ce_pm_ops, > -- = > 2.42.0 > = Acked-by: Corentin Labbe Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel