Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2073742rwb; Thu, 27 Jul 2023 01:20:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGz+EqdKV2vkmnWOdcKMunAtZInaft69Dy1ZUGUKfZiLZwcjXgEToz2NnsBBbXhiYpLuUra X-Received: by 2002:a17:902:8307:b0:1b8:76ce:9dab with SMTP id bd7-20020a170902830700b001b876ce9dabmr3121685plb.41.1690446056973; Thu, 27 Jul 2023 01:20:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690446056; cv=pass; d=google.com; s=arc-20160816; b=v4CsxxXbYo+8lfr354a9JzZtZu//kW+TIgkOn1JdfjRfo2J3aXfD6+ewaat5HhG1wU AT0bETvKoXTjnVW1XrZnnZy4nbXTer8mS8Gh5HsNbBctNE/Yk/rUyflih18AGNz27WRp mDSvlVTeWfStCUgn6h1Qq290qayzmrRCo92XJehN5qWnhT+3QYGHHBx1nm8Y7o1IZRlu KsS6bxkNnok5G5trFa+l0LilLdKZXhQr5x7/3WHMcl7Se1X7t/xVtq7RQmY9f6scsj4x f0ih9rv+UGidkfGXNpPKgJD6J58npofk9EH6VFp1y9xG0poXXcDYFSvVH3g7GY62RfkL d5kw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a170902d2c200b001afd000029bsi1001535plc.581.2023.07.27.01.20.44; Thu, 27 Jul 2023 01:20:56 -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 S232979AbjG0HC3 (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=20Kleine-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?B?QzVTTFVMMGR2VDNBU0NXc2N4YitoRDM1cWo3cGNZZFhKMWwvdkRzTXlGMlpm?= =?utf-8?B?MlVJZU5iREd3alI0emE2MUhBNWVlT0IwaXFDR20xL1UrSDg1YXpHSHJYck8w?= =?utf-8?B?bUtBQ2RGRHp0UlVDUTc4OXV3c0VlVExpYnlOT3BqY2cyMng4TGdneVc1Nk83?= =?utf-8?B?U2MwOEFxL0U3TEZGSzFHNWNqM2daaWplZDk0cFRlVTJTcjNyOXl1d1JEZnpy?= =?utf-8?B?TWxUYWprTG15ejJHOHloc3U0TFRtYTRNbXRwNFJPcDNQREJJelFRRU1ycFNH?= =?utf-8?B?V0dTUllFVWJpMEZEZmNXamptaDRPZHkwWmw3MWRRUm5lKzZXVWhndktVK0Zj?= =?utf-8?B?SW1zNUlIRjRKNUxXZmVHQnhPTlU5SVFkRktBQmxqaCs1VXBCV1pJQW96TzZY?= =?utf-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S-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 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); -- 2.39.0