From patchwork Thu Jul 27 07:00:33 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: 126758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp924640vqo; Thu, 27 Jul 2023 00:45:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHJ4YTIh5umkk9XpLCq0zaYrAGBU6N+1FUtesBX5M0TB8hv4riYzq0sV+l9NZoYUwPAbfV X-Received: by 2002:a17:907:2be4:b0:993:e691:6dd5 with SMTP id gv36-20020a1709072be400b00993e6916dd5mr1407533ejc.7.1690443914070; Thu, 27 Jul 2023 00:45:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443914; cv=pass; d=google.com; s=arc-20160816; b=jt4GOYMscuo9kmcbVJSSWi5eNDH0ttfa1//2fzYk7Isdsw33rFCvBXawPm0mapSKhS +wAKYpC3Nl0ExFdDgGIKtYWPTqulU+3H1GKs+teP8ISLprphHJA4EEC0TL76nEqdERvq EP57RFU+XYbxZyZI/ZF5gMmldWz7Q+bCvjRvE8VzL5josVvjL7VnWqPGUgBS1LeXCVsz whH3Xu2vQKoe9XHHTwiNPS9yRE7KC3VlyLVyz54IvLyNqAHSP6Qj1Eo29gb1JbP2492X 3BOwL8Z8INqsANLhkGtBuVGBigbj5g34cyoSVOfcthN+VFG9IK1MPCkT4XLtY94QPTGV zfrQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=weJnxMO/JvNscSDdbbvAdOBAtsAd87igE4GlO/+VsjOwsj7R2YigtMc8DljcxvGn2B /GjZ6iY1wgqrTO4DvnSvlc9vqe3pyZ8Pwt67wVpS7PhRs+/AAJHf5/KojRYCaUiPpoAA 6bmcfqZ7jDWZc3n3beOBy71tRCPNsoCE7zNn/lEo6M6RQHPG8EGIaHZkW6OQVxIaQDnF ScScGmlYlT3i3cbQbgGdXSH01NRQKnMP4S1Ev6gH6uSyYpPpZPHMitRB5Ahnhd3Bs7Dm 3IXDbXYeyQHl3KP/tVPVHZT9eevBdL9LhKQYAE1EYtcQpjyz9j4wck+PnaqVWbTFghTD lm9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FD8UFZ5z; 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 m17-20020a170906849100b0099bd73cbd7dsi618594ejx.429.2023.07.27.00.44.50; Thu, 27 Jul 2023 00:45:14 -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=FD8UFZ5z; 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 S232344AbjG0HIf (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232977AbjG0HHX (ORCPT ); Thu, 27 Jul 2023 03:07:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2094.outbound.protection.outlook.com [40.107.215.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D274D46B5; Thu, 27 Jul 2023 00:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iSo21CR5AlwULRAEZqEqRvnWqYN/jjVIrz1EC4bkQ9LX9IumEkEZe9gqfjIm//oXpbYz25u94rSHyQHmOd49vg1ApmS7zJyhj89N7xif26qGzeix+OmybkAqs+F8NPBx9UrGnBUF40F47f44HxNz7t0VF1VZ6y1iqRhZLGBGTyAzB/iIrQK4xem0IDJBXcNkIyA7fKs5FKrYavN7LF5hEY4o8m9zn5zdy8hda4bMWxc1fROMAikunX9m7Kn2pogptIj5Ec3LtuWOeSZc1Q5XylMHOZd04EQZiI/wcl2e8oghy8KiqRi5San+JLe7AEI10pnfsMPw+KgbRAYw/WmzJQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=f+UPPuPXa5j5gpzH7qOC03G9I9TmtPnpIBRtWfBcLZ1XWg8r8JRT3Nkr1DpLELRJb1Tg5IMouNUr6U/qdKcagmI25SouqyUYhJMh7WfpO4Iv5w4aeaj5TRSskagSQimONNfoglB88hl6Eg1iTRImGm8QgBj7xsuDQicBwsWGmCKEYr6bW+yjJtlDNbv245knJY9sp0VQPliQr1HchAFSP+5+wsxT90XbEMn0wpTeFvZH1Ge9qn4RwO3PM36LuBqoktn3cZHtAVJui4SRIkQiJtBMAjzBofEGVuIHv3mMpSTMstGr+SHITRprQLn0hVITRYrahRxqGmZ/guHnGJhJTA== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=FD8UFZ5zDBlXxHNCtRjSnJ+gwjt5dBMhdBWvqFTd2HddBiYl07qsxEK41Xhg94RS6aMyTX1uvVvZkAa8A5cVywFxe+UR7AzhAX4qr4KoAcvvkEg1t92EbRF//a6tBrFPYDAAPJ6DesePz2/aT9/MNzhk2k75qZlZaDJMxg8z3aYLiVvto2sCbrSikNDFVYTkRuAWpxXZHFN/6Au1u/zCtalNEhzVxUptZFNHDkn8fQkautjTsCF2Gk6Lo+QLZrHyH3eSiRBVfp6IDa9DDfEdOa7IpS0hsTk2SdJo0bz4QmWkRF3+NfJZ6wOOwcV86wsuYMqoAvAuvXJq4fcjLDvGHQ== 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:02:41 +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:41 +0000 From: Yangtao Li To: Jesper Nilsson , Lars Persson , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 44/62] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:33 +0800 Message-Id: <20230727070051.17778-44-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: c3406dac-92c7-4466-d930-08db8e6f69c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9KmkX6ocoWZ/CZmsyss8aWNQuFyKgjbUpQ/KgCwIpHhVVUIcvsYN+lHSKSWmIIqWmb3bu7WoxEJ48jtjSMlGXGpTAGQx3cJVkYbMlglCVmwewyqOdKW9nwlPyGnSr2eVHGS1mDcl3F7aPFg0c9MvGeBUYsuaF5FE0+5UNsgwtmQ7NXa4egIrCrhlaRuYkTdcLPudMVin4Pijh0G/1WoO2WGYqZ12x7s6+JI1M/7Q9K0cN4Bd11H8276YbAWUzgnJA+jc9HJy9PTIjbzIfZ1mTLu4M5CDq2uQ+5IHYX1jVIJCa74YQ2qKzJqtsi+1otMFmLM3/rIN4DEnx4RtFwsMW1KX2+LZkYfDIHXZguI8diHbb7vUAnSqAxxlsXquWcnMqbcLWk45ZI8r/vrbav5vHCil+G9Qz7OqqP6VGzxutvpmEWpunkBdh4GC/wpOV9dAURG26wqaKBjJpeL9Tq/fjiLrSLEHWqZ+VY70syeZxxKEVLjMTKpFWyNzfSCbNeApgYM6LrorwWqChPnpYvCNTihW3kFhgLjYxObmkdGZE7kWB5mDkLlFhELXsX64xJibWSctgbLbzeNOMMwVhv6kZPaJ55MaRAdpQn89xohx9kI3VrUX9fNRGBaQ78neSoke 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)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?POr/tz4M/aR1FX6bavBFeWcIpUOI?= =?utf-8?q?K9DMhXg8vltMngIkq2x/uuduz/ePtmkCfZxcCUNpty11QwYhL3FdY76nuFbnSQpzl?= =?utf-8?q?MSpuwfE/T2REPPZ/6oSS0QaegEa6LUwtBx8Vy7BMJqHplX+Kv/vo9c7MmI74IGvwi?= =?utf-8?q?G93siq316D/JPpkAvVWa/10OQ4HQy6U6eEOc/Q5aZYpVLPJKTaGe5sP64vJ3/KVJj?= =?utf-8?q?aPuF0/GPjta9yoFZb3Zq+h56nuBpXMaBlKqrsGM0HV6Fy2y1RTnpHumf0gTjiurhO?= =?utf-8?q?MZYv3YaoUaag1a5cJfQ7U8OeV9x9KYyGJp2Q058WZSl0QnuKJ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g/4bIXDGTsJell/O+SZxqv5?= =?utf-8?q?nrIktLg0Z2V2N0vGkl+XKcWwr/hLD6VJyweWzcFZXn0yqjMiwkhJ1Q05U7wTAsrfP?= =?utf-8?q?UrQNGQuwsnc4TzHGEge/In9B0m5nE+b9sX2CIa+a3j5iKdydEPAW7dOTyMU4toD+z?= =?utf-8?q?lL7xeSS6I2AW9wRwIeA6+i3pIaMQ8KSXzEHVuKybKUCoxdWSQyqgWVL+eLZOBYp5i?= =?utf-8?q?wWczSNMdFzdRaqaiveT6276biqIZiMEUmMlcqEEOsAnGN73DVJXeRSGwLdxLWWu0b?= =?utf-8?q?RYMw4gJ0yF4NdecPvZZ9aG40RFINj3PNaQReugWHh3/fc0OV3tVshW7n50mY6HsvH?= =?utf-8?q?REu6mNJ+7QU+?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3406dac-92c7-4466-d930-08db8e6f69c4 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:17.1458 (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: gPQB0WRFxiwTMHpy8f3oOjINW/ue11XvsYRtbKFOc0ISuDQaaJWSI58tN4gcsAZx3fH0Tz5r0AyhG/HNH79BSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772558917649561680 X-GMAIL-MSGID: 1772558917649561680 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 Acked-by: Jesper Nilsson --- drivers/mmc/host/usdhi6rol0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS,