Message ID | 20230713080807.69999-41-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676933vqm; Thu, 13 Jul 2023 01:36:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFiZNkYQ46RN3GxRJwq2hkZANU1Fhlf00Jk8wJTVHYf7dqRK2qzWCfTEcdEr8gKTGY2orC X-Received: by 2002:a17:906:370d:b0:98d:63c5:d147 with SMTP id d13-20020a170906370d00b0098d63c5d147mr778296ejc.47.1689237385892; Thu, 13 Jul 2023 01:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237385; cv=pass; d=google.com; s=arc-20160816; b=I/sdeFbZ+A+3iXaqY6odFK/Gy2feQfZUSXsqpJpBA2l/qovQcrmmoCWQ/wWXB7b95/ REFwt/a5tFamlW2tYUI7FI9YTYnaY8N8L6oy5y+88Xxb4LtPcFDlfkh56sisQybMP+fb /sPuVfWLgxaEa8FlLbJsHGUw12nDAzIpGYbEax/zLJ9NrkHAI3RmP30TNTiHl9rFBzSX wp372kP+kzLpKKZjKF+QyVSDAG1JnF3irQdPR3cLad5NdKtHaN5NfTt7YvTjCAab4EtP Agw2k96rCvSrr4ZLtYJEIMClT+sNtlmmDiGw2POfQLtBJa6D8rlPDvjZowT2M+agvY95 dKNQ== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=CTrRO/CJCJ3NUpjG/4PeK0r1WmJcrdDYpkTYEBgvVkjS26TH8GH/vgeGrRN2R/h5+x TKezp6JruOI8Bc4wL/E4ha/FFwNSFHSEoiwVxlFAedFV6REv5McxQt3o35PcfdxRn10z VBInBDH9JJJMOp7+UPyCaOr5Jpqjteo+/2Iv4Gqi5YvSQ4HQXfccALKv6tvukFZCwZx2 5AgBMyPY4zgerCv594t8LHx5qShFbPdsq+f0PGhpLJtJirLXlYs0yT/OkDkTwUaRegpC tdUUuBeilNaDMy4Fcez5LpHQ7tHFbpymgx/6M0vspuZBAE+1iDPWnSk7FCnJ1TK6vZFk lPiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=IV+VwuYx; 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 xo26-20020a170907bb9a00b0099280a7eeeasi7563588ejc.526.2023.07.13.01.36.02; Thu, 13 Jul 2023 01:36:25 -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=IV+VwuYx; 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 S234432AbjGMIOI (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 04:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234464AbjGMINE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:13:04 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 747983AA9; Thu, 13 Jul 2023 01:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dt+Kve6inq04tzgQA/XGkQkzdsQ1dH+q+goQdWTytxV1FuVPQFPSsmAPT68TAZ3R+lJv8N5JJf0TLj3tvSOagR89vf1VDUTyGgyREUZN94blvhqtZqK7fpqOdytJZgfIZj/RZ3aqKI7cSnfDTF074s1YmzJyuQkQkHlW+9LrsBCSYoirsT3iIqHc0tVHLuF+HU5r71+XkTE8AeKIYayazV/7wiU+QxYuIZRCI6ndTZiGTSDOREIBw54G7/XkzISMPWIzR7yHziGLnJQy+AGW93oqEAZYSEHUiG0rGD0uHtoJ5zx22OIE2REwE3WgGzMgvlNbd4uRImUwl3jwxVQrAg== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=Y4JH42PvASEQ0qpCGMo5E2TjMwuqG25HZjyEW5fi53QoFYYShzlA5L2WfYCuLAuN1ONUqYAVxgQ0bZp42PmsjD8wTH3j58Wo6/+lbA9tfodw6qNKfv+IQOnRypk9KXBxmrWkBRnP7SYRlZE1N3HB0dKLDv64Ecb9NUSfxoIcdGyO+UN6Nld7KUL3zMPbWICNVsRtfSCsrjMu/fl2tHJ26bfq4WMH9IlKUQG+burOfZp8y3N4StizESr9QGUAyXbMr81Wn8t34Ut0kuEHOJEWfhTPKgLq/bAm1KAFf3SCSouVamYNy050GlSxTZLkz4keOcIT3D7RNTqSCHfzPTzjLg== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=IV+VwuYx3SzW3CBiKqqvZPUbHLEAa+NBCvPGCSwtGAqHkVTSWEkOa5SPWd/wadMU5LVasJK33IVKPxbkXiPiHznQqp4qNohSuut1EoZvs+euvDpBtPWWFCIZghnz92K4iIvpUQdCgYFFyrCVN6Xn7snErJ1rGWi7DkbTkMSmqzYLY/r385C+wv/dHXEZUqNDDBo2R44fONys5uiJwDhCX0+mCZYGp8sQU492IiZ4RR7lQA1+rKY14IDCE73dzw221OPspnUIhZkxBrNf0pzT228b0u+E+HFV//r76UcoeosPswQXy99GrFarV7w/fud2BywN3U+Xc9uSRd4EcRDyNA== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:09:58 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:09:58 +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 41/58] mmc: alcor: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:50 +0800 Message-Id: <20230713080807.69999-41-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: ddd0622f-b9dd-41b1-e04f-08db83787d84 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nE468ABzbW4tNDCd9XRswf9e0pZhG8DQiLPKtCDF/64PgTAG9pgEOpaK/SnCKEvWkd51ugSgdRiyj6JhiAYW1CKm3ABqHR6e4wAHUnWouMCaOtWTCaisPXz1v2iFih0Gk7pLgy0rEro9pVmr4FmJ48IHdVS3ecEef8l59DadHYumWUOIp43U4DADQZm8fQuovNMnE8SUKpDe4UUrcMkon2qWo+wkbBhYf7Mln8LWzXXMTUtWRlujrsgnPUMn65JMQ8o3Ow2wMl3Mv2UpA5kAUAc28X+4mJQyrUK3c9a2NLXNe/j2KNWsk66pel6J7PWNYKvuDrDJS+ryZwAHM3rTRGgy0CBDOd6xU4l+azBEk7U2FE8JDodwwhD/Q03rqj/W/xYGfxh7G6Yq1MxVAL6w6GdrS6hjv1IJli3ebqdGKZh3FzDhuxWA85rBmYngOQS/3kIFZoV1y7vZWBqsfJP2L0/fDzeEWlp8cXWeOC+OLWELPnqA+OD+DGO9ziIKcFu7VPpCUy2T8xtMq6QspsI5jc/nuPe2MCl7s8lgZbIdnBOgBrDsiLD4bpnH9mmJiq4QCcSCFvnkbtHR4bK2g5G4CgEmQk+xIWjLQRq1h+UcMB7bAvHVNZcP1eW10Q5wL4dC 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(6916009)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PHm1ASjA8ZHh9HcYpZS9pyi4RRge?= =?utf-8?q?mWWuxm/GGr+WQ7Mye3X00xvNaqcHHNV3l1Sa7fzN5pm/dWCNTuVIH2UsxBdRZjfTr?= =?utf-8?q?St2r1dcMH2/BY3CPDzMbiu4jMTk3xkcJRjnidJgADaq6EB0xXMTVQQqtYOFEWNMTi?= =?utf-8?q?+3lS8KCp+NHcLtbTLONzyGavOpYRBW1wKD0Sb+Sdsme0ud8AanvLq7SxeIaZWCeXw?= =?utf-8?q?wsANKutFstk9acVBt0YNAZaoCN4P3R4Cejn42us/cJXIglvm5iOtsOn5vIrvhFF+Y?= =?utf-8?q?JTretRN4p252n28S8qBPbPFds8i9XjMiPptMMUz6Ns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/2mbTNTNmrzRbEOiblk0wwR/?= =?utf-8?q?bk2l0QKa10Bx6fCwBZ654PSfjAoSxIxNpdb36tC3h3A+pWZvQ4hd11AFVCGmr8SHA?= =?utf-8?q?6+y2Qco3mK/1CVJNCzympZ6YN6f4fcSUEjuN8qYdOpf4RvKzvbIkEN8ndKxoJVU5k?= =?utf-8?q?mF5RZ9SK3Y7B7VSimZyp4WDKWRMyjNsPzbIxcKCkSuC13w3VgfK5PnR6yVo3R+RuO?= =?utf-8?q?MvZ9pqMmlKOaeOECF0uB7Jol5KuvhJ/NN5ZEt+O03GAurONuEe1nOt5DC7X3QZhsU?= =?utf-8?q?ziRa/6fNYqiuWnJYYCjKfVyAZTgym1rm7UL51GiddgqfxyFHe2vJ1xbXyDQr1Evpx?= =?utf-8?q?V3gkcvetRGKc?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddd0622f-b9dd-41b1-e04f-08db83787d84 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:09:32.9586 (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: gxqc3+qrH0FV63doMXmoR+7qgDzuw5gS5N7viBEr6v4hiXVPhYvkh3sQXCLegP0n3lFsuTsnedzjV1sXe51Zxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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 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: 1771293781272568501 X-GMAIL-MSGID: 1771293781272568501 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 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/alcor.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/alcor.c b/drivers/mmc/host/alcor.c index d01df01d4b4d..42aa43740ba8 100644 --- a/drivers/mmc/host/alcor.c +++ b/drivers/mmc/host/alcor.c @@ -1125,7 +1125,7 @@ static int alcor_pci_sdmmc_drv_probe(struct platform_device *pdev) return ret; } -static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct alcor_sdmmc_host *host = dev_get_drvdata(&pdev->dev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1136,8 +1136,6 @@ static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) alcor_hw_uninit(host); mmc_remove_host(mmc); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1177,7 +1175,7 @@ MODULE_DEVICE_TABLE(platform, alcor_pci_sdmmc_ids); static struct platform_driver alcor_pci_sdmmc_driver = { .probe = alcor_pci_sdmmc_drv_probe, - .remove = alcor_pci_sdmmc_drv_remove, + .remove_new = alcor_pci_sdmmc_drv_remove, .id_table = alcor_pci_sdmmc_ids, .driver = { .name = DRV_NAME_ALCOR_PCI_SDMMC,