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 76D9CC00A98 for ; Fri, 20 Oct 2023 14:09:47 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uPmnfaPskI6TojJBk5Q9kw61FSh8t/rFrk74gyD4jmk=; b=bizCUccvCDCbvM wXvbbGqdrOVchsl+VGdJnXsd59BqX+A4ERNHa4ZKqItTP2DUDRM/PLNov+U/FEXGE4GZZedxyt1c3 7PBU6dWTxlHmi44jx0p2mlvJvq16yrKSJHcwZMM02Tlz0u921Bn43Gtm3BKRk4xvS1KUQUz/6TME2 IJGJO6X1PXEfOoyIaWoiAwpjoUztW2Np0hBpL5bzgmo20dIjT30XxpNkjKaR1iFnZUqZLh8dVRlo0 LzEr+kXhhglshG0k4cmpERP9gREHZ1pANkX3xyZwy/zPKwUiuwtLiFVML7nmkkGLa0R28QidxS/nO SVhNJIOPcT4k34Tw8bPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtqBl-002SWG-0W; Fri, 20 Oct 2023 14:09:21 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtqBh-002SUX-2a for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2023 14:09:19 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c4fe37f166so12525791fa.1 for ; Fri, 20 Oct 2023 07:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697810954; x=1698415754; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mAk8jT42K0k51X/whGDwwkWdg31+jN6q/2Mef/7UWrE=; b=KCPeS3sqSQ32zZc0f1EuQDeuRM1oIcCWzW859Rm5bCJBVruxXB9eNgpuP8wxX6WP17 b0f0pKtkKG5aZmFgimbHf+PqgIxbyP0I4+g0/mZpjUo/gXDjZzUK/bZXHkTRLJuRh/29 K1iMyBJzHTthzl50BnGEAhE/1Sv1L63N047JeGofPfOvEPm6tJlHKqUwHSZ4woS1nMQC 7Y5tnfAvoFJZiKrZhgxdgG3r1fO2zLNxTILjLIojPD62UTIFUZDkgWeFg0Z1wqhRaVMF igBbLdB07voVA+dXYsvKI4Op92Z4x9AAhFZ1J7zNMtyivgkHu3pGzMMSLsfXT0/p6I0p z6Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697810954; x=1698415754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mAk8jT42K0k51X/whGDwwkWdg31+jN6q/2Mef/7UWrE=; b=Qq3D5zMB2RGK8cKq4V0lpFgiuUYiEU5J3McQBpCMQLsHeLFe0Cxt6DZOki7D+c0MYj bML9FcszQk563mbLknnENAOpt1xkI17tnzihFW2Na2qWcyodXRbNZhRPNwwZnu3TTIAx 0rBUSuAtGVjbIFrPzHc37wWPB3nHcJ41R49eCD90Jp1PK3yBvDsmC/tJ1uML2w5g7cur QbpyIm7kR1x/ExDOIiHJO1Bk22Ks1QbQv0bvQrP/vVRHSFB6t7VdMoFlxwHuN/SUsJUz 5KZWdXPONG45qKZuxYZXr1X/2VpHClAYf9OK6f4XMoJUkt3oxxVlrbbsYNnCdz/1xviV 3gmw== X-Gm-Message-State: AOJu0YwzZgJ/he6pwKsRVtCMDwFYGjoom0cRsh1OzxMJYoZAqj89xkG4 ATG+TS+eqVjfIgmU1kEDEGQ= X-Google-Smtp-Source: AGHT+IEcjRrEpDSqzSmBRW8cEQW7ATxuQF+r5HjzhQL71YF4PNK4hVxqHzayJTA6OlG1si/9bOF1Ng== X-Received: by 2002:a05:651c:a0a:b0:2bb:a28b:58e1 with SMTP id k10-20020a05651c0a0a00b002bba28b58e1mr2191009ljq.41.1697810953817; Fri, 20 Oct 2023 07:09:13 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id l23-20020a1c7917000000b004063cced50bsm2248792wme.23.2023.10.20.07.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:09:13 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Herbert Xu , "David S. Miller" , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Corentin Labbe , Chen-Yu Tsai , 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 03/42] crypto: sun8i-ss - Convert to platform remove callback returning void Date: Fri, 20 Oct 2023 16:09:11 +0200 Message-ID: <1885790.tdWV9SEqCh@jernej-laptop> In-Reply-To: <20231020075521.2121571-47-u.kleine-koenig@pengutronix.de> References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-47-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231020_070917_877594_27608F39 X-CRM114-Status: GOOD ( 22.30 ) 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 Dne petek, 20. oktober 2023 ob 09:55:25 CEST je Uwe Kleine-K=F6nig napisal(= a): > 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 > --- Reviewed-by: Jernej Skrabec Best regards, Jernej > drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > = > diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c b/drivers/= crypto/allwinner/sun8i-ss/sun8i-ss-core.c > index 4a9587285c04..f14c60359d19 100644 > --- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c > +++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c > @@ -908,7 +908,7 @@ static int sun8i_ss_probe(struct platform_device *pde= v) > return err; > } > = > -static int sun8i_ss_remove(struct platform_device *pdev) > +static void sun8i_ss_remove(struct platform_device *pdev) > { > struct sun8i_ss_dev *ss =3D platform_get_drvdata(pdev); > = > @@ -921,8 +921,6 @@ static int sun8i_ss_remove(struct platform_device *pd= ev) > sun8i_ss_free_flows(ss, MAXFLOW - 1); > = > sun8i_ss_pm_exit(ss); > - > - return 0; > } > = > static const struct of_device_id sun8i_ss_crypto_of_match_table[] =3D { > @@ -936,7 +934,7 @@ MODULE_DEVICE_TABLE(of, sun8i_ss_crypto_of_match_tabl= e); > = > static struct platform_driver sun8i_ss_driver =3D { > .probe =3D sun8i_ss_probe, > - .remove =3D sun8i_ss_remove, > + .remove_new =3D sun8i_ss_remove, > .driver =3D { > .name =3D "sun8i-ss", > .pm =3D &sun8i_ss_pm_ops, > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel