Message ID | 20230726040041.26267-7-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 t5csp162554vqo; Tue, 25 Jul 2023 21:07:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlELvLm/WMpM0bHmAXZm7EGji0oXek3HPpAc+D3garricn2mQfTo/LVzx9E72c4zGJ8BruhX X-Received: by 2002:a17:907:5c3:b0:98e:1729:aeee with SMTP id wg3-20020a17090705c300b0098e1729aeeemr4478029ejb.2.1690344421550; Tue, 25 Jul 2023 21:07:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344421; cv=pass; d=google.com; s=arc-20160816; b=TiP81Z4foQ1L2+WfK+irXCNNrvZJfHYN7nNwdjLMeImnflvOrSYydxj2bXd1sOtIJh U5L8qxK+vUztW/gcqCWkyb3vrXD+B99+b6Q60Ph5LkFaiYiDNkP0Miw+aEa++PygCuhe 1qPwRIQlyG+eZTC6v36HH12EShzsRWNTV5hW4Ifp47lT2GJBFu0tNnjE+gpn6aj7S/n7 +c/fDopW31AmGVV47bPJwT6qIKztKUz3nO80wBAxzLyIV4vI6Y1yxZ19tYKzO2YFMXfR RTK8EUHDXH0Ne+wfN9Ayqt2h0bLtBns1RFYydM+0iprjNcBOF90HfvKhuCqbgfkDePU9 UYfA== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=SN5XAmhmkKg8UqvP7gT+Ysor7PE1SOJJg++KR3Hjypr8RwJZMeINIBa9v/pOCmxPtg MXBFEY7JcZc8xTwAwh8gIzuSiTcBcSDgJbPfR90Mk0mpDtjgq8uminXe5gln0bQ+ITNT lc7UZVMJ5oGvZuA9kU4fCD8hNK/b+D4aI3LQizct/uBUnGAH2QmC6mZ13Xa92cHe++6z IXpE9BTo87t8EcpmlzSqWbCu/1fKApGjkyVR7lwrt5Vp9o/I3Rf/G1g8dToCcM1hZkqM NhfkQLpBKyxwfIiNXPtumiRB+uqg0X6igTl8hbka+Zxs2/sn14Q1VXk1P/6WYx3Xl48W qs9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=eZHaAbbA; 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 w4-20020a1709064a0400b0098dafe075ccsi8686056eju.97.2023.07.25.21.06.36; Tue, 25 Jul 2023 21:07: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=eZHaAbbA; 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 S231416AbjGZEBq (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjGZEBQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:01:16 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2150711F; Tue, 25 Jul 2023 21:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RedkM1C7uYp2R3smU0+9TQi5TBSKzZu84cSE79PHHz0yPRlVrVYsbdt1wrOBBI2E/e0cUoVmpeJ0HEAhaa/Vh/jXSQPZvx1HbsLf8UepG+Ie8n3vg8zEL+8ihli8rYKz52zYVsKBd4JO7t0RqK7s5GJ3+hT1jL72CWhwCw/Hf8dZ0pwXBbdul7enyOmMk+8toRdg8XwEKFnHFkMhajdf0OviCIwfvxJrx0f8t4z8ZUmVGe6fZ0QzUiihruHLV+SE95fBPzk5e17mM9ilUGwUohM35X+KjS/HFg0N0hxKiX9jOd4KXTjkZDUbwj9ciLY8UG2VwKjARwBy21+CKI6xwg== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=bAwip3MfudLL/+QGH96tG2BfCHBt96+cHcr/x1G7ahGtwvcoTDe6U1jkLTnqPnluPynZeH6t4bSIzsfcV8IudGYCh+BeV+mKaBVM3pGz4wxcoICJofb4795s4u8M0Vu5K9vmviYQnVAjJtZd30VXmDlyj4XFlUNmWCU8jGPCAx6ANr2ORaV00AByHwhEGJHms7i4Fgn4UAlg7DbiHfwYv3fqaQ3xjnuZqKC6bElF4yKAJ65LxZM8G+wJzlqE5hTlEM5RkkJdZe5XBBk8POkyhMyJyXk/QeNcTSVlQ+ukJmk7vjnPLD/GmzqHEs5Mg6WDs54n5QQJ4VyEcMKIUSNnPQ== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=eZHaAbbAXBLKAVQa5/YQHfdmjC4XXZSVYtcftVYwSJGQJN5VblG7IfKa+rnbszQosQiAh5jgpMa8y7EtVhVLNB4mvZsPKv0UvelmfRbjXo7g4WTpisSZL2Y358c+Y6OCeWy25C66/nXfoqcb9KGKWfi8zt8vOep/7nkMCKLpRKIq9oGsBXVypkWNfDmO/E+iiy3YvjTimHW3l5CcGr/YM4CveB31Wlkp6GPEeGxkw2sVnRN4gfiuyZHdVHEqrJIvxufZJlIiJ87ct53rMHWCOxturEQtmY9p1ka78MwM1HIzYgkVV6hiLXlrYM91sEkLmdiM9zIsiq2aC11GOUVsrg== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:09 +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:09 +0000 From: Yangtao Li <frank.li@vivo.com> To: 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 07/61] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:47 +0800 Message-Id: <20230726040041.26267-7-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b0f6ada-7026-4f4f-2516-08db8d8cf15e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yrBSyRdWwYTDrYE8OmlFYaZ4Lh31XP3WBxouB4pbT9MkoLHGChvocqmuCBX8VVZaSRNCor3kHXWnIv82aIG9LkInMveKyBQ3E0nXG2jsUWec27rf1L9gqV3GeM1FdHDFtX/a/QN2Ne7loK/IKbxezQqWNfyTYZwUIBV9IEC09CoWmfJoERYFHWoyqhldFClDkwIGnhQFmcipIYGrE/13VYX5xBouyPoxnhFSeoctsQkU35y/2fx2gq2MFuTSzZvVbpDIE/93AFCayjcVEiK2U2BIYCFWpQ5pnYRV06iL/iMKXgHd7Sy+6T5/2vYJNOHr86WtVDbJMnWyLKiOlJPuw2+d5eBQnHR/FLdOnYjnoKvNI+gfZscBfkeJg+Zzb576pVcDYNf8al/V/AjLSzg/4mSvF8zMA7YoO0daruLc3ktMvMOc01IojroyRGwV5KqHAXfUtrMUjMNk27aCEHb9iQYmiJ9aGD/oDTuP9UV7ssyDqKMtWtKQFNRHEJya/W6p+UwTQuanAEqdadRKvzMkEV6aA4u+H2Zse0Dlu1KtNMiV++48I/hPx8f5rLDWH0KEYsNj0Lh1xD8r/CEsRCOtshPJA3jywzEI+ojNZNr36faTnZIijjL7MvMrF1Ast9He 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)(396003)(39860400002)(346002)(366004)(376002)(136003)(451199021)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(6916009)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4e4J/PPd9ydxC5AKQdGls3bbOv3z?= =?utf-8?q?6w+pCjOR4K4GSEAilxaOAsTEz7JbrwaFZ/7rXyIDNMj7AKpm6lDuwQ4KQx5w6s2Br?= =?utf-8?q?H0nGMNWOQoZJIcswtif5FAjOpS2nVidQSzjjQEMgXWvT3Eny82bjODTAMeCk0vkR+?= =?utf-8?q?Ebc5xJvBESuE++ztmpmNK7Xho0HRltOQZ5LUMfPw6cIAvFrssJOHpWClvPd5Xknsi?= =?utf-8?q?INMynX90OSrAvneHMbAlQcKyx5Dhb6531wJcuJ25GgC8Rl9gfPWH54Ni7QFnqa40C?= =?utf-8?q?C5rt96MO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2T5Z81UiGfhdAFlak4sLMF7dVKcc/IGsl9qyrdxZOmwzgkS?= =?utf-8?q?H5edr4GOFew9YGKbCCker+Pnf/bmxYF6GdM0FkNuMIDrqbAxaiCw0aQbWbcdg8dXM?= =?utf-8?q?M+QOBxOOQm6pNaFjoTSpT+W2/6cXiRMG0XYXizBvlc/nc3OIo2dbsngTAqw61PEjK?= =?utf-8?q?tWr+kDro0vI9IxqRVpRJy7RYdt3Zk8NrM0rkd5L0wYON+4k3KyFSOhOGSDFbKxgY8?= =?utf-8?q?a7dpUk6PptdHQc8ES3pZrRMb+sVN0zmp2V0ltI8kgFxGG5oQVvdz9LiMD9T08WWET?= =?utf-8?q?Bs6dZxllEYa66BO4BPHFMPrMpaCs5tM3fc5FABSHiEfebhJhpRHrOC0oM9579qJBP?= =?utf-8?q?dfFe6JfiG1Q3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b0f6ada-7026-4f4f-2516-08db8d8cf15e 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:08.9861 (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: gfobKk4+O4AR51y7PMHxo83Xdi4Vev8ekuil77Q2YbfBuWge4iRqemG66pkIplOgTs/RaCaBzXhJE6y/dn72VA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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: 1772454592326716071 X-GMAIL-MSGID: 1772454592326716071 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 3:59 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/davinci_mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index fb686c0d171c..3757e4ebb614 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1345,7 +1345,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return ret; } -static int __exit davinci_mmcsd_remove(struct platform_device *pdev) +static void __exit davinci_mmcsd_remove(struct platform_device *pdev) { struct mmc_davinci_host *host = platform_get_drvdata(pdev); @@ -1354,8 +1354,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) davinci_release_dma_channels(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM @@ -1402,7 +1400,7 @@ static struct platform_driver davinci_mmcsd_driver = { .of_match_table = davinci_mmc_dt_ids, }, .probe = davinci_mmcsd_probe, - .remove = __exit_p(davinci_mmcsd_remove), + .remove_new = __exit_p(davinci_mmcsd_remove), .id_table = davinci_mmc_devtype, };