From patchwork Thu Jul 13 08:07:35 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: 119637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677420vqm; Thu, 13 Jul 2023 01:37:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUpc0ZBBI84bBIQD2ex0nMGS80vlFsjzH/nXxXHpVyz5rdChnAOV+ZtGbUzrza4pZ97tN2 X-Received: by 2002:a05:6402:7c4:b0:51e:5cab:feb9 with SMTP id u4-20020a05640207c400b0051e5cabfeb9mr1176388edy.33.1689237451606; Thu, 13 Jul 2023 01:37:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237451; cv=pass; d=google.com; s=arc-20160816; b=bYxnhARMhZ9Brm9APrYxUDTlwD+gWZFTSn8KWtAq9irpdxQ7FUkAgTtoOgxjasGkME 01I9RUrIjVyOisgNYpf5M1cmFUY10Rx2+6X3QTId47Lq/b+0/CrQLm1JLoklGboXUO4u gsYf9dsDS02hi62s947GGQRVME4tjsiGd+MDsmpdSLpUHjxTY+N204gzgZ/+nfuZ1Ga2 /n2LOT/7U3E1OxKwiO3qZQEEkOEpYdky7YncrMu5J4DxcyLJDHYgR6fHvOijc8fuG69A DSnGDvqnWLEEuvI4C2hfsGc/WVZAabU74xYDDifiBgzMsL7h3IVqzIA/PXrmICr4RkGH 3quw== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=QgHiQgqD2zK79FTgIlxrnvAxQLhYIC1uRdynU9JaHlMc8hf0UFhhmdL3ZaufHWW0u/ qigqFXDtfwRS4gY6o072ChjetPzaR5lGotFiK2UvewNqUYTcpBlILwTEj9pCKkn4Da/a KvERCA0DSkv6MijH87nJVNbEZz7Y45OK1qpr7ZBc8KoU0TzfyLmHscvwWb1n9n7tQ05X UXEsNdRjdsiYjMAIz3YJIcWqbPh9c/jkKW29vU0zs05JwmWRMUWqdSOoFnn0LlNOiUQf BPsHsdPDJdI7//OPR4fwxZczcYtpbaDbGGWBNamCtAgIVp+owzmFsPya5bJpPKFGj6aN t8OQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UwlxPtG1; 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 r24-20020aa7da18000000b0051fdaa08fd8si4193586eds.261.2023.07.13.01.37.07; Thu, 13 Jul 2023 01:37:31 -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=UwlxPtG1; 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 S234313AbjGMIMZ (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233533AbjGMILT (ORCPT ); Thu, 13 Jul 2023 04:11:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23802D44; Thu, 13 Jul 2023 01:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCebGbQXLkJ9W7E2I0phW/qoWKrDC6drBuQF+QbXTG8VIdnSX6q86nZTm1XIHr44e5nIxYWlEq4QhLngIKvXN17z9KtWXRQigGtrsLUuSpUpQin5e8JQIDSCPQad99eKURGLCUT6vzRDlaR0HvRDRCLlO2viwiOku/k7EnnLt42ZTrCxIKjs16weMZf62cXlII7ZFXGOo3iPNfG8hwHpxOSULwWzBFqAjAxk9irEl/qpZky0AcDFcKxlaDa1/laDr4rXjslu007k2Rq7sZom7YdhsAiWhXmug3DMGVV/1+ruySUOwm3OHWpNV5jWvsh9ljzWl943qnl/xsW/kc8a5Q== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; b=W7b2aKqE0/YzTw7NAstJubJW8ONc9OrFfXcsLjuFSBFdsjgVWpVuM2le8fUuzQu8AigNBuU/Z5beDPsSEa98FQPi0uKaObBeF0Qqr4Sb4a6l6OzNyf38uxjy6ym0j6fEkLfWBZgtNvrlfsqtkV68naAwiqF50tWIsu8M1TcWL04gac87ecoEyqwuQNjzVblrOX+cxkVHWxTwsPi5A2UHqr0QUBeoXyU+UqRdnnMwaCsQ3aunbhcgIP2l61pb3YXgsQcib/Mf4aiOYrPDIGX2btuMi8v0XRRY+aeuJ4tsi3l0mlcq9o7xLGET4Lbwt+hFms2FrwD7AsVxkMYflpBnRA== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; b=UwlxPtG1Ovq4S1NwJKSoQIB8A8xX7Qc8yXqrf8wmaMapGAX3Ss1JIrJvVClRGruGNQZIaO0UOakjTmZ3mfHVp9hRSxE2PV8laPpFN8vW7hWoE3muVf7x49FTFNUOVV/wCmCY0sx0GZTiLpykeWHV/Edmazf+MmC24pWJMbiejJHmOpZ3Fak3U5xuTXrC3cCcwLmDORknwbLD0wmOB4sFxUtMgIXpguM89j6wryMUTyvs9FRgRHUIf9D5Mg8eBFAStARoA3gQ5otFCpUfEZdMlUGJZs3N4w1q9CKM8mu89acNzpP2IQyyeF2TCeYke+ppeE0Ix+TG9xI+u/+8v9bvmw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:06 +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:06 +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 26/58] mmc: f-sdh30: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:35 +0800 Message-Id: <20230713080807.69999-26-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 63815350-9561-4b17-d835-08db83786d80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nEf5PqpvC7aHnjxIsCo+Gn+uXlzgu+AJ6K4ECIuLDXwYIKMS1/giP2DOc8BxbGYlaoMNGO7W5MsByfziAkTu2ZQVOhKeEKiStXBlJu5gb0auH38srCdNsFbv3ntkZkB1+IHJ+HCxMQl1X+zuNVg7f/0HoPlITkisUphqJHsorYnyIUvWvMed4BA2cAG25xdZ/aDJjXJjoT0f7QyVrg0+mGHNWNG+lFLPYHQfJI13XeZtz6/9IIKHZgwATZrtQ/S8DQ3g0FJXYcSMiXcDS/CQad7nBgWtXK/ulLE4rt2XiiA/c5ZFoE2+ggK83GhXtzFc08Xo8adzrghHpnP+SGYt4PTlPuDn/vDZKsbqPPlQ2LZybKS5LBm1dqKHNtPPbLJARBWMV9TlM+yviLiTff92IcvzESit+tkkV3bmnas7yKKA1XGuq2pFOI6FDEXXdUskN/SGk4GVIqKC1sDwnCCd+CC1OUmdtM5c9Y6aXVP7m/GaBZsuRHtY1ZhkS26PBesQJ5vJQN3OdXdh+3M1yZE7y/m+KIFkow8pU5UAmxP8hfnMTEpd8p4QK6yjup2MzntQu13xQcnoN43myrtrW4c6W1ELLYH55PfLtWWpdZEol1I59E4yOqSDBetwWNtEXQDk 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?txNUUnEIAA1Cm5qGBpiebeXaTsM1?= =?utf-8?q?Z9yYcWPRAdnJ8md9E1BhogQjw9SfqGPOHvDxL9iBiQOlBnCNGjvZ7poR+Q5Kl13ZQ?= =?utf-8?q?afWBrBTIaGTUu177/oxdULiS//rxaxuKwGNYcZcOOz06MIE5N8GX+Um9lcztzRIEB?= =?utf-8?q?sk8tYM8OKL13H/C69mNfv9WpdipZLY1jum1qNrwTQDuRBMW0AL8W7sEm2CR6V57UY?= =?utf-8?q?vN4VjAhY7p8i8eWtTmRimQ1iqoIpNDxxy4EePnStySVjxw+uPnVEDxwQAdGKD9gAj?= =?utf-8?q?1S4+OJN/FIPKX9xjyBQEUxNp6Q2fk/jYyNPA0zxFh6BAV7oerC3T57t5BKuoafFRZ?= =?utf-8?q?LMkRqD5wOgYHpmb8pRMCpz858MWXl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xyvkxBqmN/Urs8oMdNz5U4BkzWqnNejw?= =?utf-8?q?CtvK8CZDZtkFhD/AWxhfgEQfaDfZAiDxo6Zdgo47CjNIjvUQwWJXDFNUqbU8AOQSm?= =?utf-8?q?eb1019fhBlDhv3mXOeXBBz4g2UXRj+dr5UgLI3geP1+rHwhwn4i9386kAD+QOX8g4?= =?utf-8?q?oTzoelIFZiHg7vYy+lxf6vsc64rM1uaN11cEIFPXo1AYfTyzfkm+vXxG+Eb0vfTxL?= =?utf-8?q?zFRLxRI5BD5oDd6EiAE/4pjzbfAHcVPcduqn0tj7gBtY9P21YbDzIqdnIz7M5s/7V?= =?utf-8?q?Y3/bMd0RfHWR?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63815350-9561-4b17-d835-08db83786d80 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:06.0802 (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: NincHnWZFrmhphbUi/QsYeCTI2IQ5bvV5P+Bqg4qgTqrZjwIGZ62u69Qv+EnMUtyrtWksoo8/OHgjv7pdXhkBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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 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: 1771293849827077719 X-GMAIL-MSGID: 1771293849827077719 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 --- drivers/mmc/host/sdhci_f_sdh30.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index a202a69a4b08..6016e183c03c 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -208,7 +208,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_priv(host); @@ -222,8 +222,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } #ifdef CONFIG_OF @@ -252,7 +250,7 @@ static struct platform_driver sdhci_f_sdh30_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver);