Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2034297rwb; Thu, 27 Jul 2023 00:35:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlFKhID8KAwj0UfO4h3aJV5gZRueGqVwcpbnBFR7Nu9z1ulBxGTiivsQLVTWdDFmmynWg6uE X-Received: by 2002:a05:6a00:1411:b0:668:8596:7524 with SMTP id l17-20020a056a00141100b0066885967524mr4743159pfu.20.1690443343487; Thu, 27 Jul 2023 00:35:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443343; cv=pass; d=google.com; s=arc-20160816; b=x7fxh7b0kyOfWYB1NGyNeq8yKnL5zLmiwXYHohW3EDFMMPCB8Kr4olRe88dbUovgJ3 snmrBZotyz9g0pGQznHffazu5HlYA80/e+JTFLYSi/qt2xZwZCCH/tc1VV5kLhnTKR5i OHnsaHW5nLSzXP+Cf3mLBNbUQ59R4Qyfg23NGY1SoADedS1qKwFhmfuiZoqDi/NA74M0 9XvjGTZBs8He/bgcs46Mr34tlllx+ONGg97ZYP25ewAHp7RYGJo+f1s6d12M0ljWkzBk 78ea/keU1aeudBOd8u6ISuXXZgGJaNGqWRuK2SUPeue5xEcOVwF9WklTzpH5CpLrCPHN 9ucA== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=f3EPtls3IuJyZ4JBJpbZbOVjTRhXJsuTUt1H9VhXuo6erb22wdJRW+hcvBJ08C37yj ZmHxXf90AkVCNYFoFaQBY+lFjDIBNpklNoFIeFVXZFuNnTKesES4iCyCUCkMwMhoE04T bOgcLCJCm2pA/BXz5pA3XQJj+PG2dqRrb0MmNNJx1aAN+7RDiJZ+VdhYHl2IkLx5gAcy 54HP9x6+AfdWH3XHg9tNJYUlVNnNavCsNMHgixqJ22UVWogf4Tm+d+ZKi+2cElMxM4Eb gm6sIStI2kSxikWlbmwKzFsbVKZIoKuhem5fxdUhJm8f6IqARpyVmduI/1C5NyFyjQOq E+zA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ReVjkWZj; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a636d06000000b005303a26dbf8si880352pgc.408.2023.07.27.00.35.30; Thu, 27 Jul 2023 00:35:43 -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=ReVjkWZj; 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 S232868AbjG0HEQ (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232680AbjG0HD1 (ORCPT ); Thu, 27 Jul 2023 03:03:27 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CA0D30CD; Thu, 27 Jul 2023 00:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NU9w8CswZOLv+NIayUbWeV+ITuVFJFuptpIi9EXQG4Iz1YjRXnGAf2alf80M3HudD9WciIK7IRmDtmjbY/PykgPq8JgF+eI9ne49Z7XgwcgF4D/Nd1COtyqpe5ehEdNXkeSCK2MQg+0cUY61pa8nIHTufXCt9ZgAsVK/MKm8mfUq7F3G9tszki/sP8+DMhwA3uJGfY0ZGH2qxuh2tPX6ircJvjwhaPaLIPpxbs0vx1ANrlWHrQrB3+06ZMnM67cXCQOWnnxsyYpBQp141O7nCsEVPlzIzPh4HgLKVim+zpoZr+UZii2zUZrDlEISbCFA4FTb0QxvDKqTBNqv4jWn+g== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=Kfu9VKKUKUJQwFbvihCHRIej4xPqQ13yTsu11eDCFC7YItQTW5hqWEMlh//rdXWPso64I5xZY7duw0uT6EaPmLhIWMI6ad6xDXIhwnr3z0U5BswnPRAd7DBgkSk2TbKxpGT9lz+toX0OxufGJQtRXZNS9uohdpJYqHm5s19wmgl9XRROeWLgvCaRiE9wYUzoZiPnYnwYJPJk/uSKDQdptIRymks96bFEc3tJqPsZXWN8ukuykZgjaqQr+4xsA5MhFIKWKGvjsH/J6X+CezJ4TY3zGNDtYc2XPW2C/J1l1Bp4puH1DLzaXXF+TzV6ALEyQ0RlABdIXq3zgD8Nel7blQ== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=ReVjkWZjMTv4Z0U0aR8zmGIyvSVu8jHc2V3POb/fhEX5fSpvkzaeemiZjLFUoR8aQ9uewQTBAQCqGiKaPHk6xvIUffzn3C6yPL6XJ5Mf0GH8TK9zuI4q09Tzfm0ANphzzwnZn+H2ar0dIeFnVQ/XFY/Z3a/aa3LMT7GKCyW+n76MnXDFZqGCH14+KSB048KJUm90vGBX7+hgl5Xkse+S32s5i5a/Lrr109EDYXhEQEdy91h58xUcy2j+UjSowotIT1VMnRoex0mvoAVWC2ZeXokQbTeGXT/Je4wrtBSUXgGrTKI1mfXQYs3ahz8quoBMGz5rjgsp6QpId9MTdD98Cw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) 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:33 +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:33 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 19/62] mmc: meson-gx: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:08 +0800 Message-Id: <20230727070051.17778-19-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b45d1d8d-42b2-4a97-118a-08db8e6f4fa4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 85bdBFipXxlgLKe7q09VQn91rhXt1lWOFnHfKMqVc1RSWBz3v97ar4725j66zKIdoV+bs3oV+adS4g+rBHr3BI6Vto8vEBr3Z/29HpABVqxMAsQhl4GlprYQWPtpA9qbUHgG78u5y0cPpo0Bt+IPH1x4qG0lylXMspCJ15VGk0O6xF3+AiaJpqgvVAXR2YZE0kLvZ0Jlbj5PjFtswZwQqjzddIajcbzJlchbyhdUxcnh6QrXI+gAGeY4hmQ5NFfO/9IxUdO/91IDAQ0c+PWYoQ1C0aTp/Mu/hXpnUTHK8DDW0POv45mA05DdACy0f+IV41xLFBZA/B+c81BrK/qiKLp2gIma18kJvPL9UaqwJI2ze8bUOs9q3M089gzYHgUA//eCxb/JEO11EeiDWW2wZewd0qnpJ1bKDktg77khvyhk1o1dYKqtcf/A2m6VXEZuNzCDF0pvjGMeVeiXI4Hvolf+15DcASy/dZ+H2iXmq7MsJu4e6UiCO4S5OO/gl1r1gpH6FAzBhYYwLzZ2f75MrDeMn8+2D3CUS4r/7gF4me1QA4HpH7xgWn27HoFyOruDtxtRgZyDk8Ab2IjpDJboQxDf7xLGtnECsp3XqqHItAAWJ3udhzLhAziut+u8iMFZ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NnpqUGhKd00wMGVEclNudFQ2NDl6R1ZERTgrZWhDUU8rdkRjMlVUVS9lVG0w?= =?utf-8?B?RlIvSndXbEpEVzh4WTNiR3orSWJodUY2aDFjVm5PS1JzbEhEK2gzblRGU3dl?= =?utf-8?B?NC9aZmpXOEwwQWRVNmpMVTkrYnhDRjkxYXA0UHkzUlpMd3J5L1R5NUdQNEJJ?= =?utf-8?B?WUQ2VDVqY1Y2SG1VQzEyTHZWK2llUncweXZnT1BXSUEyWldIVThSL2txSlFV?= =?utf-8?B?dXNpSHNreU80UUQxRWE0T1lIN1lUenprUmkxcXZmLzJGd25IMEhXRFNESFFN?= =?utf-8?B?SVRPVUxyb0ZGZ0xFMUFUVUxNakJxZ0hhVHNvamgzUTQrVGJrbThXaGdnMjg4?= =?utf-8?B?TVhrYU1sb2hkL1ZrMTFp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-Id: b45d1d8d-42b2-4a97-118a-08db8e6f4fa4 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:33.3174 (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: PrVm4GwDhCOIG/TevFu+MkR/Y4kSRrudbHSOqReu5P3Z8wicv/3fj9vWFgt5X3aggvdUcUNxOdQ24WTZyTkV6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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 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/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index d652374f37b2..a2601d0ece71 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1294,7 +1294,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1305,8 +1305,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1337,7 +1335,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0