Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2564783rda; Wed, 25 Oct 2023 06:31:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPT1TZNMFJYEVUQyORxwsy+jUoHpQrrEMbYId9hGN0c+Q81ZD27DMu0guaTfzNvb6n1LAM X-Received: by 2002:a67:cc1a:0:b0:44d:5435:a3e with SMTP id q26-20020a67cc1a000000b0044d54350a3emr9636070vsl.9.1698240660149; Wed, 25 Oct 2023 06:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698240660; cv=none; d=google.com; s=arc-20160816; b=q3HD0H17muHtJFggujTNtoVRVxhUV8tuTM8dZEvhPMdB5M0ks1dI+O3tBu5TMKzdmx j3LwRa3rHoDGzvVqJazAsqTOGyAyoY5JArpkiL73IAw+UdoOTiLY03W5IoR36gqn9GeM puzaXulEzSNg9IhRLdgb+nvNsiquI2V0JhFEyO5Exj6fj1+tIVDIem7joKCbNeNH0S5p KWziJIxzPsoA4p8pwP91jbfk++CsPwjn28STnIoFOJ4JSf2UhChplRFcNKMNS3WguTqq G4kPLiRdhdsEY/H+oLBJ1KZp3IFZJExM9ecUD4DIoEZ4taP6EOsUmegq+D7jDm6UNE5x wsbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0ZH17l6JfmmIfOTgKCDriWdpZ0VqXYa+A6C7wL+m3E8=; fh=8FG0eyJKfnsS0ARiEC+TFJWDrW0lmOt5BfPrM8eHx1s=; b=zWEj3/RMZzzo+ji/U9OQbA8IHsU1K+ZATdwl3Vbd+hVVhhPfT0ZU3ASqDl310Lk+Bi c5o1W0aaaKXQPpFOTYsQtNyVLw9hZHnaOFRHg8knflj4wekwU3pAXIP3AqEceFPmBffY xGJqNfCn6dcc7kgXEG9u/EdL4J6YwhXm+508BibY6QF75AFHPbWWrp3Bk3t4mKK+a1sc YzcTGONK8o9Dul2ignYs8mnaWmkknFtLinJqG6oNQfgRo1Q5bf/ffCnrzNyM1B6nceo2 n6MrndfsB3rD8O4+pM7Yv8T+pCC5JZub/h27ZYwWgGd0iIOH2h9S05Bz49v/fm5KUuej 0aoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=vh0B3tHH; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o25-20020a67f499000000b004529035c9edsi1220834vsn.394.2023.10.25.06.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:31:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=vh0B3tHH; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D361A8076E6B; Wed, 25 Oct 2023 06:30:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235024AbjJYNax (ORCPT + 99 others); Wed, 25 Oct 2023 09:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235002AbjJYNau (ORCPT ); Wed, 25 Oct 2023 09:30:50 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F036B13D for ; Wed, 25 Oct 2023 06:30:44 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c509d5ab43so86634031fa.0 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=vger.kernel.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=vh0B3tHHEEdHkgPuT1mzoEmtjp1dm41PXH4MnSPNqXlBCICuMPmkolD6PSmrGG3Sft KSdG1XiRFtZHi+/b8Lkd6sfiIOBtScrcjkjpF2e6WEIWxbyIBCo0d9V5ya/UBwyne6ru CVTP3XQaTJsxqXdVjiQo8/F7/m9vwlV/CEucGMGFimzHhZIEyn0LVhG7ERwDrWIO849L y0fcXgzrsuQsQzeGCM7WasGe7OcbBATc5e3bybhe+1Y9u1j5oRQuNUOWM8SS3nQklPja rBvimyRKoAT55KtErhcPyjkBkn1EqgRrE2Fa7MIxD9ik93iD9hifo8WdA8ycAVNbGKZw Ramw== 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=iXAfMCIzu+OfEc+OJ3oOVU3+p5DZV/fAXo/CdCyFWfhuFpcCxHlSuZpLLrynrNPbPs ZTS36tFBhiDsmFyKixYiudP8fg0Shwe8lvHlkufsg92MpilLRovUUiUAEFwD3lqiykJv J5f+cag+d7sldnIPJFnMQ/TpgyU4RQmPi36uJwCMpfCd1bt3gc4n1o+cLo/P12LhnaHX njWJ0X2KyIiPa1Azu7faI5COQjBA1c96YdcCCcMx35dfkLI6ygrLzYeQwQvbq9qFlfMC HL0Rgs37tBqoZut55OC41MKqIlrJ3zwVy+bk+lMQWthSDCiVJRZO2v7CltlsT+r1BeOv /czw== X-Gm-Message-State: AOJu0YzFHyvL2koznSSwDZhHiiXtr60yW8PvRhxvmtvzBzhyixngH7Z9 h5oVrv6ZawM9WY+0RQjCPJ7LzQ== 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231020075521.2121571-61-u.kleine-koenig@pengutronix.de> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 06:30:54 -0700 (PDT) Le Fri, Oct 20, 2023 at 09:55:39AM +0200, Uwe Kleine-K?nig a ?crit : > 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 > --- > 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/gemini/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 *pdev) > 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 = platform_get_drvdata(pdev); > > @@ -518,8 +518,6 @@ static int sl3516_ce_remove(struct platform_device *pdev) > #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[] = { > @@ -530,7 +528,7 @@ MODULE_DEVICE_TABLE(of, sl3516_ce_crypto_of_match_table); > > static struct platform_driver sl3516_ce_driver = { > .probe = sl3516_ce_probe, > - .remove = sl3516_ce_remove, > + .remove_new = sl3516_ce_remove, > .driver = { > .name = "sl3516-crypto", > .pm = &sl3516_ce_pm_ops, > -- > 2.42.0 > Acked-by: Corentin Labbe Thanks