From patchwork Thu Jul 27 07:00: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: 126715 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp913745vqo; Thu, 27 Jul 2023 00:20:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlF56Mme+lvFiMVpFGdjY2a3ULhkQlBTtAElUUt9kU0EN2NRrOQO8LRaLUsRQLtHHCSCrQhb X-Received: by 2002:a05:6a20:7f8a:b0:12f:dc60:2b9e with SMTP id d10-20020a056a207f8a00b0012fdc602b9emr4931796pzj.48.1690442403976; Thu, 27 Jul 2023 00:20:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442403; cv=pass; d=google.com; s=arc-20160816; b=PEE5ZQWtecuVaK1WXNPS3P8a/bHd3RKZSj0wo0RC1UBAVyQC2lrz64oxkcwKKLOS1T a257t+TiGUAe6gZOkhvRajDorQsEqNo57usvjI74mQjXxJ+J+IEsXTbIlvo/PazNI3nR RVYj+St9tq3M8udTJKcUGX6Sqsm/FkZnKtYN9WWZ0lxwlWWYqHvAfY+qXxN0Wkgy5i/c L/BbhbForj4YnKfb40UXpfNsJybWyomou0Yr/VjiEwEH2/QEfLo5i41s2rjJO9OJosA4 ngg8ZhcLNplGhydDiYuCLLiJR8f3SJlYhJEPIPUFG/uo2DibSTvCtVkAyZJ4h7TcX0FQ zVpA== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Di8mg5T5caWeV8/W4ortL+2HvZ9N77xZnMRFeYqnBrlA8fimHzEBhqmOApEO2W98T+ +E2RivRrGhOUGy09W6vyM+wNxw8Xu011dKwridUflB2O2l9dvpCSq9mVuLlf5Iqj9kkA a/pO6vGZl/E6vAA1A2O0muGcpc0XRXOlJxvQFQlcUKXW3j3Ff3VX5JYscNqeciPq9qpP eG1KcTFk/2zW+OMx/16o8DgeMvTdBV8TyJqzYh7yXaGm407wzt3aeSuDFWlR29rYOb45 TjYcBQ0d81Eol2SDNYa54irPSL1RGXvU9LXIleijhAp27sDx/CSe3yKYEjUrOAe1AeuV yssg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fa5NxtQj; 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 t33-20020a634461000000b00543c1b14062si844697pgk.79.2023.07.27.00.19.46; Thu, 27 Jul 2023 00:20:03 -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=fa5NxtQj; 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 S231750AbjG0HHq (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbjG0HGs (ORCPT ); Thu, 27 Jul 2023 03:06:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2090.outbound.protection.outlook.com [40.107.215.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136F72D63; Thu, 27 Jul 2023 00:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dlcljh/lY1roGLeghwutf9d3JvuGcx/4TiVIW55p02f+xu49b2MTfBQOniUPGikCXIMJtelOncn/gMCqrZQpQQ9huz9+JoOrWf/D9cE0bmwZsm7jcQaS62A3Dv5k8khvmYtqgNNZBE3uYt0APaTqnvkhm9iELlxG157o0Hav8jjqHacQmHL/W5SMTWTb/WaD0s09PFaWWLqYRyzin0lipEtL1lWGNe2tDjwLW7rDgcvlcosSXBMjPPfM/N9RVQ9GCMs/nqzC0YjtzAdDYUqzj2+mbeESGBB7lahvi4mDHN2ycKwjTtFX1CpPAKkBibQGYZgsBqeeSXGlktyYLJVQTg== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; b=KOAOPs+fIAV9iDZ4amwmUmFAMHR4HUow+VBhoHEYY5IUlahA4o7Uo4a5EEm6wGpuBNUA9qR9zQnSWouI7X2hdvplZ5SlmXgXkf3U36hYpWM1X24gIVKLfXVPxIGxjZ27SppUFV10Ru/Eqw7U/kDlwpYIsVlxE/cOlpCvntZXa/Uwe2R6qQS5SAaZgGBnNeHXYOWlewBygaw0BjqluN+ywLDNmIfNM8fMH0TLGN5C8q3D0j6EDcIJoQJc9x5tCmQZ/mPRDghZzJHbFdFiPFvkiU5ANcynuVZRcswD0QaVL7127cGIkc+xTi0+CteDTbb5r5mfLQbUuZYfWW1NknniAQ== 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=UgkpH6iKKcR7a4wKXniEGd6Oga+gRHlJdFEF4UCfl5I=; b=fa5NxtQjNgF/XvnDgEBbKlGpeuQhPHR4vKWfCYlUW7KVHxLPZNjFnRDlmM6nmfW1VLq5cWokCbzHHB99N/ScTBgYL47xVEeu/jrUoPkHROZNiYyINEYORdJt6xp/loG7YII1RLqB/qhncUfB4A92PIt1T2st2HKaqL8PO9LgOsttTLr99W6ybVu5Bgknl69q6+kvCTkfomAscybFmmw3ZkD4UwQDfe6BLbGKwVEzJy1n8T0voyCrXIMTbTu+IJWKTTrFj0aMrktAf9rF2A0AjdyEa45dF+tsxiwa9XHDsV0PepXimOyh8i4PJ46iVvKPaOxhYaf4DvHWhxSKPib0mw== 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 PSAPR06MB4152.apcprd06.prod.outlook.com (2603:1096:301:34::9) 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:02:47 +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:02:47 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 61/62] mmc: f-sdh30: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:50 +0800 Message-Id: <20230727070051.17778-61-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_|PSAPR06MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 1212ea1f-6995-4399-47e5-08db8e6f7b46 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o7B9fHdbSVjtabl/FnTD+NnstSLfwtNZL7JOMlqHsCuDOPjG2YczKfeQ6M7CdTRiyU9LBVZZb1Z11p6sL43wwjPz2PzNrrFc1cXEMuhf1A6wIDLmLrPLBChNX7SvK1tXmwp6pqb7lYgEqAfFiyrpOyuGuFP9dkWGpsUvEZJON+QhcApGkWlB9CNkiycqUt9W/+M7aAW9CauEo1+dhkMcahtTEoryngTGj7sVZrt7nvY/Lva/zRNyPiFmXGkYXaN9nFHtSXkUnFiUQqza+Aa/sa8oVSBp4Q/EBHRMKWkyh83cAy+pjL3GB0twFe0+6GCNXSQyRcYPuKKuZOadLpnHck0DesRlI5lMUT49+9wWtuJgdnMS9K857yv3AFBF/I7UEhwhS75oKUdzKSKACTUgLGhXpU83Ufcqc/MAzmMHl6jQm7WfBCgJmM9wiX09pfunwNLa7cTIKBB+Mmxo7Tvzk2Ml8YrSKMSLZctMMu3w7Wq/NdorqYFASfl16oEXngj7/53kyyiyWLqzhgCSFSF3PDj+aySBCFaC9KNGa98Sod4jUrH5ZBCpF7Y/KTpPfkqdqsg5pJpIQl4xhqYa+Ew/FlFMpiyNhhsl7mu3kLZiubEhTYPXDASxWIxOdhg8m7mQ 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)(366004)(136003)(39850400004)(346002)(376002)(451199021)(6666004)(6486002)(478600001)(52116002)(83380400001)(26005)(1076003)(6506007)(6512007)(38350700002)(38100700002)(66556008)(66946007)(4326008)(54906003)(66476007)(110136005)(186003)(2616005)(5660300002)(316002)(8936002)(8676002)(2906002)(41300700001)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?drFpk9SmMR1A+Qchkb2ZsPf7KGRP?= =?utf-8?q?CvV3dp1ST4QjpumpCDktChqHExPixfIGICOP8WO8ECwLFOsa5qDXFRh1dgH+7BkMi?= =?utf-8?q?bg/0SdFei25oyAQSSmsTNNFuc88iafgAA/YyJmg3DwcNVacUckg2X6WMd4fst29G9?= =?utf-8?q?0L2IML9wlnGVRVzL1mMWl/LHTEx4Fohb8ljXeN8Qu7H5vf3s7fw4mvEfxNanafdsT?= =?utf-8?q?BEwSBjvBv1bgAxdaCSAwNA3YMJzkApieU841bI6HLhHQElngI5fQdMzF8vkE0+6k+?= =?utf-8?q?guR8zwaG+YufpHPs1gGqcyGR4EFdgzNKWcvjjcf1ntpV4O1LMZyIJhDVkjAhFFRXD?= =?utf-8?q?fEG1d6KH7De6atmCnOzSW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J0ZpgEZq4iGtBK2bSCjQjvdA9YhERTuEkycGQHz8glZVN?= =?utf-8?q?U/c9qcGDLrmyLYAB2IrMoF4qkjX0AmJp2+EPzchOE3qeM3IQSPO4I//AF6jiAA3K2?= =?utf-8?q?ZvEZXFCllgo7Gghb1+yTUffJAIBE8FSKxlSGUNS52tgla+p+BOxBIsBKxFLT4UQSZ?= =?utf-8?q?0HhcoWgBbQlA8jiDzkbyUxgKYB5rgln6xkC47+L069SWhM0EaI0NyqpD0U+VcYWhZ?= =?utf-8?q?8SjWrHAtKD6GpZfUJ0s1oT/uPJqZaPazowU2DFJ9l/LMLYBhFrAEMguXZFWHGzIyz?= =?utf-8?q?mKqmmteSq1Nf?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1212ea1f-6995-4399-47e5-08db8e6f7b46 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:02:46.7675 (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: BCrOr199+mh8cbOIIhI4Kve+/3kkp3YQ1zZvXpAP1XICvWCW/rpNM+6SnG1p7YwBaE/8wuisImCP9h9KpxerBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4152 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_BLOCKED, 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: 1772557334134504286 X-GMAIL-MSGID: 1772557334134504286 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: Uwe Kleine-König Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index b01ffb4d0973..840084ee72e6 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) return ret; } -static int sdhci_f_sdh30_remove(struct platform_device *pdev) +static void sdhci_f_sdh30_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk_iface); sdhci_pltfm_unregister(pdev); - - return 0; } #ifdef CONFIG_OF @@ -245,8 +243,8 @@ static struct platform_driver sdhci_f_sdh30_driver = { .acpi_match_table = ACPI_PTR(f_sdh30_acpi_ids), .pm = &sdhci_pltfm_pmops, }, - .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .probe = sdhci_f_sdh30_probe, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver);