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 B0307C07545 for ; Wed, 25 Oct 2023 13:15:25 +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=oWCmdGp+Go7KS5cNnKHoA1craBypmnKHJuvF8+/5FwI=; b=zwF4xTx3miTd8M Ql6XGZ1CZAZrrExr+ad1vQiq8dPMelgeIWecMKfsp6OlGzvSf1BkQuKS7rKQMm1ebdDW+54pPHcns dstusXv+YdNNzZAmt5ucyhgoXksdzt1ASjw2YWn56scPWgk4ebm5R/2Qj1DoT7PEoYy44R9dzhbSz AM4nhQ8LNJkjfQ+Hf4U8moAcm53gt0ZJYznt1B9SQhoXr0Ky9rsyD30i1768AmWGa0CZWqUSMbjTe 97IXFoUpVdvGheMgOPJqgd7w+gLqezAua2xPgR6ncXSdcbkeihzZMfcGKUf0cDCVquOewsaYoIpIG ggsq45a9VrRs4W6x7nLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvdiq-00CNvn-1v; Wed, 25 Oct 2023 13:14:56 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvdin-00CNto-0y for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 13:14:54 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40806e4106dso5351295e9.1 for ; Wed, 25 Oct 2023 06:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698239686; x=1698844486; 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=Uh9NzWDOpOjBqAE2NxiRV75HtTvFEEfbyuq8HRzPj3o=; b=OS7zlClZKqB8z+/bbcYH0ETPwxcITzoq2RIjuG52FSLrbed1o78i75tqwyb9hg4k1l sEKibIriBPGhz/6/mLCACb33FedNR9GwwDmOXPWHfTKnE06Wrr7m9ENRuPkwBxUt1WN7 jn0Ju/ZWgDbvTTzWFAjAF6uox8jE/J4x0GPJ133vGA5SJJ2NkBE7Fk0wDfq0upb9PZTw PzG2Ocqei+5MFB7JnVgxL/zLtrD/8gneuahri3KtTddQKtCCN2GR4pjbpTaR0PtEVKxX qZPN23SIcO5Tu2EAXvcYQSxnDpBDzs4h9U+5U6Mvcs1ZMBxKnZvHeAPQUCMb3Bl86u78 +rNA== 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=QTEqC+YpTOH4GIUVlq5mEXc9b4S4kMJe7LwS/J+41L+RDMPXlvAqmAR3R6ErlFCr6u 8Fez6ribmgGtRpai1uaLCly03MTSZKsYpMHWusJkqQb9sRcPs98HD0B0LpPlk3zl2R2U dzLNkfWem4w5EjFWf7mYj1TKefH22Me8cUPi/DpthtGv8wh/b13d7u5lXxbxjp3kLunb 4if1PVk0UqKFg1+ZDb/mxN186CIaVroR/rRYUBog6HTMxjW7V4fZJ4jmzFLeBQgRqEG2 Fts+8lgNndoe4+MxXYmEA/CK7KoUVtbaHleGWXxSPojnNF0hIKpXpWEmr055wjut70eO BTbg== X-Gm-Message-State: AOJu0YxEWpE012EWzPyHdMHq/ZmC4tQTeFfMDifyYqn6vGY4Tp1ADQow DjGU+0cFwlPbBFwIhQ+2B1Q= X-Google-Smtp-Source: AGHT+IEJFh8RrfOpsYHcP8SNWpaqchDATr5wPw2duU0ud3HztsU/+kp3ToqrWO5GiOcF98UISwZhVg== 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-Disposition: inline In-Reply-To: <20231020075521.2121571-47-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_061453_335758_4CEF7AA8 X-CRM114-Status: GOOD ( 26.46 ) 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:25AM +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/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, > -- = > 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