From patchwork Thu Jul 27 07:00:36 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: 126736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920835vqo; Thu, 27 Jul 2023 00:36:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpqFoYrEb3S99JH9t5zvhUuMY3osQiCUPeP2r/NYYwKqBBOGaBiS7TVSNy4EHFh2PRwySB X-Received: by 2002:a17:902:b483:b0:1b3:f5c3:7682 with SMTP id y3-20020a170902b48300b001b3f5c37682mr3050235plr.68.1690443385151; Thu, 27 Jul 2023 00:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443385; cv=pass; d=google.com; s=arc-20160816; b=A1AztFvYGfTrtL2CcOmSRDcRPnbRQ3QGs8nQNr1/+zaSWUFJoSE2vgBwMAJuxEB7B+ +VRHgdk7sNH3MD5tVx47mWgb3Kg5aicOCN3TH5MFIoq2fvKHUi63VcRDOZKM5U9SOFyg /HQNltClCaHYeL2KrekLB4UFgibXo2X7Ie3MV8k/0OSQ7AEatQZDMJXrYuaTNIwGZxcg p19VPLtpKA38loed6VLLetPA+IibKl/2o/2bFB3hJKJ2tV8wzp1otNDdvgTGiune9jnS mY77ARd82hqndqCG329YbvUDrEV9r6ATtUzyf8KlMNAnGO4PTIlh49VvswCxKkGnBZaI 11gg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; fh=VgrQwm1O7S562Nu0EHXj1yIoeXgypBRfDN0sIz9nJ0s=; b=HnVnv4ydQyspm4rmGWpjvG/R7d3jPUwkYVSj13XVMRHpoDHy8K6ycBO9y48JDrMSSo BMpdDE3vxIwk5c6dkOcpWGnpILwt39CJnmfxXlSg8bn7JD6NZ5Y+bzF5j1lPMMUG8TpC lkBd+AYY6MYs4IYOdbUL+TyeY3YNMxXl3YdSYkRdMUc5gulg71ObA0bMN86hqM2jBacU syf2gyNvx6qFX90pi4zO3m65cMfFHFERaDymyhyvjrcfhb8q6NWogzrSVespMK0hmhoD JJL82w7hIrb6csFaVV9fpW+vZc06SktuH5DtyfHnfUJ/G3GsIuNV30D1d3sbxkcl8cVW u0yw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fMMh/8dW"; 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 e15-20020a17090301cf00b001b81a9aa3d1si934609plh.223.2023.07.27.00.36.11; Thu, 27 Jul 2023 00:36:25 -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="fMMh/8dW"; 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 S231586AbjG0HHF (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232493AbjG0HGG (ORCPT ); Thu, 27 Jul 2023 03:06:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33FE44B3; Thu, 27 Jul 2023 00:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SIv3VZgrOEvUZg6KYHvJOioL9zbIlCbryYXvRstH45R7ovpxqy/A1OVy4H6OXfXU11VKNTH1LlJYExaYaMUvWpvOtmf1EfqU5sS83zLJmNaewjlqIUsnJbMskfdYmSWdb1B47+DXB73sDZI7sDsGYoft1DkDD//MnGMip4A60BdKNTOKr2B21WeI94QGKd93bz0WBx3siCgoEM/XZPxcXricvP5+L8aQaUeokCtUQlS+XlM6nZ0HqnxVISxzA3OF1kLKSMf5fKch0jkm1P5jYnLadtpZCpZ3G9kb/cOCL2YDdpoWDlF7AfwHjGAjcCSKDF8FSf4AEGg8k2D7/brrzA== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=B0UV7JTyB8xaZOKhrMVWbYJCSAnVu3MWCmjQvPp6mGL0/ZFJphhAO09KzBSBh65JDXCYER9IXZXM5i5TaHTIef16MREr/dIobAa/mXEAGbHsZjN4nFor+FU0IaWUzv+JEfrMRPjgpiVirrxzKG5+rq44VH+11k5ebIrBFt13rB3lhw53WVQmB2qKfivONPpDAprIHokZ+xzN/ZzuMirT1rOE2v+jMIu6QIcFz+m+UPDJnp301cMmOXKLN5SC/b+ExZeZYo1srlm7JSilsCS8kqlDKoqBvZWr+Plb1xSVmsGki2KMJahwH8tMKTkjwJYN8zKVdeecqmr5v0lmkV7Ypg== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=fMMh/8dW1RSXQBPsjhYwA5legf64bx17XUQWKt+KqCbme/QIqY5/hmYf91fnK2ll13oczYJY0TBqzqiDIAmcMGoW7sEbFq160szHxNgUfsmBv5Qea0rg2HaeolzlI6WLfazWMEfWCvetHCJfEb+83Ipa9sdM/XjGKySkVcN4RPIr/JIW6RKmzPSh4RlTaqXpvgXXoenHJqXa4TNe2pSRc8MNcBiux0o6UDxHmwYIoPAyMGDI6bxpMO9JGN5xdOcZNDU3TlYjaj9k8rCDwDwF9Jtn4n+wHCPCz0yY4dokNOEoFKZbs1H3vbp/DdF3eN7JuCPDGhEEF2UkF0gJ+tEDnQ== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02: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; Thu, 27 Jul 2023 07:02:43 +0000 From: Yangtao Li To: 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 v3 47/62] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:36 +0800 Message-Id: <20230727070051.17778-47-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: f71a7c0d-ba85-40c9-9066-08db8e6f6ccb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1eWJu1UibBBRRZjg0Q9wiHipteNm64q09G01cufsxd0EUj4AHlHiQ35T0TWa8fc/xzMkUCyFxlmJ3ZwHwccoPxvx7R/z8Qvv9JaNu1s6bv9rosbLsLZVm0iVb0Xar5cb6tM7Dh/S67VCGrQ5hbI+Y2GsQT+93wcNl7QH+d8Y2r/c97lT2SuuThg/VRNhEFcBnG+wKZ9cVH2gJMzlOKDHKrRO9ZCb5gnUQu54cNZcuRtiuJu5UTdKGloxwwwcbRjvZhxGhuKM2VVqNwoPTx+VUHMdijX4J0h8/Ncr/WyycFpbZqLTlywRjMpNReu7zQAYcOV8JulHC4tzq32JQUQBPr4SyQB+JikSw1WZs+z+wKjmExgLg6V9aWCPfdbKtX9WUCGioDtxolzKjleBlCufsQe22dn7EXHyyYfk2fWrl5pl+9MZEgRVuTpUhyo3AYOmqfuggWyEoZJWRnqYdenpYvcAsnQVJIQk1hrF+EnI0TmNra9MqThX7VyyVvCNau1SG3nP8D6/VsyVeKHFki1auDdw3oXLKpepv4S0nSipexK1EVrcuAEuhllzmmReQjW5xPoCMWKEXa66QnX0Cr7NAYnPnbMQlygS1m08hCCAQ/4lAaV33eJj0To84st2m+e 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)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6666004)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DOHlRSQau6yJYoeTrwccD1ZAs1LI?= =?utf-8?q?JUeo49QMrxD7Juoz5h3xYBhXtWTZ/VjvvhVMLn7POMzYl34gnq0lHPq74T198tp/p?= =?utf-8?q?6tj+QxGPmbyq6Jds6tOGZ9Ihfl/ORphSBFUbv60MiJu/EY0BvJ1Ck8Xg2LunjNzmr?= =?utf-8?q?OXYKCLI2zp6N446v+cxAy3pIi3njW9RZMwjS/bDOSegBlql6rVAG1YY623O2B50Gm?= =?utf-8?q?RWV4Vj1hwpdGBD0HvaKU26DpupOStMTG9eGHVGP3MS3Y335bnoQun5gt9d2IuoNyB?= =?utf-8?q?5tX8bkKu3TSQegVPi33PILBL3CCe9HyvKIZY0P/NU3e2r1HWJ4DWMTlCqCdBM1PQP?= =?utf-8?q?KZI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zIqQA0yhIrzPv7a+XgPhcXAxA5mJxEiMDf8CdNl8QHFbilcyJSilquncfZP?= =?utf-8?q?efXI1l5q4tHsPooMtjvu3pUxVOOX1Ss4fIvTpmOLv6Zr9kNv5OArTgUsS7wGXSzPr?= =?utf-8?q?bmfMEQbNt6V1WGtbSqjAy34EGBL6ZHRlQtUOQq3UrsAukmG70aRXA3RhHsPR7otEb?= =?utf-8?q?ph+rrPuHLr24YAu2JefuLAS+y8YAfDRLuuWxiAwXSi37lumZKzPzBdL5uAtQxNl7U?= =?utf-8?q?e44J7yDF4VvroUkQ6WGSVHUOci88Y3q/ZEMUIYS6aAxGgiJAyUkpubcoPB2PGJBXA?= =?utf-8?q?OqrX5cRMZk/B?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f71a7c0d-ba85-40c9-9066-08db8e6f6ccb 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:22.2034 (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: lYt1kRh0/WdbLuYibW5FEi2QbE0BZSCIy1kP0bfiw+zV2gAf5lkC2edrf1xS2/fQQu427h5cJdmlk9/j9PTXtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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_BLOCKED, 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: 1772558363088862648 X-GMAIL-MSGID: 1772558363088862648 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 --- drivers/mmc/host/wmt-sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 68525d900046..74c475d071b7 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev) return ret; } -static int wmt_mci_remove(struct platform_device *pdev) +static void wmt_mci_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct wmt_mci_priv *priv; @@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev) mmc_free_host(mmc); dev_info(&pdev->dev, "WMT MCI device removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = { static struct platform_driver wmt_mci_driver = { .probe = wmt_mci_probe, - .remove = wmt_mci_remove, + .remove_new = wmt_mci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,