From patchwork Thu Jul 13 08:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13311532 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD7FDC001DF for ; Thu, 13 Jul 2023 08:14:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234276AbjGMIOT (ORCPT ); Thu, 13 Jul 2023 04:14:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233973AbjGMINc (ORCPT ); Thu, 13 Jul 2023 04:13:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83AE92715; Thu, 13 Jul 2023 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuUM4eQjDrV8h7ZctK8ihKoXoSRQHzXWW4cwDIxFHmHVo0YhIVEWVaKT8XUDKk1pKrcbORCo7k/QMX/vlGIVG526aqFcMZDo89B4238BL8roU0t4J8c3XrYiIJi0oCFyzh+lO6h1W1dt9WxYNRlumuSoXV5GV7uEx9Fg3VuaNX8Bgaf/J3Z45ic0efYIXWzwcAUuPd4xittkHcBDIbb7b0msPjfE3/cf6n4Uqws5+qbWjc1qf2F9fs4TCHLk8XRc3llunhFJTlFa88kk/Mn/BSsK7AxiO3nOXJEwvrQuia414N+hJQ6/OwvY+pX0bk8Uf+BuoouezjboLr45z1feag== 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=bZlf3kRbzhOTHqfQQOVUzmVEhE2nBa6PIZr9CzqCeCg=; b=N3RtUgfP0koTip9Q53ZHzKLlScuMX9hhqY23eaZbuO/oemXaAJ3GEKxRNrai0HDZuybbRC6nRvEQo9PL3UrcHE6mZUaLvD344yVH5sKQd8VWOEwHRkR82p478czXuKH7RhbA/2hXk4KJex9RuoLbPmFN6iZt99XOmk60lJp8Yx4p5T66aU/d8asufgaFUOUJplIB/b9qWIjtbS8ujwa/2faQAOoDZ7C6S/0ZmF9gDRvuJBACBUmqbmoAD0I1wH97uu5mW7OqtWzV3Hud733Tbnyh3LpJhnl1FomI2kob/9ZWODm6KGvfvh/S8ofU+vHvGi5/1caJwl3z+T0JVEP18Q== 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=bZlf3kRbzhOTHqfQQOVUzmVEhE2nBa6PIZr9CzqCeCg=; b=AE1f9sIm6F2clUyjGjrV6RPFOAJbT+ycRhuWv15UsbAjuUf7i+Ozg6gVsGPJHd7Jx9sDnQ+k4Zg63tHchEIJ97HFdwPdwM1i1P/mu/yCVb81HLvGyWGz6VbqzRtx5h+wxiTAC+7Qo3Cx5zl3DR3SRhndMCMiaQ5BUkQ4GQ4joW6yogHZndaSsjJCvPRjOERRf2Rwdx3zm2P5cprmjRAxwmy78SN9a4MfAC2+qNoq5qLSTFYn0onqiCRQ0WHTIsNRNgGn27cRQZPzyPAZmQGPG/jaVRPq5Xa9cRJSxvvaCAUtUK9pbbdofYdixtiOab8dws7g32JsPRbcn2PzFITQWw== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:09:58 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:09:58 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 40/58] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:49 +0800 Message-Id: <20230713080807.69999-40-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: 8144fed6-6092-405b-bc2f-08db83787c91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u2nzhaVighvM5uQT39Xd1qmDspn9lLPmnAyA5iWkknJmXTvAR9jGzT/Fgi1s5euzAAhi4syb4dgx6NvNn2CTOp3HddMC6KPxXfdN6Dz7UppDy8o9MplmSlTQnt/7EZZvamHrcpCmNupYfdBav/kApwRHcM4xKMpJdioidIwPsOvmO7WsmVSjdBfv3iRLde6VSy3Hj/d+4eZYRyuA7tO845ArOpq3UovwRvbQHXm+02GrNY1Gkv691oY0SkQY31OJAg4xqwEU9zX+miQR2e6kP82qFuNAzBs5Gm2mqB/SJdBLxzTCJFuLZMa8JpkaF7cByBsNyFh7i+KLEbGRqcrveTTXJlYXR3+z1bAXDWU7ZQiCpBnOBH/eOWmd3IqmpIygVX88zheMoWHH8vVuz4JhumexVi/fAy3LZglYYKhilVIIXKcrChdZS5MPTo3TzI0EIXJR1KkTW62cI8nkb2ovMtDT83qGlYiZY4wVgtLXPy0doiGDraCqdXX8PhfljqGL6OZKV0N/3Cf7bvR3HQFvlDpxlhyoo55vfgU6NqXOEa26WxcSwZqOLSTqjIYnAfA0CFkHQc1B4Hj50O0wDE4ximra2e8asCdiO9sIb1OpPYYY9PqbLGixsX5p13wthw+n 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?L13ciHpDhJsxgXr2KGPZ6281Iyzy?= =?utf-8?q?ujCOt/Hx3dVm7aP+98tyebxgyNp55WHKPa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628Emk/hygd5vg0JPxnGEu8PnZ23fK4tslb?= =?utf-8?q?ZlGPjosppfVtLHyQ5LJA5dIv1h7xv62EkKhJAf7hTLMQbJxOIV0mJAsCJhMUyQyB7?= =?utf-8?q?W6nZ4ON/3lk2cItXqzxEHjCjYSfzEik5u/DP5nFftF772zE2csAh0unKOl82V+3jE?= =?utf-8?q?gvJoyC9LR+GFUo1JfpXYf0u0i4NZvSIpo9WChFOuscPhnCUGkAIoRvgr7iTziL+UY?= =?utf-8?q?r7W/XzOYHEuW0RDRIKPFes7FCjUBXwoGQBVNiZH9fTxoFR2wFNH472RK9B7y5vzGO?= =?utf-8?q?BC+KCqMIJgm3e+k4OBFwqeB0QnPlN8yL91TDSo3U6h6dlRidtLIxEw7AQ0HCWL8A2?= =?utf-8?q?WAraCoL9Z84oW5uRfIgcSDxfWYomKV15ZC3Igj4X7TxEGT8wv/A/gEgu8a4ldSpBW?= =?utf-8?q?j0AY6mGji+8AsPdGLWktEllYEaj1e/6EJjIax3u29XG6BF3svQ/T14IWrvlu9XNKK?= =?utf-8?q?/t86q3BuTs4UqF2uHPui1r2MT+kG1FHSv7HupXom82icvIjB1Y+5TAD7q5LCkngM8?= =?utf-8?q?1O33XOeyZHQ/UYfhGe92VNqVkX6ysVH/gOYhs8el9N9BlhYIlJMCogSX1CTL+BzPP?= =?utf-8?q?6rHuKwhguvW0?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8144fed6-6092-405b-bc2f-08db83787c91 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:09:31.3672 (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: tC7InX3hGypnph1gCs1mTlS4DKy2AVKS+xymuHBre6B1WKy8ZeT4bYOlSCOg2bcDu2TsPUA676GrfY/JFVsFIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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: Konrad Dybcio --- drivers/mmc/host/sdhci-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1c935b5bafe1..80e376802ee0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2668,7 +2668,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) return ret; } -static int sdhci_msm_remove(struct platform_device *pdev) +static void sdhci_msm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2687,7 +2687,6 @@ static int sdhci_msm_remove(struct platform_device *pdev) if (!IS_ERR(msm_host->bus_clk)) clk_disable_unprepare(msm_host->bus_clk); sdhci_pltfm_free(pdev); - return 0; } static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev) @@ -2740,7 +2739,7 @@ static const struct dev_pm_ops sdhci_msm_pm_ops = { static struct platform_driver sdhci_msm_driver = { .probe = sdhci_msm_probe, - .remove = sdhci_msm_remove, + .remove_new = sdhci_msm_remove, .driver = { .name = "sdhci_msm", .of_match_table = sdhci_msm_dt_match,