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 570BBC07545 for ; Wed, 25 Oct 2023 13:14:38 +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=GtbUxsFcUFFsAySsl6kgTbwjKHoW1bsK387ktWoOpPg=; b=ho8SSsfrrbdhXh eIRK0fFcGrAZpX5Ylio/nlGRkUqNyJwW1dVPoisOc1v9ubIdv3mdBus0Hxk8VhcEwR8Ps/L8UJ69z OAPOPySQNwq9UW8XYHLTQRRZjG8E8OZGGos7Fa4TB6jhE3UfD+saWqluJ3jHj6NtMlAx7F5F3FlDh MCuSUI6Tivm41iSZ3A+qLB2CrjKeFNYvSbLgXB5Ijcz+wbQKJdhG1oCnZL6CzyKVvQSGiOKJd8qNy NMXFBgrqg3KbOUjaBSopxpXnqMLh0OTld9cCdMxWm8r4D7G3xp/jBpwWgl/F46vvUDJEqwueqMYJl jNCHXrM5aIaqlMSFR7AQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvdi6-00CNq5-0y; Wed, 25 Oct 2023 13:14:10 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvdi3-00CNog-1f for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 13:14:08 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32dbbf3c782so523014f8f.1 for ; Wed, 25 Oct 2023 06:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698239637; x=1698844437; 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=0snOBFDkNxaQ8hqvYUXLFUigtIsrarAvrFjX75PwbE4=; b=cLQ+rTYwJMosaXZgUGm4SugRQnqB59ejw01nfE/o4Z/t6IdXKty/k1wqgVAsChCwGN 5TntM0pASUW4pHb2ZVPyU1Y3xiDtHXnu3X7RbpJnye5aGz0qkChcWmIQNlN1nYagUKrC SYldMbtfAkjyuMNQYYxVzwXeqTpUddsFrF34uTkTG+TWuNvduWXd1F00jo0j+CdTnc3n AZzuNexrujz99yUfrQ0UlPDOZ/Z78I1j+vYSU+ouB6c7vXhY89pNibWLLgITgh82t4aG 55dxobQfyE0Lm4bAbqP7UkmHGEDIL7BvUMxr+Bo4YF5SLsSSfFc8DbED7eoqzw30fNKK 7w2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698239637; x=1698844437; 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=0snOBFDkNxaQ8hqvYUXLFUigtIsrarAvrFjX75PwbE4=; b=fveI3aD/YaOPFXABq3ysoLMuVvbhW3rBdumjKQCAPb4W8wizP7vq8cCZruTDL9r1uB KliDVqbUsoWrh/JyNpLBNbgARgdHOlY9Y+2gVmOFmDIZDCAMs0QNGArd/qlgHeBvnZwX cCxvhuL7dIbyIAOsB9GYYI398DXIMDABe0/KnWAS4f9OtggGH3c+YL+aHLjph5YmQ9pB kkry2mvAt9g6ziec/XpB7vt73fefcU9jiTWbkKphzAIx7GwnA1lyhydQoCm9XSGVUukV HyZPN1bel/1WVTEgfNmN8Lpa161CPYfRTBI8Q9k2vq66t/APeiQAzt0pEWK82y54AI2i w2RQ== X-Gm-Message-State: AOJu0YzQwU7NHV1tIGSKEvLNW0ZoDFIACuBDQKiIyT5dHdECGSTBFrWd btO2SEei8Ud5MXOp0kVCPyuQh24+VcU= X-Google-Smtp-Source: AGHT+IErz0EQGvLQbRef9SN5Vh8Xo+GHXjPBuT+skFgyEYLw4/yqaK0Z8I+UnZVewsLLXzAzENPDgg== X-Received: by 2002:adf:ecd1:0:b0:31d:caae:982d with SMTP id s17-20020adfecd1000000b0031dcaae982dmr13700694wro.12.1698239636579; Wed, 25 Oct 2023 06:13:56 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id x12-20020a5d650c000000b0032d9a1f2ec3sm12019266wru.27.2023.10.25.06.13.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:13:56 -0700 (PDT) Date: Wed, 25 Oct 2023 15:13:54 +0200 From: Corentin Labbe To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Herbert Xu , "David S. Miller" , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Jonathan Corbet , Rob Herring , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 01/42] crypto: sun4i-ss - Convert to platform remove callback returning void Message-ID: References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-45-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231020075521.2121571-45-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_061407_556243_3542C049 X-CRM114-Status: GOOD ( 26.68 ) 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:23AM +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/allwinner/sun4i-ss/sun4i-ss-core.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > = > diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c b/drivers/= crypto/allwinner/sun4i-ss/sun4i-ss-core.c > index 3bcfcfc37084..ba80878e2df5 100644 > --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c > +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c > @@ -509,7 +509,7 @@ static int sun4i_ss_probe(struct platform_device *pde= v) > return err; > } > = > -static int sun4i_ss_remove(struct platform_device *pdev) > +static void sun4i_ss_remove(struct platform_device *pdev) > { > int i; > struct sun4i_ss_ctx *ss =3D platform_get_drvdata(pdev); > @@ -529,7 +529,6 @@ static int sun4i_ss_remove(struct platform_device *pd= ev) > } > = > sun4i_ss_pm_exit(ss); > - return 0; > } > = > static const struct of_device_id a20ss_crypto_of_match_table[] =3D { > @@ -545,7 +544,7 @@ MODULE_DEVICE_TABLE(of, a20ss_crypto_of_match_table); > = > static struct platform_driver sun4i_ss_driver =3D { > .probe =3D sun4i_ss_probe, > - .remove =3D sun4i_ss_remove, > + .remove_new =3D sun4i_ss_remove, > .driver =3D { > .name =3D "sun4i-ss", > .pm =3D &sun4i_ss_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