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 E6CDCC001DF for ; Fri, 20 Oct 2023 14:09:28 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DjWILqhGo9D1g/9iKu8RpdCJ2wfPeMEL3LvoTkeOQac=; b=d+UmK9G8kzNrb9 xE0AAPK/t9sSWHv6wl+2qCWm5fCXfi1X95WPuzdg3yRvrWxIsRti3wGcHHSwDlwxEKmKTWyb1EBCM h6qG0f09HaNJTZQzxGJEUCZYCCzyrHW2tLQMzGyGVuNrXH0BIiesVi0nqTxloHmos4WhHJhVRk36x nsgLwiR6UM93HZN43VxFWfnfk5w/3ijDuFs3EC1Oy3wvk3VpDJnKHtUc3A7MUpjYyeJGg3v9oyjB+ +ZvocPqwE+/bP1L7LQo/bHcs9iTKLGLEsEPpWARjS48YBHaRbBfuz5x47UkmghqDJnJtTOHwZ4WLy PMcrlaxENExbAn8YuqZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtqBV-002SSm-0M; Fri, 20 Oct 2023 14:09:05 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtqBR-002SRl-3B for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2023 14:09:03 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so7420465e9.0 for ; Fri, 20 Oct 2023 07:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697810939; x=1698415739; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kkSRSoe+NCrUdsy2PEWfZaaHcoEfqOm9ULUGMQivKU4=; b=ME4aB3vM2lYALYd9gdoQT6Ozt2VW+71iEIz7IQV6P/8Wbm2Hy9UDnn172GTctfBa9D hVgovaG2n07HfYc/g1gSUM7pIwSNUQxlSA8sHW+jZH/OjikOu8WRZxOCjJvHkEFRfSfq 8EatTpg1fr1z/G/a3lXbHpiS/QBldO/HEauerJTRh8NMZc149yZ+a5ZEHKvZZdxOv3r1 QXth95PYAj2tXZgankl+QAVipDozC9VwXvhM9pZNWYO5q8KMJZO/prXsf4T9uyKsQiU8 IUWoz9OrmP182WMf84aaOYtQybO+ctjmlTIaxfhR2Fuh0JtyruLCwjrlKbVIAJrqDW+Z G4gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697810939; x=1698415739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kkSRSoe+NCrUdsy2PEWfZaaHcoEfqOm9ULUGMQivKU4=; b=xVA59Bb9nCVYUt+7R13w1jQO5+2mvsXd9APdoUFAAxwIa41KCNq9i9ZF1DdIxigkcU +ks63UHq+ZJH6F9Y5MnIiO3DcM27zihzjxB2EkYHyKp1OhwwGdHUYNAzt3BXBevCrGGo 6c3g27ylBhTAQi5q9GXNj3qkNRoGiN1k5+AW4RKlyxKcewBSyWyU+iuafIIr7G4aXPE/ 9rFYUdosIu5hsQhSWdHSiYvQG5LIOsSxIF5aPhD9zPOqMseAfPEPJUuULxXCRIuNPaqe s7tn1x5QXQRG3Q/cjki2aFpW530LchnqyUKepzydSO63GVay5QxrlxsNJM6mR0VJuZNC HrEQ== X-Gm-Message-State: AOJu0YzUGYn3m/05ICt4lj4+Y2eNzdfYQ2FYZgnd9MKMnXV4hjK0yrCE ilImX16Ym3KjlpabjMbe2yE= X-Google-Smtp-Source: AGHT+IEf5vEfKXkcjURNmEeHj5q5T93McM3/MsTajOoseh/P6iDVAzUGDoq2OziQXf+rZCfHzZaAqQ== X-Received: by 2002:a05:600c:4747:b0:405:359a:c950 with SMTP id w7-20020a05600c474700b00405359ac950mr1521123wmo.19.1697810938083; Fri, 20 Oct 2023 07:08:58 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id p21-20020a05600c431500b004076f522058sm6989920wme.0.2023.10.20.07.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:08:57 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Herbert Xu , "David S. Miller" , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Corentin Labbe , Chen-Yu Tsai , Samuel Holland , Rob Herring , Jonathan Corbet , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 02/42] crypto: sun8i-ce - Convert to platform remove callback returning void Date: Fri, 20 Oct 2023 16:08:55 +0200 Message-ID: <2319555.ElGaqSPkdT@jernej-laptop> In-Reply-To: <20231020075521.2121571-46-u.kleine-koenig@pengutronix.de> References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-46-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231020_070902_024574_E846BCC2 X-CRM114-Status: GOOD ( 22.60 ) 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 Dne petek, 20. oktober 2023 ob 09:55:24 CEST je Uwe Kleine-K=F6nig napisal(= a): > 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 > --- Reviewed-by: Jernej Skrabec Best regards, Jernej > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > = > diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/= crypto/allwinner/sun8i-ce/sun8i-ce-core.c > index d4ccd5254280..1741758e03eb 100644 > --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c > +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c > @@ -1071,7 +1071,7 @@ static int sun8i_ce_probe(struct platform_device *p= dev) > return err; > } > = > -static int sun8i_ce_remove(struct platform_device *pdev) > +static void sun8i_ce_remove(struct platform_device *pdev) > { > struct sun8i_ce_dev *ce =3D platform_get_drvdata(pdev); > = > @@ -1088,7 +1088,6 @@ static int sun8i_ce_remove(struct platform_device *= pdev) > sun8i_ce_free_chanlist(ce, MAXFLOW - 1); > = > sun8i_ce_pm_exit(ce); > - return 0; > } > = > static const struct of_device_id sun8i_ce_crypto_of_match_table[] =3D { > @@ -1110,7 +1109,7 @@ MODULE_DEVICE_TABLE(of, sun8i_ce_crypto_of_match_ta= ble); > = > static struct platform_driver sun8i_ce_driver =3D { > .probe =3D sun8i_ce_probe, > - .remove =3D sun8i_ce_remove, > + .remove_new =3D sun8i_ce_remove, > .driver =3D { > .name =3D "sun8i-ce", > .pm =3D &sun8i_ce_pm_ops, > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel