Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2553648rda; Wed, 25 Oct 2023 06:15:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlW2M4We0d0SZHa+PxQysIfBYVjsXgKmgzScTWcvfzUtmNCzYopCphej/x0OaBbt6a6+GJ X-Received: by 2002:a9d:6a57:0:b0:6bd:b10:c321 with SMTP id h23-20020a9d6a57000000b006bd0b10c321mr15276505otn.10.1698239706619; Wed, 25 Oct 2023 06:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698239706; cv=none; d=google.com; s=arc-20160816; b=v616iZ+GSK14G3yUIsiWMay6iVJ21KbVIr/52qMKoala5CrYhpKMnf8whh1n6ouLU5 pYyGfcsvwOSeujYbQ+l/VjIR2JahPq/ttYBRkvy+GOVQD61olMnxx4nWHJBfclsX+izR xcusT8g/208WL7iA2P9NBaq2IvJxRzeL/ZF0+rk74E90Pmj6Vckvls11JGxS47RzwX0M bB95rfRhp1+8KjA7n6I+714O/AZc0osOw34yKf8WS7a2ZrSmWfUrNNpYntkp6SZ3fEjQ 3Ksgr4dd6TKAtc8NPUu0Qn7o/Y9zt6XIOkT4C6LVf9jjBIKDUBDfxUr99E0QRh0jTtwa ry6g== 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=Uh9NzWDOpOjBqAE2NxiRV75HtTvFEEfbyuq8HRzPj3o=; fh=9oJmRTPf9if77Olyy1XwE2eaNbGhQdE8KvqE/x7nNrA=; b=ioI45XF5m6FyCa0gHlA4DdB6w6Lgpe2IBi3Q2Nb3F5xI2OwUfhxIKjclRlI7IgMyjD C7VSsKoPH+x4B5/MkihGWciDRQdJ+5/IZLcR92QqllWP2lr/tMrAWp9XG8Vm9XYefJyc OJa9Bdgr7ZiPoFML/2ODNL5LtEHTdusQdvBHhE8VktxoFI6Gg0PLfJBGXmzUm2m9HzCm qVj8L7QDshzUx6KGz6IA1ozZplF0xw+4c/ox0TWHzFzNy5YQs9BBiny20xxtZtYKsMba b8Xr38t6tsT6H57GjxOT7JsG5mI04vsL/OmTM1z56L8wLmFRVIr8+KMVahGPhMBWAXMr BQTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Vg6R9aq6; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:3 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. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y7-20020a818807000000b005a7af7f6152si10978601ywf.503.2023.10.25.06.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:15:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Vg6R9aq6; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:3 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 53E48810EC36; Wed, 25 Oct 2023 06:15:03 -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 S234992AbjJYNOu (ORCPT + 99 others); Wed, 25 Oct 2023 09:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234967AbjJYNOu (ORCPT ); Wed, 25 Oct 2023 09:14:50 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22FEF111 for ; Wed, 25 Oct 2023 06:14:48 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4081ccf69dcso5189685e9.0 for ; Wed, 25 Oct 2023 06:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698239686; x=1698844486; 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=Uh9NzWDOpOjBqAE2NxiRV75HtTvFEEfbyuq8HRzPj3o=; b=Vg6R9aq6DZfSUki59hwTyvYGcoDGSivl5wBGvRPJSaHKCnbNj22lYN38GJ+IDL2yr1 uoHUuj7rtwYBA8zNXQnNycRNA5XlgSwY+4P+WcH4DADMASg6PZbw4uiVHqZt/E8HqvrN of25KuS66Xih2SfAJnXGsyxdAcntOk+cc9a3wlMeYvigbRMvMNd70bSNu1eji9bTn/Gi 1I2JK9T8kvMHVUC3mEt0NRJGOMMCTtdI7jKCwI1fqxZI9GXnFfnTRK6HoZg6UJ3EY/Zt eSRxmOOJL7xQOoo3qDYfw8uG5uwgZhZiBgoAeU/XhV2ci1Un4jZM7+EnW5lgyAewUpUx wxog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698239686; x=1698844486; 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=Uh9NzWDOpOjBqAE2NxiRV75HtTvFEEfbyuq8HRzPj3o=; b=NNYIFXEocihvQBNlPr9Y1KIbMBkW5fUYCSDlxsuKnJ6Bfo6zp79oz2NLq8KwbyUNuv h1qAeTvbEWW605KuLukukwpgyn5Sv+aDEbozkUGlow39FjaXbsnedqUj2xrZfA5t9oXQ EEEBIOSc40v92SEPt+Z1cOZ2CQEL/LQjsNSHjpBrCTqzGCJlFwGSS0uZtHgEaODzjPJR Pn7E3tU0lUXFJp3uZZ/lEa8/MYU8ed0rb2/quJ3nRxo9jUU9wKw92HrfmI6m96c1DGcU VvhkXMqSazzOlfci3sOcieLac5cswdEZbx/MzztXElxYqc1XOzYLc1GSfRMpKIgxgnun D0DA== X-Gm-Message-State: AOJu0Yx1Luk7njiswr2jaEgKlJ1XMEwUKTlXhXcoI3PQlmhuLUPecDrI 392fbISWrYPN0yj2oDSNlWE= X-Received: by 2002:a05:600c:450d:b0:405:409e:1fcb with SMTP id t13-20020a05600c450d00b00405409e1fcbmr15904488wmo.5.1698239686303; Wed, 25 Oct 2023 06:14:46 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id o27-20020a05600c511b00b004067e905f44sm14909072wms.9.2023.10.25.06.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:14:46 -0700 (PDT) Date: Wed, 25 Oct 2023 15:14:44 +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 03/42] crypto: sun8i-ss - Convert to platform remove callback returning void Message-ID: References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-47-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-47-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:15:03 -0700 (PDT) Le Fri, Oct 20, 2023 at 09:55:25AM +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/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 *pdev) > 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 = platform_get_drvdata(pdev); > > @@ -921,8 +921,6 @@ static int sun8i_ss_remove(struct platform_device *pdev) > 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[] = { > @@ -936,7 +934,7 @@ MODULE_DEVICE_TABLE(of, sun8i_ss_crypto_of_match_table); > > static struct platform_driver sun8i_ss_driver = { > .probe = sun8i_ss_probe, > - .remove = sun8i_ss_remove, > + .remove_new = sun8i_ss_remove, > .driver = { > .name = "sun8i-ss", > .pm = &sun8i_ss_pm_ops, > -- > 2.42.0 > Acked-by: Corentin Labbe Thanks