From patchwork Thu Jul 27 07:00:01 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: 126724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920106vqo; Thu, 27 Jul 2023 00:34:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJe8GWvBAcJi7CUCCusysHqPrh/OzrgB2tFPMLLgAp+WB7Kn+OXWSQL/n4uJ456uGDGXPS X-Received: by 2002:a05:6a20:a11b:b0:133:cf5c:4d2e with SMTP id q27-20020a056a20a11b00b00133cf5c4d2emr4476291pzk.20.1690443291278; Thu, 27 Jul 2023 00:34:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443291; cv=pass; d=google.com; s=arc-20160816; b=w65xWs5GWAmWq6j34r7xL0lhQZKrd9Ivz3UNiE4Dbraq2EkfpH67zt+D2PazkjcQPY D0N/GIeqOCUcT+FcHpBms7by25HlHOQaWWFeLF2skmrsBY1cOtyWnZgavvvgL8Qsr8RR wVdvqrLBz99LHExueIkxeHc8nmJOH4EmIFh2usTwi1oLImgFrGB35xjFhFO3a7sVKSEZ hJcsF9QTauBHQ1Z/4vG8F/5UxmWno8+WjOEQy2aGZ79C2bLVGrGzqE5uzbF93uG6MHur bKKM9zP0jJNkoIR8U9bd4pXIIIrHLVLlwq2aaHftmatOk4JWfFbFdcLarRPb3J07kZa2 KsFQ== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; fh=ex4kDErS8i1M+dOxrorAhj0WFg32360p6UGfHmUVWfA=; b=aqEzUFXswVoHYcocLsJE1V9tGUCnj5YZ4AxFGFjL3E49d6grKn+cGULlK+33AUH8QZ CXuR1YYDwoImM9dxWgEchawB+yXzoaznD4zRsHOjzMx3fkZljWkIa6teywY47jl9hN5E +2hSE1YXuOvwMOMRgFXNR+U8Ck+LDuyfTJVSHNFRAgxU5zkaMv7k5L6qmupzAVG/YeMk ngDqP1BSAlYpI3pVOXavcijAbM284MU+gInv13Z4WfivIMihXMp/VV63lBB4PJ5Vq+fk 5M1fxrkO//1Vk6ThL74i8EYzkX9onGsFntynLWwF1pAqcTw4pyXSP13b9z7yIe8f1pie /NbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=F1nQSZvN; 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 b17-20020a056a000cd100b006815bf78633si992732pfv.315.2023.07.27.00.34.38; Thu, 27 Jul 2023 00:34:51 -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=F1nQSZvN; 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 S232985AbjG0HC3 (ORCPT + 99 others); Thu, 27 Jul 2023 03:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbjG0HCO (ORCPT ); Thu, 27 Jul 2023 03:02:14 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD30E2D59; Thu, 27 Jul 2023 00:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LoPNkdNf3CwBF8fpYaiIjivGUhuAvSL1Q+fswItYF95l1wJn6hyZTK9nWa042TEgmU/T7GUO7ekbxL0csiFmQdeWMrSoiHWYta13N9aFXCJXpry2pWlso9LK+j681M0EBjRQo6EI0dkcTOlgyEecmsOevHFaExgWxGZrtcbksohwFmUxL4e0i2JqqlI4BtLqz06pe40UDvSGTGiUrBjGNRNmFsiSUoycn0k3UQ3afKnlt9VkUuY5OKGimZT3R6VykLY0TLbC4CpXW6YRglfNj4zoWzTap2IOBdGWceiTdWR79lj4sQisPZbU+7zBrv+Ty5myCxErfIk8OZve/tDaGw== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; b=hztcn4MBj7Cj6blueolPyd5+6VNLPFBdigPSEhOL1j+8B6f1G1INBeaW0ZYp5ydVHmrN/ytsY0CVfZsdJortCwrkEiMpTi8n9QENiV4rLqJ0zbOmuFOzgIqIOfeZ9fjqCC1BEbUFBr5weJN6PUbJHBLQB7lpY9MiiCXiwn4tALfQU0HAf8KNk5tRMHFlG+wQBNFlG1HQZB0Li2BKfBs4vfzpvwmfaLScFwr+yz/dCKqQUWiJebB4IMJo/oQVmKNyu1kr2ScPDHzvEEb7iPrVHaT72sn/j2QsAIWG7WAGCC5XJH6EJ5NShUrTXAhAAzgcTJlMjb4kmetK6Y1He+iMaQ== 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=tOU6V6CM4hDWvK8Wspv66nRWzHcyqIZmd9G62GfyWvg=; b=F1nQSZvNtlxnABkzwvxiM0QQLI+q96F6VAJAtYbnOLMJlDlNK9YO+o8U+QbzMLGi2RIFONF0D2BrpX1SHjRfBSobGEj06RjwbSwSu97ZOFrjV0RHc1tGzLhrvkC452kz9nZfNmgeEYsTo1bin2xrrkEI5A6oGXdqpNnOQwQLdHR7qqKYXCcewB4ygnXvu1jhkd/Uu2ZaOCa/1g2heMJnDUCCBmsBNsCtHbKva7sO9jqWd+45nNynVWtP/4whVzfMR25G2agC4PDm3oX7S8qacdIMORr4rTQLGqVyvpiS3l9HcH/sjfKYDkdRKrj9c2RtEq19KfCbqNQOqRLc0d0pUQ== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:22 +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; Thu, 27 Jul 2023 07:01:22 +0000 From: Yangtao Li To: Eugen Hristev , Adrian Hunter , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Claudiu Beznea , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 12/62] mmc: sdhci-of-at91: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:01 +0800 Message-Id: <20230727070051.17778-12-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 74e8dd74-8c5e-41fe-2850-08db8e6f48f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HHQzDhAkjaF1gmCxf+M2t3UJVuxarh5r94EW5lScEcLf5xeqhbOV4gWZDpwwYGsr5L6JrMqojdSkYr4yUNugmbkUkhtueDDydqIbdubUa0VKz+/8RUzB2TgoJyurztbj6+18LA/Q6tcvOxL25sTFOVQWlKBeLMF9Jfre9gT+ItI/uv5WgWXtrMzht7d0LUctlNizry5ICqOLAA5CSys+JKX9lB21Y696HIZybSmqMK/fo4j1PD/EG/S6hD9mbxojzTqfdtyWUp4GLrjGKedjZpTdeu109b4b8GAkiDh1ezYm16UnemxHd7WDHDNGqJ1FB6/NDUTdeHdGGIr/LkWfRMKcMQ0przqRBzPZ7j38uTAYnFkmP21URtA8p5/rJgp0hDs3G0xdsW8vsYxnTq/h8Y0Tn2F7771RQrfINy+GTn5wp7gl7Ic0K/mivhFYNWKRvJ4lGik2aNoynvKQxe73d8aLCmYAfWbJ8s0kbKUC2Z/vNbDlGpXQMJ/uMM2ukxJATIfymlvt2coMtg98Elcra0QA+UZgx0iGXnl+wLdw0L8KFFvt3h54QFObKaQ+s24dEUqSjL2sdQadr4LfQgD44zc7C+wV6j+gWPEVKCclprsBtivCRIQkdQWfNKkKHzlc 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?C5SLUL0dvT3ASCWscxb+hD35qj7p?= =?utf-8?q?cYdXJ1l/vDsMyF2Zf2UIeNbDGwjR4za61HA5eeOB0iqCGm1/U+H85azGHrXrO0mKA?= =?utf-8?q?CdFDztRUCQ789uwsEeTLibyNOpjcg22x8LggyW56O7Sc08Aq/E7LFFK1G5cj3gZij?= =?utf-8?q?ed94pTeU2Sr3r9yuwRDfzrMlTajkLmyz2G8yhsu4LTma4Mmtp4ROp3PDBIzQQEMrp?= =?utf-8?q?SGWGSRYEUbi0FDfcWjjmh4Ody0Zl71dQRne+6WUhgvKU+FcIms5IHF4J5LWfeGBxO?= =?utf-8?q?NU9IQdFKABljh+5UpBWZIAozO6X+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Ua8WiGC7hnCf2GVivZ1SI/DNV4amVEYteppmVra+ij?= =?utf-8?q?lTMwj04y1z5hVdu0ak03PNLp54w4qVa+PUqtn50JQLCVUwOsW9v4XndrJO7a0SJ+6?= =?utf-8?q?1aHJJijSCVGXa1kuZ6bsvpqx+89yHiUklHUbYPJXwUeOCJ6aOkz5VqA4AmbNqO92G?= =?utf-8?q?bgoiu/OrSwQUxkWXvXac6Za8Rp0kT+UgMQuK4zWmfqZUwu+ZmHLL118bqHCYciqVb?= =?utf-8?q?Lzqv5UVNtJvCgs2DdX9gDZms6dw/8aaU/lvf4KbsbjVve3KwUjI66NFVOA4khdRJP?= =?utf-8?q?d8e2hOlx9P1IxDrLC7NbgtnzBA58SMdNnpofAihSlvFI4sYHTfDelJnVsBTIm7wDQ?= =?utf-8?q?bZLJTz7j9VgM?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74e8dd74-8c5e-41fe-2850-08db8e6f48f2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:22.0611 (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: 02Iq30tRozaMujh21xEbKBaOo5gcD6NiTdPSP9sP3wOw89rpf4ohtEJs2AulMxBIS4zC66Pr4kSfvDEHHrwE+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558264806152080 X-GMAIL-MSGID: 1772558264806152080 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 Acked-by: Adrian Hunter Reviewed-by: Claudiu Beznea --- drivers/mmc/host/sdhci-of-at91.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index cd0134580a90..af5bc0caf29b 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) return ret; } -static int sdhci_at91_remove(struct platform_device *pdev) +static void sdhci_at91_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev) clk_disable_unprepare(gck); clk_disable_unprepare(hclock); clk_disable_unprepare(mainck); - - return 0; } static struct platform_driver sdhci_at91_driver = { @@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = { .pm = &sdhci_at91_dev_pm_ops, }, .probe = sdhci_at91_probe, - .remove = sdhci_at91_remove, + .remove_new = sdhci_at91_remove, }; module_platform_driver(sdhci_at91_driver);