Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2552837rda; Wed, 25 Oct 2023 06:14:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFiwHdqahMVZbAsPucvAOdpBjOEA2LJzwzYyLooEpUJskzN91oa0FvUnWn/XHPdagKLrf81 X-Received: by 2002:a81:92c5:0:b0:5a7:e400:b23b with SMTP id j188-20020a8192c5000000b005a7e400b23bmr15844126ywg.5.1698239646068; Wed, 25 Oct 2023 06:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698239646; cv=none; d=google.com; s=arc-20160816; b=GmpVJYkav2CYKJ/0AQ2sezjTBzRem4zI3BqFjJvMSl0Vm6/4JnCvSv77r9q42n1rBD 04TesYACUx/sw+VAdloJBfDpj7IKsTx6HEQ4kRqyVV/FZRh9yoXYJ/EbfoOEgKrfsk6G B9aAJOmY9Yd0+TdgL7O0qPgZiAjZqSxKDnNJ6T3phbzCk3hDU57YrTmzsJU8b7dvcmod fMhWa0xRDb82crqSUzDKCCuhxYzVTRqp0Nd5Hsh8ELVgTjHDPrUbmkOCZLZLkagr1Hyt Ul+y83PvnUjRnCAXtG+pyBVcqY5GZSzWTw8d9/JwZVhkXeeaKcpojKF7jvkomGOSEdXE t9eg== 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=0snOBFDkNxaQ8hqvYUXLFUigtIsrarAvrFjX75PwbE4=; fh=9oJmRTPf9if77Olyy1XwE2eaNbGhQdE8KvqE/x7nNrA=; b=oYmx89mLF5qWRkEdW6BCD9KEly4Uyrl0nqw5gcB7o439tCBSrkMwhMBdia6ZKDgsJS s2PP/pnZPp2uiJZ0gQlLwXfnaHZ83UfUfdhYmUmDWvMtyQP0oof6vNCaHbAFxhvxVo2J v7PkGZJhvD4Z5Alh69kwpj0TYw0TEWaaYucZYjVRqMYOUPxvzgK7buGx0r/GdCUTg0v4 C8lAKQbSN+/fDRvHTwMBtCZQjTefkgcJdAr1bxEn56I2DAIThhcI4DlNm2+v/UrpepMq sw9rcAHdM2iNH2aQdXSjjcU3GPgMIUJM9r/rPzUPlvp3GvJdfcYkfUHLB73I+hg2tY03 B0NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jlsD405u; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t188-20020a815fc5000000b005a1e4d143ccsi11926349ywb.202.2023.10.25.06.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jlsD405u; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0BAD9810EC2F; Wed, 25 Oct 2023 06:14:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbjJYNOB (ORCPT + 99 others); Wed, 25 Oct 2023 09:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234959AbjJYNOA (ORCPT ); Wed, 25 Oct 2023 09:14:00 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6098E182 for ; Wed, 25 Oct 2023 06:13:58 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32dbbf3c782so523012f8f.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=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=0snOBFDkNxaQ8hqvYUXLFUigtIsrarAvrFjX75PwbE4=; b=jlsD405u+1igXi+c3Ipxkcg6syDJ99XUDtBUcC7J/oLOTUCTqvoNkG5QtSrlvCTebE GoQrZxDEgANntXuQRNvzU1IK+JSGOlluUIBj89uL+OvXU8tk2rHaAQT2+duyaGlPDsOZ TDT+gLe44klmASSvAIPuB1TeTkWeKbZ/GiAWoKIpSpPmAoEdzEsAIS1xBPM215nTEhPI 3hFXsDKt7TW9ixLH2zYtG3SO98GQAoEkwvQuS9ZHpUivkdGlC9eyoe7EAj6ngSFNESHV A1tCOUeGNu9a2ZOm0AijqA9ivqFUVkCmU3dU2199R4Ed8+PQgPB+ZliWG5u8Fh5ZGT2A 9s+A== 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=eD404f4AfdWuRKllA+/YnN2eyum6d/GDukvthdZ7soT7McUTV+/mi25ruNyEoq0/pc mXiMWMU9FSA3hfz5QVCIBJjcIEvnXQsRDx1NwIWwc4TL1wcOunrCIIyaYADhYB8kHcJX CbzwX/Iv8on7bT3J8f11Okw29l6+iukAE59aZF2vbLJSXpYzZGThS8MHYR9COTUERKTn 1JlqnF2pG4TkKz+m+aOuyQTvhz5vUfsmSR5KIHFr6qnWI6x6ztbWf5CuAFUVKTv2i4GY lqnvmhg0L1rCgmuV7ZQ40WoFI1dYchky9YshMX6o0+OfNRt9tqkdNmp+HIcLRnXpK1el aJEw== X-Gm-Message-State: AOJu0Yzlt54rO5iOQuqbhSB2USqm9EJ7LiKJtGIoU6Oa+ihIj5a9dEHq DxCW78zFnbxRKGXTp8QjLzA= 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231020075521.2121571-45-u.kleine-koenig@pengutronix.de> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 06:14:01 -0700 (PDT) Le Fri, Oct 20, 2023 at 09:55:23AM +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/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 *pdev) > 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 = platform_get_drvdata(pdev); > @@ -529,7 +529,6 @@ static int sun4i_ss_remove(struct platform_device *pdev) > } > > sun4i_ss_pm_exit(ss); > - return 0; > } > > static const struct of_device_id a20ss_crypto_of_match_table[] = { > @@ -545,7 +544,7 @@ MODULE_DEVICE_TABLE(of, a20ss_crypto_of_match_table); > > static struct platform_driver sun4i_ss_driver = { > .probe = sun4i_ss_probe, > - .remove = sun4i_ss_remove, > + .remove_new = sun4i_ss_remove, > .driver = { > .name = "sun4i-ss", > .pm = &sun4i_ss_pm_ops, > -- > 2.42.0 > Acked-by: Corentin Labbe Thanks