From patchwork Thu Jul 13 08:07:16 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: 119611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668259vqm; Thu, 13 Jul 2023 01:14:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlELPMfDB46VrQ4l/CyDxIyB5OwPYdM+0uPfc7fIOy73DTq0o7lHxX0iVjCplYybLgdPH788 X-Received: by 2002:a17:902:ed13:b0:1b7:eebc:884 with SMTP id b19-20020a170902ed1300b001b7eebc0884mr344848pld.64.1689236075613; Thu, 13 Jul 2023 01:14:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236075; cv=pass; d=google.com; s=arc-20160816; b=tl/tp7hfhGksO6UTKseUBYSuRRhE/KtZSJNkZUtldJMmn1Jv643EstDyaulLndruZO otCXAdyBZbdIn5Ia75tah9W15dHPkKkoDAJAb3F07oMhwFE2hnH67ixN8YhN3u2KVUDi i/AYWX1L+CBM3AvKgNEQhYjlI0epugmEisIF/4wRTNn4rzzJoxpDWIdEfV/35GJK3Pvv t8g1kogPyoaD4k20OLcY/c0lGCL3bf6tYQIgqUHc1+aagrS1WOb3f//dr+8LsXsa2dcy ZRkmfI5cAqQykWtCo9WnccfevQIc1xx58wW92SKHMj6FigjNx9iqWzNXiLgkKQ3lI2ij xbMQ== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=Jxr0AiwJXJwkExxLL+ZSC4D6+Wi5zc7D2LuXJ7SDFjHwMNszinCFzX3Bm9dvP1wWQc Ubs7L62v3QIxsMHuqdb8/ucl2V64790vk42XccO5cNYMienhEnI0EtfL1TiJdWC0wxyu FLXyBuG2Nn1BAs5czbEHZFB2ZFHvxCDuZj6USR4HXS3cdZQyeLCeqRkxMNiuXzDcd1/j Oh+eJMkbTSf6GXC8OrsxBYlU8HguCup9s83fS2JtjmOhhRFsk5KNMbqmIoxqPkOzTw9g 9a3kyxmXfQm2uo5Xn4OdtCBmrfs9RRm9cSzezhpYfsbcWilYKkdv6MWb1YjTkWQ5W1Hm Hmzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Mb2jUFQd; 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 jj15-20020a170903048f00b001b6833d605asi4742843plb.371.2023.07.13.01.14.23; Thu, 13 Jul 2023 01:14:35 -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=Mb2jUFQd; 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 S234092AbjGMIKi (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233879AbjGMIJs (ORCPT ); Thu, 13 Jul 2023 04:09:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FCB3273F; Thu, 13 Jul 2023 01:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DyISleTuR9mTcZ9W5jANSz2+fRRBo2fepgRDvwulvC2mhWpxRLb6kmPpHHL7YtCGWgjHPK7C7wQRSGLMOt+zr9BOtTtPUHC7wcyqjIrpdf7Q69qGMfDAZw3E7+3Xe97ks0Vcz1SheSSvsi4C6uRut29duONCesLLdvLMDeR7UkCC3D5O71yrXDK/zI4uJg+Yw4BUayfo368Gh2a9zj8xy/VZ0lO5+ViMQODl6YKTAQl1CAWu7zQ56aBhR/R0Wyxdllnrue2D3fz+Kw1swvbLhUguvV+of5OcZzWEXUWfxg4NP41dfYNJ6TYAjR3BMDE8SiJpLIbYD7MpbvA6Ajq60g== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; b=ZoK+yUhggWfajeDUprqKA9v+r8ovBzcV75DDbLHBV/COwGdH9agih0I2LZAOEkCZ/yUhk/+jp9qPrEHX3aKxwD4+aeTME7tG0jZ0U8dCJpvk3vxpdZbeyyk7fqZfQ1NgIqkAMAFiqBsCsjqg3t5smpXqEFanjwB4EQOtJxxAFC4zj44eFs24+lgqx4jNpy/CY7c2DlyFvSlJoKYisgV3k2m5BsXxQdhzEqf7tYFGyaIVm4kCfGl+2wpP5k/I+xeB716hP7M9TGvuWMc1l/QRxM8jpbLbC2N/nGcxO4cNgOp8fK1oViW7bRe4FZxuh1R1coxiz9nx2Oel85C9wd3Yqg== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; b=Mb2jUFQdWCg5hrDfY/OaLhKG+MSJWIPDbF0RxcWxYaNyw692k59MzX6cWtFJImNCANCcmh8KrRt8aI7TX4YsNs/26jLJh8nQ/Os+ETZ8HMHLNn0JupuJ/Q3Q5q94gn1Jo2fsXEDyTK6tKM5Gw5+Of0Zi8SfCf0Wn6ZG7Sf7Q67lZgp6xnsIsjOqiG50dfwom0k2qU+ucoHaWDrg2Y4kqw80MywjOLlRONz3LA1rqc2KEetLZpnRWugm0eDh3968uuZGmjYaCbRoMsgBqwSWPz7aLq8Gta8N5v18zIsgCJfoDRD8e+emhu1dhjNcK4IYfMe8481O7vTky3L7dKY2QAg== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:32 +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:08:32 +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 07/58] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:16 +0800 Message-Id: <20230713080807.69999-7-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f629f65-9977-4305-23ea-08db8378592d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B1f8uWHkh8/kk6h5YiruNSZwowt2K1p64+smHAS7yS87J+2pFXRQBpM/DzO3sQwqDh3eHDaauC1NtawJpLvoABe/Dt+3Fad+P+H8ucOqTlBF6dUeYUGAE5nCbWrybRoFG84D0tyFLTcWRO3ZM5vfSkz63fofDGHDcThmY80VjgX4LR6QJF2yY0fNIMmFbLb8JA39/no9nRdomjDxFBI01yGd4r9fjZa9uSy/bNgOBKvrjj63Q7FvBsEvBaHeL67wmzeITGHS/69cUxw1Ua3m11oZv/puVI5pDNPHiH04IiYmI8z5ZGpvidUivb5OMyhxiGt6dFncAMNTEzLjjlrHFGsuV+YicqujPuK3iXsx8+bx4Gzp5FLoEHiRWn+yAL2JYrYhn9fcqBNh2Xu165vmGuy6wfwfOJILWUWZsdRM8L7zmp6FMKWjYzAYxPVGc5mLUHULrqSrtdWIW7wkT1Hd0Q2ZW7WjuqLoONNGnUaj4wUSfKZyo+cJWb0W1Jxg6nP/StUbrC3mMDCsX1SqEn5KnOB7lqGNJ+Dpz23+NyJF74ngssWHk5cdJJ3hFVnH+OZZENDH2I3dAEhex31wbym9qP3rxWzXMUVt8XnAgUmk7oOJuUi4XIV3sfug6igqHgMlxtZ2j6AW48u9RVE4pQsEb/US5Zh+WHeLxOUXibCGjHc= 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BusXG2Aco3Fqee/kmOxO9Vk0dWU5?= =?utf-8?q?jW0mhh4NFKSS84NMjfP9XboaV6wDycYudrrQUz/fxYRVNkiEQgxY7iw+ntjnRQSIb?= =?utf-8?q?1yRj123R4s/Sf5C6bcmRHwDz4lgv5dyQ2LR+uxHho/dNqVzkFMgW1JQOLBePxqLk5?= =?utf-8?q?eIdr8T9bJ867qMtJBuyorpNCaygvAd641hd2oK1cBoECj3Lzkj2h//duc6JPB40EK?= =?utf-8?q?Bm1qE91/3XO2XCpvE5IOyGxJj9f4YP3Lsadlas7pX0tkDcedZRKDLg/nh8HcomPKQ?= =?utf-8?q?Wt8qq/eRfwStxEyQGStTkFiqAqnlRb6XdajWoq3N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qdZkthBDJmHURmiGUX/DR3DK3K?= =?utf-8?q?+cF9SXvJZkxd47ixVyG6RkJiVk6mvdyOs0OawW6megjGobPoXzdUS9JZWsa82Fq8k?= =?utf-8?q?MjeXEcQPH1NALhm4IPhLlNe4Rare4oWZyOgdds9Mphoj4B0ZeULovgLhl5d4sG37+?= =?utf-8?q?aAs4LUv+GGp47jBqTig8CTIyZZqziCX7EwlC1VxXp99pUPPPKNk3v3vyhFKv7SoEf?= =?utf-8?q?JTvmSA2daXfRwr5giZJeNoMJv80YBXWbyT5O0p1iOAzPwGTybtim837ZcMEwa27wV?= =?utf-8?q?+16Lt9HKzSrtAk4mb8lboLZAbuqFYwVLIZHxx1oZLpMPeqrTdu6HvDMb2/rBgXgER?= =?utf-8?q?P3AjrXnuD480?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f629f65-9977-4305-23ea-08db8378592d 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:08:31.9944 (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: fgckOsaNr6/uPQhFXpvEttvE85IVt/77et5ffb/6D/JPI/l+JsRndPGOObDXE5/8yc4cBdC5WK9oL4595QbV4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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, 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: 1771292407524913648 X-GMAIL-MSGID: 1771292407524913648 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/davinci_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 7138dfa065bf..0a08b85e35b0 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1345,7 +1345,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return ret; } -static int __exit davinci_mmcsd_remove(struct platform_device *pdev) +static void __exit davinci_mmcsd_remove(struct platform_device *pdev) { struct mmc_davinci_host *host = platform_get_drvdata(pdev); @@ -1354,8 +1354,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) davinci_release_dma_channels(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM @@ -1402,7 +1400,7 @@ static struct platform_driver davinci_mmcsd_driver = { .of_match_table = davinci_mmc_dt_ids, }, .probe = davinci_mmcsd_probe, - .remove = __exit_p(davinci_mmcsd_remove), + .remove_new = __exit_p(davinci_mmcsd_remove), .id_table = davinci_mmc_devtype, };