Message ID | 20230726040041.26267-45-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 t5csp187316vqo; Tue, 25 Jul 2023 22:25:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtvIfoXzwPkttKC9JH71tO8KWwZ5kxzqehx5SsBECjF2rlKv0N9G8N6wIxZDqSQa+mzhFS X-Received: by 2002:a17:907:a0d3:b0:988:f559:47b with SMTP id hw19-20020a170907a0d300b00988f559047bmr791197ejc.31.1690349146928; Tue, 25 Jul 2023 22:25:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349146; cv=pass; d=google.com; s=arc-20160816; b=LaLbCiraw3u8d7jF/lbzlORxtma4PyMZD3DMC/bDs4UrunSkPC0K5/bnoqF/XmQu5W +13ZbUQ/oUKZ7v9K8yZ8qv/mDTO4042m05rOxw17sbPN+9LPLWTUTdK70rTKtDGBGSbs Fo6JHdWFaV2oIinwpncHB5jdx+NDIpn7Zjcqs//ZKroLubqvy+1Z/Nb1ILZycIEbSsD9 9ztiJgSvv5YhU02eOm+GG4ErW1wIrdXh5zP9+sBNWgK7frQrQmtOPTNVgpmicNQlG38L I/mOWvmZAlg35pNdPqNX2XdPUj+khOcQIp8gbHWbIn2RdleP22LEkmdJ/ozuR2ki3KDh vqZg== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=T2BOP8N5qUDps+eu1RzBAODHpPOAOh2HHwNCSlXKSUDUPb8cHPQoSLcMUxjXlr1IR6 EEoVSVSrz9HOEAoV3i8H1A5CT+g234O0LevAN1yv8HGPnRHa1TVjQt+2lR51jN6iyTX2 Tei5AYFWgRXa8YabCsO0RPSigY7qIPCe9HanscNgD3JDtQe9ofGZvT3ZRauBEZ2+/9VF J6Sj7pcNemYzqY/7CgC7xBCQzUCkkTXbxPLZD87avkUd4EPzlDMTwAMx5edF3mbRlCcQ 3Vi31llNYPE4U7f0hKLgZjt+zIFSgVP7AwwagkHxPEtKFeaYw5GwDa4v8C+20NM4XBjW wuuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZrXVzItH; 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 md17-20020a170906ae9100b0098e3591d105si8742726ejb.405.2023.07.25.22.25.23; Tue, 25 Jul 2023 22:25:46 -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=ZrXVzItH; 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 S229542AbjGZEI5 (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Wed, 26 Jul 2023 00:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjGZEIK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:08:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1D04219; Tue, 25 Jul 2023 21:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iy0uv38j/t+RYn35nWERXNx/ZulHz7F9vn8gnuP1/LwfFqwrNAWgbUzQ2/4+7jRthu94vP23+Vof7d5sCx4D35oQiZcRjRUeL3ZG9bEiystFYPC/CwYNv9T0P2E7VAsVq6kVgJgq+rmnGJpLgtcw+n25iy3pH1dhKlhcOnbX65WxgUP9UzUxfQScxzHyu2SJrW4eYXtt5NeKCNEVwDBzB4mad+JUec694TmABVPo7EhvYLWzjRkPGr3Dd9IS+chkml50q/fNZ7wg+L72XWM9K5EPejsXorcXZb1sg1GRYR+fBjl/pECm01YyHz4OmP7dYpOWK8PWc3wmkIPfHRESkQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=R7I2sn9fv0smlMaqr6OIcAn7iVfRQ8b5qPfgyod8krxtfMsD9HIi9S0lul0FiAdcsPJDHToKrAmjk7oGrV4ifjansrPNSTZEyI4io85yz8g6M8237eqVpTWbvtg1MgZFwPLfoszIjBqT139RKnoP78RO5jfPAlTlqabEtaRVLGs8F/KfMYO/zqBtq99Zgf62yyTWQc6O8q2OdyPbsZgXkWh//qtLkhkp4xgY+vAChu/AigpDwmqWIy1qrYa4R1TUwZpByHSDhRMcB9XolYb+9moMM1kTJnLIckdbn6yFZiH+/vHMcXUpyjtgRXYvteT6mDin8UWIAedoX6pyLcTzlg== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=ZrXVzItHmDLj7sZLOSzCtOcNFwb8paxIKhFVLnPsqyP7pUGbjH6apScpwhCSh94HbVDh5xWl6P6uaSJpc5GJaDgPdXGpr9hXAopDr20BFHw7aGRfvDarVagaxTKLIr2tNLIRzHSAYSQmzBfJEfDqd9p0LjNDMW5jlRPjVxgobDgg7nEeTWBby952D1+Je3UntJfF4WP6HJ0xAOv4b4nFb4NaAglHDUrgXvTsDf4Zoke9tqidfyUl9QzDSe8xSQbw/vQZnQjy7zvkoBE5dRvXmDxrudA138g0aRov6Bom1Q2F0nMTn9fUT4wjzzGaaMkQP3aWt0GHNdF87f6qcSKzEA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:30 +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:02:30 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jesper Nilsson <jesper.nilsson@axis.com>, Lars Persson <lars.persson@axis.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-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 45/61] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:25 +0800 Message-Id: <20230726040041.26267-45-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b04fdc4-df79-4158-48ec-08db8d8d1a35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g/4ybTHL+30vT9xfcG3rRj4zbkPBTyp6gNOeXhSm7fkUdF3iiQJ4vfTD4ut0mLOFGjgzzq2T1q48LZdpGhOVjV7DWMuls1FqlZX3j2IIMB2pDQh0vsDYg2m81sdEGwnIzViqZl6aGWeBKDMVgo+YMuVCv3SEDV7NJZqzH8/W6PqvYq2wWyAGPgVmLBEjSXHNYtO/p0212+CLAIA0VZ1abb7NkA35bBLosMw7jtml+NHdu0UkKQFg7iNX39Q9p9qZ6WfB7B3cPjttkjJzf1cN2r1NFpbnWYSqd1M6aDn9uJSnlcn8QhLeH6C1IrKwQkkcMPZQHTgr7Fd+IWGsmxNzW9iV8zmZzAL4v+nlYgxJczA84JnThSXKrhj3T18a3pNVRlI7bgnRp1xsT3D2b1IyVenaPbwaNldV368xayuXhHQBg7eoZHZhyA8SQ1D5pn9K8wvUq+w0qPXm54D3zxfXrM9X9cBszk5v3OoPZbwYNDt7th4WN92m//j3stqCYCX1W17q9wKRMl9egyvZ2hr+qocCs1x+uoK+0OOaHc+AYR1ILp/aGamwBAEC2nNJ+gxnftode7pvojT2s1LO+Lb3APYIuewwO5hDFixfXZBTB+tV/ZrN3F34kB+frpejjvfO 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?B2jTT3DSvNZ31V+L7mxci4pG+/ol?= =?utf-8?q?bFRiRRf1q/5pZK4tfyDWBtEkhorBYh6EPr6zfNh8waIP/lWl58ZVcdcHme/Lm8bA9?= =?utf-8?q?PwP867VltF+WVPcIIgobGiZON9Rfl86kLcaGxpU7luuaVbYdGEi49hqVu7whABhJF?= =?utf-8?q?BnJ6R25jNdcty97rntl3++Xf6zdUHLDrMQrZJv8IL/fVTE7fgdA9J4WgLG3IXxGz1?= =?utf-8?q?5t1ELxCiIoGsfgLbV0sMjL24zCxV+oKcCcf5S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LKlHyTUAggwtxnR?= =?utf-8?q?BLjODrVAMZMuN/Sso55IkOLy1djAqXHlwGQBG317f7FRiKnITfeS7ravuBO7EguaF?= =?utf-8?q?fnFw9olLMLe9G4aeew7ILnpFB+3Rp5hJqFk5qL+BgH1F0AYRcd+jZiTsOmZI1SsMZ?= =?utf-8?q?9jcB59C8Jr3FTb1OGJ6TgVokmb0Uewi5lTla8GfsZAXWMANJNz0sq9BvigXXMsfiV?= =?utf-8?q?zlpXuWL6WRR0pc87kPajpT3JLA3rveOcCyOEAthgCE65lrDDcxNTaAP2OD4C0JWRa?= =?utf-8?q?5rmEaWK5AfzEms4GpH1DOZmiwxBoPm+PJdPndunRWVihXumu5zvz8ZqD5iKUIbOJ3?= =?utf-8?q?YgU8nlS0G67efXOAOhYe2JksKZ5jUk212nMq5PgGGpZcMuaCnvaeifREVJGlLEnB5?= =?utf-8?q?xaI2D+cDJ/yl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b04fdc4-df79-4158-48ec-08db8d8d1a35 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:02:17.3978 (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: L5c3xuTJzXnGt1jV2tMg2x1YcS4xjF3jRQolXAb4zznYn+jv/I6Yj0cij43gsk996boy1Ua87qN+lpw1DrlE2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: 1772459547029657373 X-GMAIL-MSGID: 1772459547029657373 |
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> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> --- drivers/mmc/host/usdhi6rol0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS,