From patchwork Thu Jul 27 07:00:28 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: 126818 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp960408vqo; Thu, 27 Jul 2023 02:07:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlEmViRU93jKDRxicz/7ohQ4N6ijSwKgeBB4QO+ba6ysvLmGnYA4xZ807tufHo3ayHuE6aTM X-Received: by 2002:a05:6808:2a53:b0:39e:a1b0:ed79 with SMTP id fa19-20020a0568082a5300b0039ea1b0ed79mr2286992oib.19.1690448820033; Thu, 27 Jul 2023 02:07:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448819; cv=pass; d=google.com; s=arc-20160816; b=YlBbGbjPpAkWv/DuPJvQeUrKA4HycH7jJJM/DwAVBCU2honr0mLcQMZVJfxiXSL0jz FcFO73N1uYQewdzvkJGO8IBiEWfq1RAx+LOls4H3WczUwekODChCevk7eOW5HnwDE5uC W2vJDnuPsoA33qrz/A9evwCl0mr78mSmPSTQN8/nXLrEQ6FaT9VxUTKh8sLBD7sEYqwP ThJBI5MYRSBWZ4i/I8I86s9DtlSgmmKx0ayznZtnALjVIgbJeOLBv0PVNxP05vQ4QEEY nEpCFgBW0Io1qG0ymfos4jcr1TG/c85vVHpBysWs/svcKIINH0YqyoG0fw/VobB8vxfi MpFw== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; fh=t4PwngncljtkaYLD3j6JPIaND43qk3sIhXuab3Wg+o8=; b=L+7QYH1q6SxSuHDSkQWBbayIRndFWmGAX0NE+OATLoZ1u5cio8aVQI9Tt6VmP2gmiG 0Eefck/+T4EZHTvqUP5kMN8ykyvlS+1elaF50Pu6Ly16blOoN21ra7hZVn0OMTbhhUR2 Mh0XRJOzJCd1iBYx3/xzyH6p2+QtDs4EMG0FSHmNzv0j3WlhiUawB/2Bs7x76CAEB7CN dOaFv4WfZsZFnTPhvmZc0Y+1ieN+zdkGxCfWdlCxi844qSxVwWSR7vkmJRAQKBDffNmU Aq6YZ4bfNORNlvRTmc8KJLU6EdpSBfmMSylsqMHki/Pt17bG3Ru0jzHSQYxYmpqEYNEL Ujlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LG0fl5uW; 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 hg16-20020a17090b301000b0026404467b7dsi2569240pjb.110.2023.07.27.02.06.47; Thu, 27 Jul 2023 02:06:59 -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=LG0fl5uW; 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 S231569AbjG0HGy (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbjG0HF6 (ORCPT ); Thu, 27 Jul 2023 03:05:58 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7726844A0; Thu, 27 Jul 2023 00:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IrRkVKHEoxamx9QXYM5DjP7JvZYT6rylLnkwqbCe62vIUzy7qVxQ5p0pVeiQoCOsXDtSsfFmivbn/h8uGpZn7L2Kr8tFuwTYeZ1C1bgpjnMHLlTwXss7PjT7h1SiUQEZRgnbTWL1SvS0l6uNz85jMXuUtiFK7qkbFyzRw4LZVuB++ZItgAZp9BoNbf92cEQcVjQTVGudycJ/KkZFH3ZMF2xo9pHtWecZZ1iWvV6s3KXLj4xZ2ljFciHebPzzC11TdXqLrxQHYkq38oQglQHiKbqt8gbpJ+ulk+AH1NM6mgDFyNW9rbcE9jZ9lHD0TEC9TRQAiqQp6txefYFp06RhSQ== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=ePTjRbphOzp1xBq4Ik4JgqYyTq/Zoos3pemFweUIr7gqKHmxECDqwdFILrLNmmVSO7Wmqpsn2ubosBoMvngE7bkdNs0w4SVxUSUi1RRRq/pwwETZKRFxxf8GfpzNZOWdm91A8NL7uWBsg/AEpI3mH8g6CxQpkp6knl5X+RGYcKp4ir6FOmdB9IoxMsH48BNjHBDuz48ZquZj6CmTtiLGxenAg4bu83J2J7Kx+Nw8GotArMD/zzhzO4j1jdZIAcSK/2JQVQZkN0sNTRwmX0HsmmK+6NTu13X8TFQJ16iBy3Blj3TFmb61r19+l0j6+p4uc3/JB4FhZVCGY3dwq2KW3w== 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=Km5SLI9CwGIZCQi+0pIE2z3vwwmcgtBqTHQpN6fP90g=; b=LG0fl5uWqI07gVDrSSsxev8xPeFsLo0BoI5OP8IrW7wMdTgRhKfzWYy5dSv9HTmoDTqI2QwwQ6r8EmdW24PV2Wlhcsu9yq2lBQW4vCzPsBkj9bKcE5TT/k1bq7vtdTSgPNFBjpE6+TJgpf10xfiUankEWdL/GcVGjQfx8Jhpxz5N7D45uE6YvspTVm6YhrGvMRMt6UHRShvown2EquvSekOWGIykKGaHwW+/azW8+hgjYWuU6wLA31RpdXYc+wliKCTsHS/1OWLShFYJ8wXSYybsx/FsjtMiJD2xgOqjAv8IWXpMIHzfFvuRsfxIfAZFz6+hyWP2W9XwEDyjVIHBSw== 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:02:37 +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:37 +0000 From: Yangtao Li To: Adrian Hunter , Andy Gross , Bjorn Andersson , Konrad Dybcio , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 39/62] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:28 +0800 Message-Id: <20230727070051.17778-39-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yKtsxXqBGSe7s8f9/ibhccb3492unw8jK/arkaEKvkJqfizEsMavQ2GWHCmtfYY9/ugTNTKE81k7hP5GY459OQwtyg3FU96hwSf0KPET4yG8zCDdZNAvGwrTpctuBFabDTw8n3e9QzmgK9Pb9loeLAqIHfqOW2fLahVNq9nHtS2BnjeSL4vyVVSviZ/+0HB0uHoK0GpRu3t+T2gMHrEGXS3//OUF/XSHyW48s0qPKrCoxQPp8HKJZ6y3kjgAIoRpsYySW+3snOhd36UM7187iLbgFZmTp0u1QnmT1+aGFNhvQUpgXv5rTGhIe/pF5mads7Lz9BrIBY3cOYJL/IJA/5ByvGmLqC/Qx5f4vm4mJA3NQ5QexBcA07vaUjhP2P5+o48EmrulMFsZ+xqUzBd1mDmrJdrr8oOhNqV0mpDoXu5b30T4LL3UcXMNpZmwvzMpLdT9bv9zbmeJjN0RRJTago0JLMddT8c2LxDQt9Kai5Muj1XalIiiBKfSILuu8jLLe4bCpFuBS0GHKL7x1h70Vh5zaEI+kPzLYL1Y/dmRFESKFPgTKAetvq6B+zKax39sMrCv4fosHZCQs5gdwoDuEtUSmnqXU2gjdVbJZl+uclPjLWHvBoAyBE8OsCGeROQP 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)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AembRaAXxOoLT7AcmECZhRtqgfke?= =?utf-8?q?soZG+oPzrFhrYbIysoLqHxktTvzqqRwBIFh/Z9h143MR/k7Evi5mGcWF4Sj3A7cCW?= =?utf-8?q?zAPFRSW3OYQ7EHqkU+ItQLEj8daSQhm4rWd2trtYFwQyq4Y9Mnc9haiY8SOC1Iemd?= =?utf-8?q?m2+uACpD+4BZQgzNLl91ZzohVqEtlfj+zY3olG4/34aNoMRs2ht6CB1qpDFolU0Pk?= =?utf-8?q?uzSahJjN69iE3+48rnnlouTaR0ZW7diZc5x1HLMCsFIdY3w683VOijeIWfmW1hZQP?= =?utf-8?q?//a9fU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nxyWd7SaNDDJ1Td2PLzlG30Fu6weortqW5anOjXB1SenMTiVpCmybv?= =?utf-8?q?OhZq1yf5YWGtaYl/jgio/pq70/G12MSM842tcwgNrKfMuMV+A5dKMGJxuEFbHWhU9?= =?utf-8?q?PngPGpC0H/AGZppzLvsE0fT5on+5e4yDVGsYWzZeN4Qgt3Z5gSvu8lFlCMid56SQ8?= =?utf-8?q?qjns0PdVsx+JB46JBjilM0gSTagOZe2T58GcJZmnmmCAWuKCZb5j0AyMAkMmBCoeS?= =?utf-8?q?eOm/xE8DxBbU/pSXvQZdVUo6I7aBKV/p+D2MZ8V+AbqDbdObr45OHf5R203Y61JB2?= =?utf-8?q?8oRGykacqolJsTNxS4g6CNzA5UUm8wlxUEk8mSu07mYBis+7u98/qQaHgoCq/Xqjy?= =?utf-8?q?NCI5K77XxNG2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebd6aef8-6ee5-4147-b2a0-08db8e6f64d0 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:08.9240 (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: U/v5oBPRnWDVpQKHQi87fnp2GlnSk69uvAjuYbxSIcA1XZUTPFTsPcy7T3lJPgXubBccH6cTRvMTpPt6M8urjQ== 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,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: 1772564061694203278 X-GMAIL-MSGID: 1772564061694203278 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 Acked-by: Adrian Hunter --- 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,