From patchwork Thu Jul 27 06:59:56 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: 126734 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920631vqo; Thu, 27 Jul 2023 00:36:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlE33tAJjwh/eFKgPZYHV4TkhY8YrpKXe/8VPLy4intVah4oZPCtusN+D5hM/+ogzBgo/KeY X-Received: by 2002:a05:6a00:3a1f:b0:679:bc89:e5b with SMTP id fj31-20020a056a003a1f00b00679bc890e5bmr4378333pfb.19.1690443362803; Thu, 27 Jul 2023 00:36:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443362; cv=pass; d=google.com; s=arc-20160816; b=BODAPpJb4rwQPMVlEupSEc3ICD+8GYoegq7DgPs60MpHaj5/x273WdudUkW/JPOqF3 xkM89r+RnureJ9Jh0prPwUAK+jan5IIozgJMHL3ERChh+AkIgwxqypJPBc6K6z7/0sxM ow0VT38iY+4J312NbdQEDgKf19WXo1qAIG7xwlhH9hD2Ps4qR1Mai0w3W5b5fyakKnWl YIQKX7tplB7Uvmr0acxxEkO88lp/4voLeE5Be9+PwSYv6Ru3sUV0J+5kAlwtZzMf06zo 3kOIRb0SRSBqAaPkxsWSBs98MMRHa9YHTK56ELIbKhbBEoL/1KFkrYcMNkiIGtaRItgG MvZw== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=S8M2mFKvcqDoRXEhLnGJ0tpGgEU2jo5IA/3fDALDZDI5Qerj8purDjc2iNPVO03y1k 2LwGHeOkHCluSawPlqHzj2vojqIFFr/eeLHUzNdsP4ffe2f3grY8gqFVgHWfFv6j0D1B CyZZ4G9odVb1tolkZ+1ivAts8SAys3D4tKYUIAlQ5XgSjEMIGvYHLSjctRJzQ2AzgSWu eDVViyNZFDTT36sfGO1lHFokltm8zsWJuwtvcMcT7Cc87mkrQnWRbZ8j1Rfuf3pWy7iv oIL2/DrRdXlhirKAk8xmR293RBsqOngxcqCZoWWDWjfFPLseeeDnahnXHoZggVuNRvlw anqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jnyUevhP; 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 fh6-20020a056a00390600b006828c76a9f1si1012852pfb.74.2023.07.27.00.35.49; Thu, 27 Jul 2023 00:36:02 -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=jnyUevhP; 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 S231486AbjG0HBu (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231859AbjG0HBT (ORCPT ); Thu, 27 Jul 2023 03:01:19 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F1226A6; Thu, 27 Jul 2023 00:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fEe7OF2RFmujTYC6kYlCQDq/+fso6//badFPk13SwphhDewiPk+t7UTS7Y+1K9HntYflycf7MUcRbpnfKJZO8NBGle8ThofjXoMGT1u8zB+AtRRmaLO2CpKsUMHRu2dsraOpvsJdEj5Q4jaa49mK3gTEiAoEepIPEJiwwXHdIrbs4FlBlgEGgLk0gPHPxbRgXKj/UwsU/9VHOd0vLuXoWdvJSFEKgbF0MYSMvjjCacPuA2SMtkAk+JxDNf4IH0ebDUCQl5ErEjKny5XO8U+MHYgF5orSZDY4CP0ZG9RkecurBgynws3zhrwi03sFgRR13gVe6UqPG+s58faaKylo/w== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=jooUmuxIQwp4hkknl2C8SmQOnxui8JdbQGjqpUzm9BLCRGYq48q9BZETlf2lPm+QS29ridlTi9UTiiFasgvQbPB8QuKZyDIrYZmPsrCIX4ns2RCo9Q8Zhl5G8tox3Szk89bDVeZ+a9x98fKAw1ZGKT9BuYlf/wwmNEX+b8RzUsaK1UlN2pD0TKqqa+1VSev0/8OKGmawujj7mtvIo7IvZNJYkW6bGvNrLqZ/jJbRIzgptl+cWkHEO7c7vCoUIEEfSRuY11Hhw1E3j/9RyMf4l2t/bl56B13qRD0Bry/beqkahUe0GV6Wx5wbiGpKao5NK/OjlEcZT1Wj9ugByiW9yg== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=jnyUevhPwybGl3lv4jrdxNBXPK3FOHYgJeDqJiI+dlnFFYZxtPRAuosfgAj7kMM3DScJaTqP4wpShlX+yi+nVkTK/oZGapM3/YFulVhLNijC0QDZRL6MmwIHCz+Id4Pt6PD+bnIEWHprM66/j4mIMxU/M3ikaMypesZibssTtVCX5jq0FRIsUw0desYeZIMDjARdZZSFKSghuNlFob2Y9kMdIbAzakD//8MC7srW5b9bJxOBe8hVGtHLKeZlZgtxl2P9ALjIz4w9JxiJyy+VNN8X27D5+BpeQwIXDJdn7FTfwgwS6q9GOVzbGtYdi0n/LF6t8FnKwfRrcIwU9tyO8A== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:13 +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:01:13 +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 07/62] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:56 +0800 Message-Id: <20230727070051.17778-7-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: c9f08c3d-8f24-478b-c605-08db8e6f4402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UsGP/RV40bLflh50vHlztjwD/IwdOJ8UBH6VnYn/AzwZlM3H+dPQkFYGH9AE+nsUHGVFyD1dipD99vDX0T9xWOyV7Jq7DzrJTmtp8+aHubadjbvLkADktWNTOpfSY5/KmEOx5Yvz8ecq9FIAH1DSkxBbjkw04eFXYF8A52x9NRJWh6eFVIF0LSkWOKTvvufuNwbbSWQ/XYyuQ0R0qYY9rK12BV/Bqj/Hnap2oa95kh8YuN2C/6TueQsHXgBZo4d0ubi2KojQu56Tlog1uxh4RSOR+z09EfBhRlYaaw/UHiUoy0+LWxcB/Pka6Ify8uSOVLhRzPQS/7/Hkl/Wp5hutyswnvOC8imlsgQ3TEVzyV3mqXcEm3yffdTxNEvJ90HIZwJiuDWeGdeU+8r0xhh9+/gY1v/A1nXYGMnizUmMpNGDGtqJdSdYid950w/UmqbFpp1tonctQsdJRphGeKh17Oq++raYyYkG6/rxBCb5eqWyp3bSIN7JxpQ3jwvb8uBIV1YSxz1rQcDh8Ipsi0n/yPwxzJE4Vzpo52myxs39+X73a9LDMeGkxHstP4wW5zSAOYK060ZHUZXrYYpPjdhvS1ZEzAkgLri7ECC5YaerP0VS6SQd2xbyLNV02nW0C0BM 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(6916009)(8936002)(52116002)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?P3l2pqRSbZylBciQ/GgMaAeq6KE7?= =?utf-8?q?P+dCZvr9WgFOLjtASAQG5NtQ82Em8QVEVFV51TgvaCzMJAFfo6I9k+Y4Td+5ovI5f?= =?utf-8?q?6FXUD7cULL99LpvmvI/WE7zHyQ8dCFj0wPz6DhL4sOV5y4S4iWI4SNZjAN5tJ1Cin?= =?utf-8?q?R2ipsAbi8zT6iG9JQO7g+ZnDuXPELQsADlg+AhIT+JRjqLwWsbY5GAEsUylYIMcVM?= =?utf-8?q?/BSeCya/A4CH2p4jQC5NK/gorGZjXgwwCiW4R95dtU0+lMSzFA5ZhA370TpIk4baj?= =?utf-8?q?5pAXdmE3ldQAF6R2EYnjGrqttUQJ6v51FEO777vK7lqqC7reSon4NkJlf/mnBAwKQ?= =?utf-8?q?D3KXVE6p8OD5lavFXp7ySXD9D7Tyd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G3yhUnrS2CiHM2I6dK+zXU/IvAox+gs1XSIC7?= =?utf-8?q?XA2Q1R7fbSt5wcrRBaeuI10k1AbBoEzt8wcH78IF3Ykk/z+eLryEHbuWe8AUlAGsl?= =?utf-8?q?TjFgnddAvLtsh5Ydimnj350nWazSodqJsZLcmUBsiyZIwVekzS2YGQTqiA3rheZ3i?= =?utf-8?q?nK02GqwT+iFIW59zmtnn91XixX77ggYg1qLn1Vo91c0oYS/uHtelDKtk3fn4WVLN1?= =?utf-8?q?sEXw+I4Z1d9T+Pj4nlHh+6OeA/wd6TvaMYleJRz+PW5dYEPVJI3fXyas83bIBZXOD?= =?utf-8?q?KGaq6fQXCRML?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9f08c3d-8f24-478b-c605-08db8e6f4402 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:01:13.7948 (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: /HYuJhu78zYIOORwtU89mPWkVgOsVLuY3HR6Vj/7Gx/Lp6WEK0G0A6w59YKtKKYSssAC6Rha2RlXjprJ+W8gPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: 1772558339449473254 X-GMAIL-MSGID: 1772558339449473254 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 fb686c0d171c..3757e4ebb614 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, };