Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2037892rwb; Thu, 27 Jul 2023 00:39:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/6YVAqTYRi2M5ww6PrEqAWgqt+fBUwN0qNKlrfydTfr3s5/awOc4Lm0hvSDxhIVH6ltuB X-Received: by 2002:a05:6a21:4842:b0:13b:a261:5cfe with SMTP id au2-20020a056a21484200b0013ba2615cfemr4276757pzc.32.1690443587125; Thu, 27 Jul 2023 00:39:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443587; cv=pass; d=google.com; s=arc-20160816; b=zLYDSsaB9G5pR5bj//ry4IoveH0xKga2UdXXURvk45AtBNA63N/mN34Xzz1AyqgTEU sXFdrivJ4enMs5mVGsUXUzbkQRNj8ijDcuoT4MFOsyvg7TfIdo801zqvR+VwpRJvOPMw YfWgsbtue4+3Xjm9gtMWUG1ylzr/nEVF0fiyr4l8TJ/EGQvaguzhHAYpwyxjEPoA26E4 vQFJZZkH2sJB7VLFstFWv0Dq23vyvzkicDsyw0Sc/JIeHk8FVW232qyzelRujL3AdbkL eca0G2ytTA3Mm0ZEoH/vkEmer9cfrJN1JFIS/PFPML+rLdL+LrdXsgh+i3VlPpAnQNJJ i2rQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a631950000000b005634fdd0979si863146pgz.496.2023.07.27.00.39.35; Thu, 27 Jul 2023 00:39:47 -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 S232306AbjG0HIe (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:34 -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=20Kleine-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> 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: 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?B?UE9yL3R6NE0vYVIxRlg2YmF2QkZlV2NJcFVPSUs5RE1oWGc4dmx0TW5nSWtx?= =?utf-8?B?MngvdXVkdXovZVB0bWtDZlp4Y0NVTnB0eTExUXdZaEwzRmRZNzZudUZiblNR?= =?utf-8?B?cHpsTVNwdXdmRS9UMlJFUFBaLzZvU1MwUWFlZ0VhNkxVd3RCeDhWeTdCTUpx?= =?utf-8?B?SHBsWCtLdi92bzljN01tSTc0SUd2d2lHOTNzaXEzMTZEL0pQcGtBdlZXYS8x?= =?utf-8?B?ME9RNEhReTZVNmVFT2MvUTVhWllwVkxQSktUYUdlNXNQNjR2SjMvS1ZKamFQ?= =?utf-8?B?dUYwL0dQanRhOXlvRlpiM1pxK2g1Nm51QnBYTWFCbEtxcnNHTTBIVjZGeTJ5?= =?utf-8?B?MVJUbnBIdW1mMGdUaml1cmhPTVpZdjNZYW9VYWFnMWE1Y0pmUTdVOE9lVjl4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-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 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, -- 2.39.0