From patchwork Thu Jul 27 07:00:40 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: 126775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp938037vqo; Thu, 27 Jul 2023 01:15:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlFeNcBdcVmaaZ7NwZwmuw6SByg/89LuctdIYR6O4UnouhDdhV5UPDX9c43QdTRkW5KMIDI0 X-Received: by 2002:a05:6402:502:b0:522:2c44:a91d with SMTP id m2-20020a056402050200b005222c44a91dmr1235119edv.36.1690445718708; Thu, 27 Jul 2023 01:15:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445718; cv=pass; d=google.com; s=arc-20160816; b=UnLmFr0azGmoxQos3MmupJc7J8spZN+4g9XMHcwmD3VEM3MLJPzXVgklWRiF1XUlx7 Tj5HBa/FfMNClAQhmbGCt3sJPF2whvCZ0E2KDoUHtn7dbSw09nxuIQSkPw3qNl51cBTT Ovrr5IK1DOAqG3qdB2gwdLylJ1isfLbVP+MMFhF0V18jTNMD80MCIUbpG2w8K6AUU0OL 9AUiJRDQ3NUoa/OajV85wtjhgcuI3ovXvnTxxSY/HTyEP/F/POrdBGFReaIZV6YjCqtg EICzj+W0giviDYCwey76p8ZFH3I/nhLK7RGALbRVh+2eNo5GGL4B4wYL8aR6Fwp3QQmT YfcQ== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=ZdN+egXE/FyQLDJstn7KU7hD1CkxFELYo5cCXtG1lH/oxM8f+oFo0F81PWj25u3kkH 2Vc5I/RokLnMooCupytv3nQ2Gd8RdMg+6GdnNt4gk7BGUYuFXkyi7yr95bRrcAU3IiFm u6BDKjyspC0Ef2NrKtdQmLAZ0JfFugpmxwKvioC93rF7BUjA3AHyw2/Lcx0ztrbjJwue 4tFfj3jeX6/2MadkmMCXJuVi+ybQ11Q25KRJ87XiXTzab8Qd15yFuxYMdgeKjZIsP8X8 EL5O7c/KMW0gxka4z6PZ9jEHqEdsYz/ieI5jmpu0rKEN1tJwRb4vkryFkVyit7//qdq5 i2JQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BoY6FuRZ; 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 n11-20020aa7c68b000000b0052246a57e0esi652011edq.1.2023.07.27.01.14.54; Thu, 27 Jul 2023 01:15:18 -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=BoY6FuRZ; 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 S233178AbjG0HLC (ORCPT + 99 others); Thu, 27 Jul 2023 03:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbjG0HKX (ORCPT ); Thu, 27 Jul 2023 03:10:23 -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 8BEF64EDE; Thu, 27 Jul 2023 00:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SlF5YNQxPC0GvMlvQDcAamdkGso8OgjWxBTOAQtIY4GzmTTji49R6muBCho0L92NAZ/1hC1G85pQBvYAGjY9fLlKw4EZqaXVinebvrnxfA/RyQmlc49BPCtGTPvJ3kbfylN+glwfwagOcrhuhDRzfAC52358nMJP5tBxiG00u6CCAfFH/8QCRe3dVDppaitDsBHbjXmo4QIrHhZTOgDdOCOur6CCGmn3uH3CE1v7LAYJ7SbtAGVpNcLpNf0pvzCpzbaZuPF6fz9JeByOZHqUryZwsH+Jh9emNcOrb/wm8c/MCENo3L4zJswkmZPSAoGfGdcXP8YVQXy9T9MlctEvog== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=VhSQNRYXGkfTfzb3o7Kpg2D2cf2G83p75Opz8vWHx2e2N4rNWQSWEFv9R1B6QHxArpiN0a8b5BPcbP8l6Grfn4j5G1qup0dWQVezLfqR872IxY73pMy38WcG5cGhbiQJ9qWDm0az8KbK59EgURh5lGhb9f9LiW7Z8iR50I7sdcuPaw1pV9Nvl4y0rfhfr+GtGapE3XqipY9xge+cdo4YQYY+8HDmJ3u6KOXF6hm7o6pZjkHqw13CEzA8P1TeUFWEorABHgx+83McN1u8IHM82A2sQOOAHns91IZ7rsz5rhAmlMED7nfm1FHdL+EBNE0RyPNm6MR37th5bte2lNk9NQ== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=BoY6FuRZAOdca1DtGORzXiBv9ys0pOljZ73sVn3yw8oHhhw/qXjy0II4Cxyznq5vMdW37/6bS2NUlF4pdCGSlYh/NuhaScMiu2RVppbbMTDpOeV6FqyHdwtjcadzLQQ9OkrdbJVTPkV3MeDfphAdXLVlgkeLUdoOoNhxnBHTBTPx1FUAe0EvUYQK1VrW5veL/fr+JLHIL28mAlGSphpEa0tmmUX1CfWIgWISfEfbcppfdm3Va6atNaVFnka0ekLEbNPgv1oe03ZFDoBlQArLd1gqhffLfCvDrB/8RpGWdt3v+0kKsOtkEy7ZzHTKHkFD8DN1Y9CBMadJeJQcDbAozg== 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:44 +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:44 +0000 From: Yangtao Li To: 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 v3 51/62] mmc: mxcmmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:40 +0800 Message-Id: <20230727070051.17778-51-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: 9639d4bd-6a0e-4ac0-74a4-08db8e6f7068 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sY5403S8SmMp+vCGdB4C4Yy9apx2NX+bLU/Gcz5s60YdremJFXKRNY6hsI6DA9VjYaLoZ07QMaUfyJhYpRjBJC0qipjEIC7qQxcc3i2+6nG+lXxJUiBDUhCNKQ0nkDLQDTKD96kJ11vuCNRtx9uvtroglK7RUBYRe0rw6sjYGBeOhfNORk59x8uef0IBq4AfGp8bh7pwM7pTmjVckQqMdfDGuPtrGybgEoDjhjz0Mhby19cNBmEjZwxYmq8kCH43rtF3KTCPvi2GUWXh9HHeesbQvRJwyqU3bcROtM7b89u38ronomQjkO/vG6BEoF3+q/jn1iCvTTsi4Bno6D0m9QqYipvISHWg/HdaiCpUIgrd4P/xEL3Zhe44jEBgdeUxhjrvTO8NJCVT4SOtkTBbf6Vhipdg7Ve80DU2K6SMM9URs9w0lqRxoR/lW6L7hsgCQ6+3ldX/py5ZY8N5Wu3evUxOopcW7RlFczzPsPbNMFipU3Z7zqbxUxpL45b5bxqN/JtY4YVmMWqRPNhFLg017OQtpO1+Hk8k7Oe8sTsqNs83ba2Jb9pm1bXmQziWXgwkydIfSNUHu0E67exEFcKxuompuItnLYLukF5Ea2pLjPoIV6G9ih868Xv6fMxXuFzZ 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)(66574015)(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?8/IhjvV934C5z0QqEyiZq1U0OQnz?= =?utf-8?q?YNrrLK01m2Rg4GyIFUAzYb+QEK9Wk4i1lTUzVTN821FzGb1tWc2STuntL6IRBiI9G?= =?utf-8?q?drDqsQ5odaomURzM7EvtnKETVdNUwJt3q/KGpBoZgbpjwUEJzCXmpng47xhf4835b?= =?utf-8?q?iEltF4JZ6IMgdTa10i8/kYBFO5qm0cJZ7/U9NhSUZpprDO8apAvZWsK6Otuc5YE7T?= =?utf-8?q?AgmyUURuE9pRF9gwoTLIwWa8k3moEd7TUrxP/4f5H+0lzqOTyetO7kw6JBL2CO2TL?= =?utf-8?q?EcFCMiYcUmzTqrAitAjJp81DV6woS95Gcz8oKb2clOjUfn5tu5ytYn4a4XGfTOrn2?= =?utf-8?q?LiiqraceIw/elso/V8c67Ik4nSLOe8HE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xzebhSTG//KCWh64TfFl9Q54Wcg+bp/EV?= =?utf-8?q?awfXYosETeRNWF32KIFvTm9hV+LrSyyFFWkFp6KtLphWqPf6uvoPNfdB1T6knO8bq?= =?utf-8?q?a1tew2nXQThfwX41nAOvfq3vp5LcY05BU6bfumVvRIYCadDXoimPsJSITajdsKmop?= =?utf-8?q?HprF20NGQddPGLnyq3KSJksEC2WrgEKzSlnJKkLGj02Wm0PvILdleHSxHTxSfkC1b?= =?utf-8?q?0Ymq2WyIzpT+vEjkoYKoPvn5oKVtzlR8TCISbgh9dodaAEwxaCt8CGRAEzpD5mfHy?= =?utf-8?q?p782fGgHI5Py?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9639d4bd-6a0e-4ac0-74a4-08db8e6f7068 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:28.2786 (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: 2pkxKm7GEoyF8IMb2ZG0tLBflWzwdkW4S9Ldjx+S0CUb5Kf8OtG6pKcBWpdR2t7YfqccVSxd+YwvQwxXLfJtGg== 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: 1772560810017825005 X-GMAIL-MSGID: 1772560810017825005 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/mxcmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index f3a72569dd1a..133127e45b81 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -1163,7 +1163,7 @@ static int mxcmci_probe(struct platform_device *pdev) return ret; } -static int mxcmci_remove(struct platform_device *pdev) +static void mxcmci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxcmci_host *host = mmc_priv(mmc); @@ -1180,8 +1180,6 @@ static int mxcmci_remove(struct platform_device *pdev) clk_disable_unprepare(host->clk_ipg); mmc_free_host(mmc); - - return 0; } static int mxcmci_suspend(struct device *dev) @@ -1215,7 +1213,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume); static struct platform_driver mxcmci_driver = { .probe = mxcmci_probe, - .remove = mxcmci_remove, + .remove_new = mxcmci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,