From patchwork Wed Jul 26 03:59:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 126052 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162142vqo; Tue, 25 Jul 2023 21:05:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDXI14nf1PLznKFmb40mCFkqCuBhruscfH8JeeGpbY/62cbrneBRN5jjplpkp782LjVSgA X-Received: by 2002:a17:903:191:b0:1b8:862:74ee with SMTP id z17-20020a170903019100b001b8086274eemr1042441plg.11.1690344348790; Tue, 25 Jul 2023 21:05:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344348; cv=pass; d=google.com; s=arc-20160816; b=Rc2UvAeZ8hwf87ozP0pKC853ficLTDXddcw9rlVruA50zgKLmcjyMqIihKAk1iAzIz Lf53xWo4mw+VNqCBZjGXr+Ux0LLSVnVTeJfLeP55nGWSK/IUl5kUWT4bNsTcff98m4tt +slqBtvm3G/wUwkB8zjitT3Xk1ymA6Rq761p2MyeuL2sOk5oDdEzKRO5MMDoosCcx6wP ggy3Hz248TATmU07b42jhAtpPIok//fhxL3yIz8bveouO2MXlWx+dYOLajJiuWYzdlmz kyhpTeRdJuCXujM4FDKxtgdcUMQzpBRs92v5sGWt+dMSJnJIjJ96MNkktJwiXGEAfTlT 7qLQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=jq5Ypgitr4YMzZHzKuJtgZKfzmX+XWk7NXdydkYdUA/Mn6Ru6MUD9SGSb/7Z04fP+o PJp1tsHhPQ1jl99ekyG5Hcd/I5s53InSYtY0fpQJF1Mu6+9Nq+LBggCkuH1n+cPOMqyG FKeDRrj9smTZMlnDsy9BG4STv3K12PDI/wwKiy0CBl165dwXV+ZbrLP/E8xiFDoHejT2 aTEai94pHCXhkaOkP00yjqQzQEfa5AFxSuNNkkz+osAkPWZxMyg6U91mSZgCAYgtgaTM hb8jlYjlukFDTNB0tP0je2Sn5gfA10BiDJ51KRo9/pDoVZZWSXwdRkWtpBxGLGgiqoLq sn6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aouJiSuY; 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 lo7-20020a170903434700b001b8b6089eeasi11349146plb.326.2023.07.25.21.05.35; Tue, 25 Jul 2023 21:05:48 -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=aouJiSuY; 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 S231481AbjGZECJ (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjGZEBU (ORCPT ); Wed, 26 Jul 2023 00:01:20 -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 312E7268F; Tue, 25 Jul 2023 21:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c6RDGwOGAYNmTgJrraLjT46Zz4R4JSCyGb7c+TMfOh9YW8KCg0bdA+wuVgcM5RFvY3yreDyjVxpmkororJUQ7V41h/bNccgH4fjeYE1c7LH6FJQZjZUvCWBGr5gvx1wplZE/Vn7GK4j3l3Z424OO1/+V/Slg5m1DVOkysXAeVcKQD3Rjixa5+wkDzcLVSc7ZuXaX7+IYzDVdBGsfkmUIJ5t7RU7DezhR/lGgi12qzSq+NttiiiE0b0wdOFAZE3hFxmtV0gkMwhWvPup8oSCVMkXjwHrlmMPa4OTbrjx3WmpGhOBm0Ogy6OHcAkHusD4P/UuX/UsVaoo0on0zcNHEoQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=dXFbkOZ4I32kg5M/H8jO3UsL2v73bQqxFHzOXAmFYHLU7vS0PIHj542+apTEqP4XlXFgMf3AKBA2xAGi5hrDU0IEA1ZKuRMX3RPPhWcZ+9Dv4bC+dz2j0RuXICvsHLv5chbv968DGAryKqaU6cIdDfskDCPJxvr0W/zVFk+3+yOi/ySaMhJwdOfhdwshXDht+yrEA8CZWvwyUPmlalKsAL6ebmbm6d1lWHIu0W2XBZKBpCw3WiXTxcLSaNcF530Wxu+O47fEMpr0r7WuYbOjxfHJnCh8qVSTOd+3tk9oHLCDGvn6rAUWUtsXfA0ayV1/HvfF0KYzlVXyt58teyNP9Q== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=aouJiSuYZojI3EhVijF7uNSdmhFEgLeVguKxHE5D19t7NfAX2+Dh/BQ83wHKKn9L0ADaJRx7xfISOBCPw7EV3Xlnaa2Jpy0hmba7Mjp/LaVAwO5E+/YSqQN65pJFiUh+v5EWODXhCxW5a94rofNX4BzOP4fSKKNIerCGmMzhfUpzT9ptFxRtQJW8/rz4lLPktWDBBkLdwkWdQEeRMCsWAM4m1HTcQYNu/z+jdD1Q/AB+B+iOHo3lX5YYIVJcPXRTznM3y18O3CZCyVMwC0/WgXXojig4h70ojCTKtkv9ugL387Hp9sf5q3FcrSjQlscIwlGO4ojrSWYviY1SHWii2Q== 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:15 +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:14 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/61] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:50 +0800 Message-Id: <20230726040041.26267-10-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> 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: c3060b5d-09b7-474f-bd66-08db8d8cf4ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k8R3niK/KwdqiYbcLa/Jcp6/5u/eKTE6nj3Agyuq43xOrR7QXqk9FZkohWmJydeQGrf5MYrrQZgHR8GjOwS0T4QuSqNHdASDz/UNx4h39ezNN5F5GVkzUC8QgHVLsaPy4ZC/qd5P7XIAeE6lxEc3ZqdK0N83NjfzbGsTGYcjpo/apndyyVQ4u31rSDFF+HKtsu4gTEuQnA8/3ThJN3AeIsaTLpJP8expZHcqYROGra1351HH+vbilb4YTYy2859tP5y64B/QUnBVPahL9wW3X05rrp6fCTZVL5dgtLUj6YxmekTHEmLFdsoLVNBij3VsW98DXG4DVfXEsh+Jcp5uw7BL2pSuroJCHS/cZni1i8zfscxCWyxZq8n3WplW1/fuFp1Yl1+nGxFSuzerJc8xriW59mc6Xi47666Js82qyKctBoa3GtlAgkRu1QaTRAjTpeLFpBb0RB4LlhITAhYBRXrD8m8ox1k9Q9rl+gIi7pJJHxydRzzUNo6CeH2vZozqDJ3cy94kGgaoZ7Md0IH84+Y7+1bk968yYe+bd+L5xhDbAvpgBdlxOTJ42u4EGvRxOQYASMpvfLtqDfzqM/+QUDXxT3dsXCdRSiI/L0kNzR1ubUFU1dYAf19oOcxcTdMg 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?5XvgmEJXR0suN6k7xKORi/9iHpqP?= =?utf-8?q?ZxFRynU5O3sFeplU5Bdr6DBu7Lq7fMrJMDFC1+sjK//rau7DLAcc3n2sdmY36h7XM?= =?utf-8?q?Y8T9uDTjKAnnKyswJFtKFZEptN0AmM6+Ko/Lod4GEVq11yGHttPzweibAyDL2EAaP?= =?utf-8?q?erNbME3Q4BYyd2bR2b0Fe2/DrCAhqtkMIA7RLQ/U7JVGN6sHhTVRluT/1zAwPJYqc?= =?utf-8?q?7DK90hj0q/pOYffZyRdad5SoIROsD8aCAFCtcqohz4DeqyXaZecLgHq7LyTGOPMEj?= =?utf-8?q?8Vvf3uvK0JbfjFMTGpFyKoW+/Ude9LrNpKjJHZ9kd/vNmaT5/8kg5W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2JsKs?= =?utf-8?q?BK9xJTnKVfPadWX9z12jqxO8yRL7Q/m7jOj22zCjLlGZLURP3FLPHvPZG8ZaHrRfK?= =?utf-8?q?J6msYD21rsgzi9i41QEm/SLkcekNTB+/qwuY16riGPbkS2j8h5L2T1zZWenXpYWLI?= =?utf-8?q?yh29oGH8wjPaq+Z/buDnXeGWQt/WpgadUH545Cr/Bhv6mLBsu0RZRmUflpdED1HwS?= =?utf-8?q?71RxsNvyKQNaukd1dUlD2qdCH74nyJTxdIXbOwKIX/9qsjc1f+tv2zfp6dcaXq7Bj?= =?utf-8?q?EClONOciaDfeAq+X30hxEQ0aRp/8//sq+7A6+1NCOddF7bjoIBDNnGim3FbmUq9AU?= =?utf-8?q?Y6feW5DxALA0?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3060b5d-09b7-474f-bd66-08db8d8cf4ec 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:14.8460 (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: fo6SFANs8pguOoX8V31eybIUYYyhIwjX4h78o2aIFOcFiQrXns2QvBRj9tloZQoQkgIRAqMHy0UuXS+MjYORpQ== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772454515939948642 X-GMAIL-MSGID: 1772454515939948642 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 Signed-off-by: Yangtao Li --- drivers/mmc/host/sdhci-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver);