Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp529234rwb; Tue, 25 Jul 2023 21:05:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFhbnN/8A1n8WyYv0yP5vjx+2SG1Ilnj4OguNyU5+9Vj6oBMu0a2u/7rpzxHYWCc995z28D X-Received: by 2002:a17:902:ce8f:b0:1b8:15bf:d2ed with SMTP id f15-20020a170902ce8f00b001b815bfd2edmr1184863plg.65.1690344304546; Tue, 25 Jul 2023 21:05:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344304; cv=pass; d=google.com; s=arc-20160816; b=jZ7eC8Y4ZL+i/k9Qlj2DTzeg6C7FWYQP2NlZv0qQVbQ19ZLwz31s130Du9RpBKB/lP I028QBcK1zvOjL9DLlSPsgqVqkbltqSiJMTiXbpJWAOlalIRYSEoKsHlCNyaSr1N/ofp 5zRb/4CGjQVYrycn7JjwUC2xrhjFqjShnyHXXowUu9zvBglxNUIe53zMALPGX4RJNLwg ue5dwJO9Db6/hIttpXBstHHImuYVcD7Mdittm233whhLJtdItbYsOeTq0DvaPI9ZDHBz D0M6gj+Muvh5iryKfUfj5Ra1u/eWhrTx2/2hbCUfdB0pmJktQqORuSYGk6EG3r7w19vA FAWA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a170902bd0400b001b9d34dbf63si11966444pls.375.2023.07.25.21.04.52; Tue, 25 Jul 2023 21:05:04 -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 S231479AbjGZECI (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:08 -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=20Kleine-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> 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: 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?B?NVh2Z21FSlhSMHN1TjZrN3hLT1JpLzlpSHBxUFp4RlJ5blU1TzNzRmVwbFU1?= =?utf-8?B?QmRyNkRCdTdMcTdmTXJKTURGQzErc2pLLy9yYXU3RExBY2MzbjJzZG1ZMzZo?= =?utf-8?B?N1hNWThUOXVEVGpLQW5uS3lzd0pGdEtGWkVwdE4wQW1NNitLby9Mb2Q0R0VW?= =?utf-8?B?cTExeUdIdHRQendlaWJBeURMMkVBYVBlck5iTUUzUTRCWXlkMmJSMmIwRmUy?= =?utf-8?B?L0RyQ0FocXRrTUlBN1JMUS9VN0pWR042c0hoVFZSbHVULzF6QXdQSllxYzdE?= =?utf-8?B?SzkwaGowcS9wT1lmZlp5UmRhZDVTb0lST3NEOGFDQUZDdGNxb2h6NERlcXlY?= =?utf-8?B?YVplY0xnSHE3THlUR09QTUVqOFZ2ZjN1dkswSmJmakZNVEdwRnlLb1crL1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d8cf4ec 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 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); -- 2.39.0