From patchwork Wed Jul 26 04:00:06 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: 126079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175044vqo; Tue, 25 Jul 2023 21:47:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0mZqiu4pkiBtqWdb+BoJjNv7gev0Fuus20EAgupZ+7W5PQtD59IY9ZSFseA4hjgBhjtLT X-Received: by 2002:aa7:d80f:0:b0:51d:fa7c:c330 with SMTP id v15-20020aa7d80f000000b0051dfa7cc330mr520206edq.26.1690346836774; Tue, 25 Jul 2023 21:47:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346836; cv=pass; d=google.com; s=arc-20160816; b=lo3hJtvPKjdx/IT6a2l0P15TLFucKuSa2+nSZf1wa2JHbUsXz2CjOWFh8+N/2V9ArY d4MHkLriV2QVw2YN3EUR77OyixIX1sxUwjSPrxIKaDYTt4RFgpd+l2NVEr90hzuQnVjo +Y235Uql+M9ZiZUnZl9hPXagzm1URj8eXb23v/pMBQ6syuecaQnIc/qAEegb3C+yocp2 OmLLcr6UkiHyAqxjreBjUl2SMexgssW3M5NFwAO+w1iNRX/nmiGHx6PZXsubyBl55bO/ MWSBC7YTMC/vcCYz/mgMIbkqwwoHb/kB33iq+du1kJRYiAUm4JEqpQNFFCV5YgrDuGnD h+2g== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; fh=fJxaKjF8cU9IytLxrOxyH+3aSDZVOkoQMtMD4mCap3A=; b=D/fEYXAkw04pVxBmxLSkOOcpQfs8Laq+Hj5ck5jYF5Sxw6qxkOGP//xvd6FlrJbr+d 6COVmXAIVynAHwisEVoriGV8FZFYM2175bjDutQSyYBrD2bJy3ji2OLMWLdseBxMY9zd I2y1mxHXqqiyUzAKnVFBX2BNb5hfAlL1D0enT3GIezPkzPGsb9/W/LkznvQ+7hROVtkk JFMHO5Kux0HWqZLNTi66Nl8QnJhUjVKHf9sB1uo03v2vIu++67AqLNW43m4Ftp2E5SCb bt/Gk8vC82x2UvCq5SyaKhPVjtmO4Lx8B089ESgP/UqPODNZ7GgouBwXiSunmPtH5Kqu 440A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZA6RIM9g; 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 c7-20020aa7d607000000b005222709bc35si5045625edr.197.2023.07.25.21.46.52; Tue, 25 Jul 2023 21:47:16 -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=ZA6RIM9g; 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 S230095AbjGZEGf (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbjGZEFh (ORCPT ); Wed, 26 Jul 2023 00:05:37 -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 A8FBB2D65; Tue, 25 Jul 2023 21:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gqcVB9J5OazVS1JxNg4p/2D90npr7aEIf9dh3+jYMeO+dpYQ734jkizbk11nWVkUijMo2zKzh2iqDMDvsduXEMvWUcsVieynRKP3azrvzaplyTlh6roQGAFY9kAGmvBWRHogpN6ETXywgRHWuczZp8SB+fe/uk23u2PdsjXMUHs1d9YlVpae/ydlscwb6FNOIrKFqXUue6DpE0T9Gme8J8hvDcL5CCzwc7fr2V9xg9zqEDQIMSCRmfNpmVd92r1uzvTkCFPPwCMhtUqilDFg/zlcYCn8tgiMxkVIYpd9P/hsuVttMtrebYPpZ74IxyyrwPcstLK07F7JGSBqNe2puw== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=bgktIhcQ6oWFp/nYRYI1n9IiBb03nut410hIWSg+jyAYIjrRlBj5EbJBMizKH+M5MTbQiz/KPGH4q2L6x2bIPrhlurdJnGt3N1VOn72RQfXnDXS9kmg/RunJ6T0xkuIqL0070TqtGhsmu7A1aMfdSpSjgxeqkiokrghYvPUzp5ESs3GpkQCltjL2qYh+gt5DXDggtqv1kCicuh3RqMNmVp0omgH1IeMUfjKMBmomqy9sv0Sg4/uccWbSfyTOOdtfJnkXE10vBq5JTRX3QyCqcJxNIxzLGUDKgvRpxq43TiLjW322kKuHK7qrjtgCtRQxo+N553pjbxS9/HBFgvUPeQ== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=ZA6RIM9gZAV4BxvQKco5IcZRSi1L90XfA8A0+c3H3sa9tf+sLExfEt8trYRTx4ccKhONKvxD+q/Pg9BXzRto+Fn9q2citbeFK42obDIhBCs/tc2Gn7ypbctcp1mlW93ViDzWSNKLIy+BrcDBMuUwwrn4TznwDzEzeICPKh8GdupMdwHX1iP58GUKG/OsFpABx+n3wEW8GRma7Bq8ZdJdR2E2GyIKxFNnTVIr0KZhC5qUYytgbGerLK/o6XxSTL9jby4RsQlzTGFj8yAgXktj/wzIbjSbd9iwq3Kuly7y6FlhN5eiyG3obILs/cPAW6iTEPSKKRBELBJEijvup/ZmNA== 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:43 +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:43 +0000 From: Yangtao Li To: Adrian Hunter , Michal Simek , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 26/61] mmc: sdhci-of-arasan: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:06 +0800 Message-Id: <20230726040041.26267-26-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: 5219fafe-634a-4528-c71c-08db8d8d05fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gtZwPbC0uOD9dXWAZmeSy4Io4fuFx9JvI8qgxlF9eEGH3PFTLv96gS/OjXKA5yY+hzz3KArhgzGyLPzlemC6pLdHmyp8OxOJL8t2bbKZYODENw8bAVlQytmlpywJxw8lWnHun9MwY0GWnqeEH5DMXddOWLaP4jRYHGd4KzMK8lGYQJA9uxKO/fzZgG/bigXZB8u4mzHVt5n2Lp8/R9tR4NuuuWGFbw9lvCX5C7cgSrpvQMUWcOMAG7hc9Ulhgg9fNeHfycrMqGXIFX8uwo0CJmkEuy5XhDNmL8+c57+hbd5WyAJT2XhtSg4qyU8+5wdJ0yuQWeFHkVuZwIAWvVcMiti1aIWn2v/SPFToanHhSabztKyBRmcuWkhNLLkxyA8mIyyajvaHllJE+/IuFfkPICI9bgq/Qt2XM61iPF3FPUvKUWzNfCRYrSfw40WYpbvvqKxrEeV/SFum6T0oG45HoRoDUCCjFdm7fNd833/alGgoLSbKuaN20MFoTTMvc8VF69p9AzOEJZwTNa+9M7XAU1decS4GNoQw5XJRjlJu8jebIycYKS/1vFUuIoA13c4Oy5n53W+OuN9pNoN8FEVho38CvUBL13ohnW8ACYhhp199SWpgtw5ZyICjYlFjrNYR 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)(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?nDJrmOoZus4XvIa+2Gu9u6tN8i87?= =?utf-8?q?Yp9ynhUg0fpQLVXhwrdTgiFDZ2h9iQBJBWcYu8IkBRUiP4XdCAOyQw3IIJ/DLKHaI?= =?utf-8?q?c+yi+N3WAWMgHXZ66i39+4598dqCs6hKKBxlHpgrw/ujtQ7X2ims9NtrqXMjnbA7C?= =?utf-8?q?IHv55DTHtKf46HeJU8V+Ke4TukrVY6pYAv0SZjetGY5aNc0jxN/Q557Rl15NQTT9T?= =?utf-8?q?7fc+P0R1qblZwW6K1BqTZOPjkLpb77+Ak2N2c2ZRMrf2elwcKtJ9zWe4vFOOzdJ8Z?= =?utf-8?q?hpk2cljqTTYI0ocUaVIpWI8UoDRyPKqLk2dHkGfWEuEhF+3T0CGEU+9NyrhEMAUts?= =?utf-8?q?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ZjRnKkNs32/Zfg8KTVRw2KjZ/eoWuIyHjGajRZHSy?= =?utf-8?q?pJdkaVFQ73QA2c6sZQF1zTuTFrTGbBd8RSZ/9WhK/TjAotB0lkbuIwWYenVD8R3iU?= =?utf-8?q?WFt5HgIaFX/rQF/R7KYtSReLL+F47ZQf52Q554Rzwfg2IgFvs8xE5/W8zQKPxaRqz?= =?utf-8?q?BryJUe3oXwRvHgCIOwZ12B9zxtpodkr2Jexy+pS5Gfnna1EIA5cbxGlY9F3TjmY0G?= =?utf-8?q?ejI25+G5UJdvs9S6QpRLVY1IihlqBQBLcS4kRN/JTSeLvKhe7FDXjT3qDIT4vJpVy?= =?utf-8?q?LqBQJn4lmV4b?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5219fafe-634a-4528-c71c-08db8d8d05fb 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:43.4530 (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: FWsJ7rjL4jYgswUzvuPBRUxBqcMVlqz5IdBlw9pEDZpsM8Rlou93jzNG4u0ogAZQsGcoZR8WBJ2eg9U30YdbxA== 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: 1772457124441891141 X-GMAIL-MSGID: 1772457124441891141 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: Michal Simek --- drivers/mmc/host/sdhci-of-arasan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 294dd605fd2b..160bab0c437c 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) return ret; } -static int sdhci_arasan_remove(struct platform_device *pdev) +static void sdhci_arasan_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_pltfm_unregister(pdev); clk_disable_unprepare(clk_ahb); - - return 0; } static struct platform_driver sdhci_arasan_driver = { @@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = { .pm = &sdhci_arasan_dev_pm_ops, }, .probe = sdhci_arasan_probe, - .remove = sdhci_arasan_remove, + .remove_new = sdhci_arasan_remove, }; module_platform_driver(sdhci_arasan_driver);