Message ID | 20230726040041.26267-21-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp192282vqo; Tue, 25 Jul 2023 22:42:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHA+VjNIKl4PIhy6RRw4Eq3fR2GcqHZVi2C24rTRLFrfNNo5QdLDZxllaYzokpyi2s6s/62 X-Received: by 2002:a17:902:ec81:b0:1b2:676d:1143 with SMTP id x1-20020a170902ec8100b001b2676d1143mr1463428plg.15.1690350121206; Tue, 25 Jul 2023 22:42:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350121; cv=pass; d=google.com; s=arc-20160816; b=hIBus2MVxmA4d2sXg1sRJ6QKlxm/BcBKGUfrwoUQ7EJ7xL/O2mn/sKGxMFW6Kq6fRc rOteI8VvrA7/nVMZVfZtcjBXlCuz55nxarLuSm8Ow4TUu0vrVANy/l0JOz2bw1DgZZuy uFso2iTb6gJQvxRoiQzRmG8EGzmFa1EaGzZ2bzxNN6Yjfxipih1OVDimHGSHmINYOybW UnmTDWw/t7YMRekCL92USpqEdfZBJyeS6Bp1Jm+xE6V7knP53l7iUEjl/PIGY/l13aGh OEnswCI2GIsvHVsIEP956o36eQ1CEovVMw5gPvyVjnOrBPfCsByNO9c2/sSloXcUTBTJ vJlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; fh=HI3mf3qn5urF3Qqt8rhdLClhA376IKrKE3n9wsAV9H8=; b=rGZqqZgz0nHnIKOxJtgr2keFVSQhT1UI2A0TUb4beKScEWdpb0O+XUzk00IHBKXTyD BedFeBea0/JP56wRU4raiiCefvNQxuBtky3RobmNEw2f26fSsxdTTIcxn5puZdEYSYPs c9Vs7AD27oA7DurzReNSkRnSu/yDTtIw0wayudcYGgDQoAHpPC4bXPme67gtZelyM0Pj evHO3hwN2wQh0jTzwZ/8d8y74LJiS8x0UC/ywnlzu4PaZxQZk2Q/+pFX+JgaxAAUAjm7 7ib8n+0HEqiEhQoUkAbYHxtsXCMfZmHl8aquvT3w2FQriUOkKWBi0v/BCi/tqWG4KJbU KDTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yv+0WnfC; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170903230100b001bb0fb5e06csi13378487plh.483.2023.07.25.22.41.47; Tue, 25 Jul 2023 22:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yv+0WnfC; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbjGZEFS (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231214AbjGZEEQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:04:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A4CD44A7; Tue, 25 Jul 2023 21:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OGIENbdYjRbiGW0YhVP0b07eMC5DMUN5orG8xs24xgp5PF62Empy0NE9UEgPCp9Y8/xUgeR7h+vTU9QJRuHgRNVA4gYFpnV+OR/f6SDBF8XWv0lghdTzglTWgeGCIO9uP+KZwgsbB2BSenCDHw6S4InRKGHH6NlsQ5Vh1FgoxLfVaCukZJnkLnjjNuEUWnPJWaP11AJSMHz370WlDUw5BBP7KyFaTdBkg88FzpWOxPrupuuOuaBn5YoByp2HITIL4x13hGA3wboRe+D8mCpVV72IIwfjq+DXxD5qdG8nAWcTn2HTQCUaBLmtnNAIi2TMz0lBP7ZutLR1fOu90v+KbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=KkakbZmMxcK4WMzOpqPm4Z3atFYKKg38f1ef3u5KurRK/ZY+i8qtYpv+fammfuJToEr5Wsd9dmDKL9hVVHTr2Yyy4nT1EbMYghtNMsgiDS8qirg4WQDpdIt04IU+kqcmrq7YktIFs7XhVAYgbeJdSUS4xsMiWX3R2DpkYKkQgwolPzmQFObA/NDwkazZXaX5ZO1Ekwgm0MX45qxzJQCQ7qoAaNlsarABPIuTHbaVmE+FgDS5mV4FD0AHfJUW9b3d5bWvBIUFUApPxdeDhavAMQrTcWcvymmpALTfSi22f1r3AJyCYKjGZ2raiv2FCGynUXBbNnc/5EM4TaTc1V076g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=Yv+0WnfCRU7UzwqiIqY6jAU30ernzXVcfJT4DzxlD4KxWJbS4l5RHGJ/mkeumE9vHeolS+v0EhSS0GKfRXEUD/SatGoIs9iBcgQamgX3YcKtLty2Lw4FHfU+q9IIVOyAtLQD58GAbA5iG8myi/d0z7Raw/tsAlHVnn6+PMJJ0eaYzcVBys0TpNm15TynLilVx5B4LUFiTKmkPKmFo8SHSsMuTfSGKRPZ2WIXTlYIU1uC9NGniZoHCBTqW5iq1UY9ZGbCrDp6rOWeguJ9cWk0510XItSyRSy7hOtOkLM+FSuT7OtPNW9/gisUtRLEQ8CK9zA0t8Uw5z0zqokOAXFMOA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:35 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 04:01:35 +0000 From: Yangtao Li <frank.li@vivo.com> To: Adrian Hunter <adrian.hunter@intel.com>, Ben Dooks <ben-linux@fluff.org>, Jaehoon Chung <jh80.chung@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 21/61] mmc: sdhci-s3c: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:01 +0800 Message-Id: <20230726040041.26267-21-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 39a1a542-a6ec-44a6-9ee9-08db8d8d0107 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9VMWCiDM1IY6H+4vXU5+gmSA3r0RwIMTJrjfWCMK+Q5stOfyQVrKohh+K50fXRiK06epvKuCE+Dn9qXASN0VZCPAM7E7SAh6SeLBWwpxh6ibyJDjcgnRrHQoSSZpU8Cv5uxLzxEroJuvxTGUho71b0VDQWaHpzIy2fJMo/iS7XChTcHiSBCI24spww7MFQlY0qS3B4mbAtSZHlUaJeZ7taSXmDUSFms2woRj5SMCVXiVvbzk5x881vC9/9nYCF66rpmsYBCKu+BmaDF4NsygUzwPdcj9fRdVvfIcN4Z+R3UGparCSM8vhEKOB8arJYsSNZPdQHZOe5uJuH9Bgvrg0JMk8LVm6LNOjelNLc4R7icyzS9F9zhufEBI36VGCUm5ZX05r5yGewEvYlppDWOTKi9YiS2YwvASf9FX4GsaXGZ2I6jxk5Ob9GQeCmlGcp42hxhjqBmGTHw/NXP2xsQHjXcTmr12RRR4a66sTwvweyG6/jtJ035i1YROwfA66N1HgQLhCocQQWdsCxMil0/15Pi3tWVDmK69ZySQHVCI7xS8E8LSWy7QwuZVN7hBTghXlQ1fWP91UYpeHMhHOYnFNQ1j9ATD4y1sdUOo5LEFCNbQnXOtwwNlLFKZwGm53jx+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fBpi3IHbra8W7gz8l2qebSba8lTN?= =?utf-8?q?d0t8s8jG1Ta2mQzVi99bjAIFhBw6+jXCJwLJzh+tEyCgZMdVb7DtXQrv0S1gS0t2q?= =?utf-8?q?4FqJmtB+rr2tGvoR17VimmJwcCDElbiODPABy7ggONGsqB4f4XcmVntpFZBsxDzxw?= =?utf-8?q?v0/o03cvX0BPN4zxWEqg3aH4+skOkgLqQUlrc8Alb+aUop22h4EId9WjE+/nKQsRs?= =?utf-8?q?sP4jUUAZlPrjzUR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PvzzbeacxPT/Zaxp9ZxcX7H3ua5+ueCKqjIlmlYX/b8Ra?= =?utf-8?q?K9qtS5//XHmih/NKdCF99FYn1tZTS+WGwtwZQQ8m3LhT3Rt1VXcCRHquSJvxrMXlO?= =?utf-8?q?KEIsmVogHMKcFD2wblLMYGawiGUu8FQuhS6FVjL7fI7nxd2u3dbdt8oXkd48ugUd2?= =?utf-8?q?rr3DzBy0CIdLj8HNbXh1ZNKarXglM13fOBcL351jNAjqmFEg5lMOrn0SvpmgOQcJU?= =?utf-8?q?7zrn6LiBKgSQ9mR9hZ4XqPVqPo+ZRXXzeIIrUUlXq9il63rL6IE93tu3N3+CDv1sE?= =?utf-8?q?s2kD2fJJrP6YWs022L5vyDUZrq2z1Eq1uAtodYPuRpe06z0CIgsExMuCUDq4kYL+q?= =?utf-8?q?77LsmmPjm6ZwTnnL2/5mGyc7rHMQ1wls4OWGohkOK6ApjZz6q8WHvxT8DMwkres2X?= =?utf-8?q?ofLEd9JIxbsA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39a1a542-a6ec-44a6-9ee9-08db8d8d0107 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:35.1508 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XgsziMUJnyKkrDRiYuAlX/GatOzSfry+HMJtTdSRasSp8qJjJo0YT291pHMScVMKgvVocAyIT9wFBWCOr5ybbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772460568888345338 X-GMAIL-MSGID: 1772460568888345338 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 a.m. UTC
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 (mostly) ignored
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.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/mmc/host/sdhci-s3c.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Comments
Hi Yangtao, On Wed, Jul 26, 2023 at 12:00:01PM +0800, Yangtao Li wrote: > 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 (mostly) ignored > 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. > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Andi
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 504015e84308..b61f12d328e0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -668,7 +668,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) return ret; } -static int sdhci_s3c_remove(struct platform_device *pdev) +static void sdhci_s3c_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_s3c *sc = sdhci_priv(host); @@ -688,8 +688,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev) clk_disable_unprepare(sc->clk_io); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -776,7 +774,7 @@ MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match); static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, - .remove = sdhci_s3c_remove, + .remove_new = sdhci_s3c_remove, .id_table = sdhci_s3c_driver_ids, .driver = { .name = "s3c-sdhci",