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 A65B1C0032E for ; Wed, 25 Oct 2023 13:31:26 +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=nynLcLf/xShCyxNSUtQVDcNMFjfk8BP6W95+BWEbTrA=; b=onMlh2h8At0h6K J5UXWvMCc7uo8v6Yqh0zR43UhiiJDbO/+R57sDlImBlu0JKv1QdUA5nu+rqbq5FJJUC8mM7Q6Cmxk SWAnziW5hB78D0qCf1qgyFD3Oc9w8TbI0deZZnRBwYcPl+I540qbuCo7rRAjdgcK6txoVLwIuRyvG kJvXHhlXdABckx4CFmoPQQ8T0qcRZiOZo9I8uDBZjsIPORxH17TS8VctVES/DV0v+oU7o60Pbndx8 TweaSzgtcTgEB1xQrhh5h86QQSfiOxn95uajYjTYgTQUHIXQ/WfwrzHbV77ZqhliRFIGYHw+8yP51 PUBLrZsZaheQ5o9tO8Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvdyO-00CPF2-2r; Wed, 25 Oct 2023 13:31:00 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvdyJ-00CPAv-0X for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 13:30:56 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40839807e82so5500615e9.0 for ; Wed, 25 Oct 2023 06:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1698240653; x=1698845453; 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=RG2mfTqWbL3cxDA9gME5AJbCoVhfsJy6L44fFhUJ/WQ=; b=Qs4lYk/qQ0u8Ss4wG65PIbzmAo0yWdTz3e9t/xR0dwBEiEyNLCOyAo88N2oGi14aRP NM1YvGlwkjHIozNY2kvoIQBU5Fh3yvWV3l3xmd5JO4kutsGVO8l45JHKALR6FxWEU7VB F4Nuv4IHILQV5N/rs1elHIoCYCH2uGqWpTOfA1wsXXMBsy7pWjeazt4IftGPvrQSbTEu CUeruSQkxyf3clsMwWEsmLkBlINg3I0aNZh78XDo3vnJDwN7dMdtGUyUYIGwkYUeh2tB E4NgWnc059y4WM5lvFLv5vI3P6v5m7+JkhLHrTG4+qdN7hR0W7wn5w3MZwPt1ytv1OtI ejAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698240653; x=1698845453; 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=RG2mfTqWbL3cxDA9gME5AJbCoVhfsJy6L44fFhUJ/WQ=; b=A2y9a/WOsGMPQQ57SsPyWkIl0hYPrfvX8azHniJ8/R6LAEOIWirn8MD8rL3Xmf8th9 oC2IyAZoaU0+VBShz1xa5L2PwV+VO0hbV6hxR9CNrmIpdwHWdGT5n+7j+bzhwvMWjnfn moGk/ljO+BhrV3YI++Lg9QuOVTaaRW5WTwcboTRfOtrCYDkv4BY7FwW2Hdpwn6lOpuyI i2ooxJDhHFseS1Y1DGbvGs/832ypng6PC0afQO8ET2Kj18anmU2XNTXQqD2+54c872Pk q26t6Mom+e00WJ3nPeik2N6V2EKp3xHgp7xfA7zTE0CTCpBCD0qvQiMsxs8kvzFVmm/X Bsdg== X-Gm-Message-State: AOJu0YxiNQG6i/+VScD5mw/Gl5RG/nu/q+G0FnG6X2VAVOPMdEg2jrzt tHPZvx1O0INdE1lXyxsAzfr+Aw== X-Google-Smtp-Source: AGHT+IGFJqTIiUDn1kAQ1w139jUc3diI2ZBrCiD3gSHxz3gn9LbP0N0kaebCZoNwG1oK/xr18xG+eg== X-Received: by 2002:a05:600c:310d:b0:406:44fc:65c9 with SMTP id g13-20020a05600c310d00b0040644fc65c9mr16195701wmo.8.1698240653281; Wed, 25 Oct 2023 06:30:53 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id je20-20020a05600c1f9400b004063ea92492sm14921894wmb.22.2023.10.25.06.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:30:52 -0700 (PDT) Date: Wed, 25 Oct 2023 15:30:51 +0200 From: Corentin LABBE To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Herbert Xu , "David S. Miller" , Linus Walleij , Imre Kaloz , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 22/42] crypto: intel/ixp4xx-crypto - Convert to platform remove callback returning void Message-ID: References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-66-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231020075521.2121571-66-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_063055_207300_70718245 X-CRM114-Status: GOOD ( 26.23 ) 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:44AM +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/intel/ixp4xx/ixp4xx_crypto.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > = > diff --git a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c b/drivers/crypto= /intel/ixp4xx/ixp4xx_crypto.c > index 4a18095ae5d8..f8a77bff8844 100644 > --- a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c > +++ b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c > @@ -1563,7 +1563,7 @@ static int ixp_crypto_probe(struct platform_device = *_pdev) > return 0; > } > = > -static int ixp_crypto_remove(struct platform_device *pdev) > +static void ixp_crypto_remove(struct platform_device *pdev) > { > int num =3D ARRAY_SIZE(ixp4xx_algos); > int i; > @@ -1578,8 +1578,6 @@ static int ixp_crypto_remove(struct platform_device= *pdev) > crypto_unregister_skcipher(&ixp4xx_algos[i].crypto); > } > release_ixp_crypto(&pdev->dev); > - > - return 0; > } > static const struct of_device_id ixp4xx_crypto_of_match[] =3D { > { > @@ -1590,7 +1588,7 @@ static const struct of_device_id ixp4xx_crypto_of_m= atch[] =3D { > = > static struct platform_driver ixp_crypto_driver =3D { > .probe =3D ixp_crypto_probe, > - .remove =3D ixp_crypto_remove, > + .remove_new =3D ixp_crypto_remove, > .driver =3D { > .name =3D "ixp4xx_crypto", > .of_match_table =3D ixp4xx_crypto_of_match, > -- = > 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