From patchwork Wed Jul 26 04:00:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13327487 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 330CDC001DC for ; Wed, 26 Jul 2023 04:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbjGZEPI (ORCPT ); Wed, 26 Jul 2023 00:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjGZEOi (ORCPT ); Wed, 26 Jul 2023 00:14:38 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E1BE618A; Tue, 25 Jul 2023 21:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TUXG6YmnK1Z80f5PhW227slnL8at8rMirwbfnwKwsDE6mqTX01Jtxg+x02qpiGMAKuQ5o2Sxe0BWAW66kgGPDdeMXtJ6jvGJSHKpZtdXtXT9vh4evfMHSzifRC/xdsplDP38CuO3H103FoEW/wttO51A1vFkLnDGunUXIn8cxRn//6auYFfXoS5sli/TCmtDTFM1BlEgVvvt6oJCmSsMtXph5DtRBzhB2EgJN3PfXhjCKE3aEi3LLnZe+TCc3Nm+lrBmh293eAyFzrvj+9hVnjLxdLAx2IncSkHxlQx/LgQdMQZSXf68/AR14MJz1kzk37NDgCzaJIXB3+vL4VGhRQ== 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=ZkhpTrP1fBy6oKTGfSv4gzzCC9zrpbviYP34vWBotLo=; b=dvzCqjfeKLLs1+RgszUOg58Y5w35CkUYXFf3D89sxVYty9WDo1B+WiDwS6DpPc8pmKOq1Y/COwz4SNMJDbFWGv/aJgds4jk/yu0drHu68qSfVSG6cSkpTdjgC63GpidjQ9b4eTZiSo2n1lFNLToPFO52zMVdZT67SA+/bJf4UMq/AjyLc7O5+rG3i2IvR6+NaDFwNAuzewvloelvdMPiDlKY3gTymUWUzvToGOISJ69dUTux5i92467NMwk28BZmZolc8IDcFMeE+otk3p9NHGL87YTj3PN5zSUP6S9Y3MG33YGHnC96dHDZIYQe9YcHeZcbSyNmD5qRwkj3X93TVw== 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=ZkhpTrP1fBy6oKTGfSv4gzzCC9zrpbviYP34vWBotLo=; b=kIQLS3Y9SXhofHcz86sXCDYzvjXYQvdmSqOZb6jm7wws32n3X90C7vBfHYKsGr9ltnBWYcldFE28/dS6OQz9tNyOjunNkVR6pYBfPYwRTfJ09HGn2Y7+9lHUfU3CmYmmFjclc9JSYiv3U5/4VVD1L7DaKYabIy8imNh6xnl7VdKS0iweCHUuOvfB7JpoihCRVCkf82mYVVrbQg6U8Ij58m6dkcR+F6jqsVdxFE5h5dFGwATsMi5g8gYokke9207l4F4ycb4KiwTA1MaXjyxFUn9oiPIjKTMswHvbZfCelVDf0c7+xkH+I91Ggeg0UuHoTeRGvG+3A+Y5bT3yzx4Sww== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:27 +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:02:27 +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 v2 40/61] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:20 +0800 Message-Id: <20230726040041.26267-40-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 91ba5ada-7bfb-48a8-d9a7-08db8d8d14f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 38f8Cqay50/4rKLFEniBB8EKnNrR/D1AYgVJp2oxfm1icjYyYBPwjwO691R2gkx0fquSzW6VD1bB6HucmZ9ddkRQ+DPp6XFKOe5O+HCJpu1qGfmzJhrmbM/9tagU/rqQqA4r70Of7Kc4d9i19sUhzGFHx88yJANYdrcZxJacoziStMqDRew1Kb8Sp97tm+EMQPPivu3KM9JqQPUBhREBF2LZqjITRplNuKtU0tHcbEDO2xF1e7v7z6XjWig1EFG+f8lIcuEoYgvWi8zyvUZEsDpdLhkHNVcJRXH5gZF7HbbF/81bTlZMkke/VWuJCD5tJ5E0cCXkCCiw/WJ2gUzkSwVe85cb3Vpst1MwxndPbmu1dZ/Dzbxn7NjxXwuEGB9mFKq+1wgKCQ96qZj6K3GJW14qTZBNxEgoAAzqR/34lXIBXqTdf5KFI0bi3tXzyfwsiLEeEY9sAj+zZFPdKtUPSXfckJDdM6MOznbKl2ol7PRNRLCWqdaO/Cl0y2/EgGrkdydwlCpXdEycuEYCJWetURmsPa/CkBaoNk76+hMEqJxfgRO+K3ngbSBBQLEevLKrSTQ1unsSBkgolXzBrzFzPuTVvew/Hy6lqZVt/crvFZ7ItmnwuQYKAiCK0qPDPaQi 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?n4H2eK8Zbf/B44tP6QWHbaFHpF2d?= =?utf-8?q?DQiL0iT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JX9RvDfRzIQKVNjdSS437R9RGuhI9JJLrz+ZnrYX0bFqNPr3?= =?utf-8?q?EuSC1fVrfsSap9zB/Ta28Y8iMt0hU+Kgb1Dn6HrP1EI54RngFf7iQGYUshUt7EKvR?= =?utf-8?q?9P8+YMTeqIHuaPP5QBBssC+Mu3K45k9k42+7HV0/SlyNpOKbsZ9uo5+FgjBiabDOH?= =?utf-8?q?936dxLLEFCUY0qH89bD7oburtSJiRFgacwXSJAVn6KBdiaFzqCHaOLyvJUurTG39h?= =?utf-8?q?v3PuL4k4DYTO4rrrMwYOCopCOfc+8Ui8KMHXdqrxqZJn7qWNN0cFtoA0VS+MvKolt?= =?utf-8?q?3I9mDz66nAYF4LuSMNHahxVrc89/sD/JDXpRZYt+tt3FK98veKBQ2z0TkWNRC4aD+?= =?utf-8?q?3XAIe5OVOus1Zcu6EstCsKsW7m6e9BHWLD0X/1/KgWdWDfgxosWyrhn9sIjDKVKQw?= =?utf-8?q?GcAcyebAOXaOjxwriooMfd6l+MzW/ES+oerJmM1fP1Bp5wG1YfsVj3eu6n6smubud?= =?utf-8?q?/STBi1U529E1ZtzQsqrD0wJhHitxJhV4QZ7h2Sugi5gaoBRE9my5ityP8KJA0NA29?= =?utf-8?q?zxEIn/0hXDmDiNzDfz+9bF2wAfsi+rFwnXsOToiKmOnVFT0ofo5BsDRUJjJnJmfTc?= =?utf-8?q?XtjfUaiMreI2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91ba5ada-7bfb-48a8-d9a7-08db8d8d14f4 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:02:08.5793 (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: zFY/JUlA3AYG1A0n8RNiTnMizM6HdIhMnUSahb0VUrzwLzweyuiQux32ZB9Ji3tFm3o1kK0hESXcWgmKFCfUtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,