From patchwork Wed Jul 26 03:59:52 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: 126067 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp167939vqo; Tue, 25 Jul 2023 21:24:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJLZuxnFQG7pfPwAuPtm/4Y+p8ve4lJhr1TjBWs+UYW451kM/v+F0UqbSP+i/BOk3wU9v2 X-Received: by 2002:a05:6402:2022:b0:51e:309:2e12 with SMTP id ay2-20020a056402202200b0051e03092e12mr545033edb.28.1690345458951; Tue, 25 Jul 2023 21:24:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345458; cv=pass; d=google.com; s=arc-20160816; b=vp9zpVH0DlCbd7B/hKIN8MzPBxGkwYBRr+qZLU/VgNd9DvVYiwXcOiMJXcEwcsNKOD 48hNjbReUdszIFh+9cA67cMADeSJRPDHCH8NiQpvzQIz4icyMqMhrra3Yi707IuvLCez 7KSDykk+WWg9OOudb2kuIKdaH9D0aX9rm6tXGvzZYQVsE0WG4aS9haMfRW7KAbt0PVmd MxiVm2aBqtV54WCvyobdwOsp7GceKs8t6TTRpnEMXfzuQylhSVep3RRrw9/8YXLEM4uW ceAs6H3QLzw6fQpEbr0pAx4faHWLe+52CB8/uCxmxul8XN4N/ol3j1v7k5TLMS4/6ujg ijjQ== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; fh=fKMVcxEXyR448PAR0ORcEmkzL5SqNRft7iKHS6hwUKc=; b=nn19Xu3j71VdWvfomI4cAhxwK+OJSNSvDuO1m2FqrP0CKVVSI2eZgxsMdT+CqCZkz8 OrxhdASuAgBWWp1tjGJwcvQPvEk0wEV/om7NrPlOHRNbs1/nV8E5Jke3WXnTcWr3WaNE RP3VWJcq6BHRADWLwXVUgQQIRFgYVSIG4TrXoTWaeXRE8694PdEnWb6TxJXVH/1GQ75u rHEKqAzLWLdQBJsONyHUMrKAIZ3jZQvq7OTun9EOz1uqr173UAo1i7am7Jj3M2D/U/uS BjLcwreOKx+RaSYv7e0KlpfQtKazqH4felgPmCe0SyTk20RNlypP91gow/VhATRVmVHV aCnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=j56RiXgV; 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 x19-20020aa7d393000000b0051df7c30429si9338307edq.239.2023.07.25.21.23.55; Tue, 25 Jul 2023 21:24:18 -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=j56RiXgV; 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 S231510AbjGZECT (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjGZEBX (ORCPT ); Wed, 26 Jul 2023 00:01:23 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A1B11F; Tue, 25 Jul 2023 21:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UBUNuf0hDtZV2xsTwMuQDlIT6tjuiXFlztXl7xxmp2pKjGEVRX9nAcBWZBMT3Qlnu2/5oGe5zN6umgoPlZPhZPGORj/n1eoSJQnuZ3Z6tFnkZkaKsnf3oEXm9hDLdnHOajkMF7IDsRsTuChpk7JFD4n8CVm1y76qZLRDCtkY3MkHDb7G19Bjc9sYUJM2iuVSAErnsBDMAT9NIkVKupthiDvkI53NS3mIml8RpHmGt1ZYtKxkJ13bOUUkjCZEkHePVXqZu50RJyX98qRGJv1usCddJynjWgGJckTuLQy12NuMLtHJRXiaFTI3t7yZvaAe26BtVeHi0Cp59FUb0FIQqQ== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=YZXIUW8jqtLFfMmR9bbzBqAq+t2QjHJDl8YTV9ZPTjjk1PUd47zQ++j9AIIBdfKuE2ub0oquPXuz4IPbLfB/xLozBaTPQwmCnxRN2XzEr3Htivu0stPPcZh9cIpu+k7t5G6Php5bLt4zCwv28HcRtu4rLE0Mi1MhFYMw8Av19r9qMvHNUly0ho36r1ejZ9G2Wbbn9kpM7RC3mOTfTW79HEgSBPR6QyFHcW/XgvI541nB6PhUsG1Z/dEb2LWp4BFlk5gAT4nZdO8C1oEhm9Djh9urlKPECWA2n29I36ew54rC97L4D/TQwpBb2t/WtMi958BDC2J4m3aKebenc8lyaw== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=j56RiXgVdwAPpBaP65ZKvX4BnSRGMOlKIfRxQQeWvTWP7VazzfliHtLoGccGh7tYV6xsf4a+Q47cv/0G8NRVSq0ukTK2r8/12n19AnNgtALFIsBr4rC7nye847dyc3CewiqgI7mnEVoy0oIqtKgrIRvwS+13OjzMYsTYQKwYvcGJQdAEBC67qpWH+j+HZOOyAUjRW6esRm6HdKSOL0h2HRr84PyYcmnmeiib0uqDU6c+2rIKKO/9S92FJT3s3H+xsCpghk4A+PnosWN/bJGXOLowoMbSqrjK0+mtUXaCZEOo35skJkc0C+PPYVZEvfK+FDKYK8Adh11+xZ55CjAjVA== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:18 +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:18 +0000 From: Yangtao Li To: Adrian Hunter , Eugen Hristev , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea 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 12/61] mmc: sdhci-of-at91: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:52 +0800 Message-Id: <20230726040041.26267-12-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_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e60ac90-e227-43de-159d-08db8d8cf705 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F3ICjyOkbkW4HIDlCry9+qm2jXZ6xXPm7hxvAaCrYncuQwMyngLp1+EQaUZnCY1KRNDPxULpTwcq01qp6Bu+faBaBcZns3Rd9un5KgGeVlRc62uA+kpoHGfGXxbU6Dfgnnh+I3Y01n8GO88whnDyFTzBpQq6mOKJJ5msx2+oIB0/oVUDMla7XlYIs+7UD4FnhwBMgu9imhB7hc+YL1G21ldHe9ZO7FJgC71McnzCFOLV2JPwz4X+9tzI/zeCjD6pgffmN6J76z1p/VEZHjXCPGgDgOywqL3m1Y0j+4SkxEUSSfbaf2sA/+U+/Gbz5fj3CxTXY7Db4tTbOkP1MNLQed0pZk3eenaKGf8p0bbTlCigb3xZh0uRFVxvFbuEDSBVpMH3T2rB4GIaUc6OoFo4rizAQjICsrPLFUbyE0sQoHhy0kyc7C3lEt/Q1TjK92L9TpxNf9/AjNImRbaKaydnTigHi2n9ZkWtI2PRNmdra6T4xqPUv68NzH0SNYOSB6prx++sqFTRmftYuIkXzXAKenmYEj+t4vGY9FeDq+5krYUG1EP8k6LFrWjspS7Nqs0Iyi3cV9zs8Y0NUPljoEPzJ7j215KIOystgqMT9rROvCMTY1MAfXO+Rx8oZS8yH+d4 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/xE4/Cc7Hn8aHt3T6DZoEB3yAMMM?= =?utf-8?q?o6v01nQpVVwn8YMqSIdofW8HdMW9b92/oZNdGqNJcMWJxc5zk/5XX76mi5vU1NJUN?= =?utf-8?q?40qs0HFpWX1wkQuaMu3BF2GW7dnKUmG8l7v/Ig6X6/Qlnu/2c9PFEPTvdg2p/CVZS?= =?utf-8?q?Il2v8mpaeofBjsDfC5SMhj6RhUkyKEJp4NjkGzcx3uKukEtG+wey6Z5qJzH8M1Owh?= =?utf-8?q?O1vfOtUgshQYy43UOUAtj4fZI65ktjnBgWE5uPylrQ1Y/FL+NOd2L15VlZ0Bp97yb?= =?utf-8?q?RHpMb2/I8QBu58oM8DawafRy4QFwYvBc2Fsc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fW9XPyLa3b?= =?utf-8?q?0Vp0UXDyLmKU9EGOkhObSArKCkV99stTDBDEZwWrz3qhPi6mKaAfOrRwWj7d+uPoj?= =?utf-8?q?z0pfhsaqwm1q8ICnUkiMgraOQxwYltpcE0U/2xM5f6zwcVGso4sdzuVDH2oUNNR9d?= =?utf-8?q?GESbbfkUMgMuaSkahEY/JfeK3V0MwDAYFl/cm2w6FlI9mFdXan98C+qMVB1e86M7W?= =?utf-8?q?fh4QiQ0Q0jjZLVw9Tw5c1wGQqwMsNjXMjhICcPM9yB/uQzfelQC33XfzDpdTzApI/?= =?utf-8?q?1Wmay09CtByhNx79egZGlYlXUJjQZAd7xcW8M37YT8zNlhcDlX7NJ0unTRK2dpVC8?= =?utf-8?q?qKAQV26Bkt/F?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e60ac90-e227-43de-159d-08db8d8cf705 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:18.4981 (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: cLaD9b9FGSsZbuebRgS8yzFee6i+QJVRSezagWbtcktNHkHT/nK3oK79hHleV8gcEL05hA7316a/VM7H2tvMHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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: 1772455679801981091 X-GMAIL-MSGID: 1772455679801981091 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 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);