Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp567086rwb; Tue, 25 Jul 2023 22:03:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEsfsRCxAOtirLWoc+DJ0In/CG3WFaUhUt2hCRsQdk4IGYvXxCVcauHqc2EUCvpw0cYXF9f X-Received: by 2002:a17:907:2bc6:b0:991:c842:2ca2 with SMTP id gv6-20020a1709072bc600b00991c8422ca2mr730398ejc.15.1690347838148; Tue, 25 Jul 2023 22:03:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347838; cv=pass; d=google.com; s=arc-20160816; b=sGa7nYy+8la1/hIg9a71TT26OJ+96ujvMAsQMmvPWZZcfUViAW71Q3vuldDn4AynsS sdRx5FhRD7WLYU9K7KCpyacsuo6tA1J6dVwyP62GS0OVLL6g+8BrB9YootcuqoBXUpT8 yY/6MjfTQdAE3PwC1Cwgo8LAE2F6T1CVIsf8KWNq2pzQgTgXIQ8SuSF+QWTRXf0LvvNF 1/sTPd0aFIb3enZnZAptjYmgm9UsL7IZDqNQP0YrZnfDwMghzjkTIB5Jmhqjm2kTu6eF 7yBN6AnMASVgsZcrs77a+n/67ByJDMeM+WTNA+eAp3VLTnXHBm+mRnzo/e/tK106tLRu Nuyg== 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=T2BOP8N5qUDps+eu1RzBAODHpPOAOh2HHwNCSlXKSUDUPb8cHPQoSLcMUxjXlr1IR6 EEoVSVSrz9HOEAoV3i8H1A5CT+g234O0LevAN1yv8HGPnRHa1TVjQt+2lR51jN6iyTX2 Tei5AYFWgRXa8YabCsO0RPSigY7qIPCe9HanscNgD3JDtQe9ofGZvT3ZRauBEZ2+/9VF J6Sj7pcNemYzqY/7CgC7xBCQzUCkkTXbxPLZD87avkUd4EPzlDMTwAMx5edF3mbRlCcQ 3Vi31llNYPE4U7f0hKLgZjt+zIFSgVP7AwwagkHxPEtKFeaYw5GwDa4v8C+20NM4XBjW wuuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZrXVzItH; 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 p7-20020a170906838700b00991c32f3565si9002483ejx.30.2023.07.25.22.03.33; Tue, 25 Jul 2023 22:03:58 -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=ZrXVzItH; 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 S231475AbjGZEI5 (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjGZEIK (ORCPT ); Wed, 26 Jul 2023 00:08:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1D04219; Tue, 25 Jul 2023 21:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iy0uv38j/t+RYn35nWERXNx/ZulHz7F9vn8gnuP1/LwfFqwrNAWgbUzQ2/4+7jRthu94vP23+Vof7d5sCx4D35oQiZcRjRUeL3ZG9bEiystFYPC/CwYNv9T0P2E7VAsVq6kVgJgq+rmnGJpLgtcw+n25iy3pH1dhKlhcOnbX65WxgUP9UzUxfQScxzHyu2SJrW4eYXtt5NeKCNEVwDBzB4mad+JUec694TmABVPo7EhvYLWzjRkPGr3Dd9IS+chkml50q/fNZ7wg+L72XWM9K5EPejsXorcXZb1sg1GRYR+fBjl/pECm01YyHz4OmP7dYpOWK8PWc3wmkIPfHRESkQ== 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=R7I2sn9fv0smlMaqr6OIcAn7iVfRQ8b5qPfgyod8krxtfMsD9HIi9S0lul0FiAdcsPJDHToKrAmjk7oGrV4ifjansrPNSTZEyI4io85yz8g6M8237eqVpTWbvtg1MgZFwPLfoszIjBqT139RKnoP78RO5jfPAlTlqabEtaRVLGs8F/KfMYO/zqBtq99Zgf62yyTWQc6O8q2OdyPbsZgXkWh//qtLkhkp4xgY+vAChu/AigpDwmqWIy1qrYa4R1TUwZpByHSDhRMcB9XolYb+9moMM1kTJnLIckdbn6yFZiH+/vHMcXUpyjtgRXYvteT6mDin8UWIAedoX6pyLcTzlg== 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=ZrXVzItHmDLj7sZLOSzCtOcNFwb8paxIKhFVLnPsqyP7pUGbjH6apScpwhCSh94HbVDh5xWl6P6uaSJpc5GJaDgPdXGpr9hXAopDr20BFHw7aGRfvDarVagaxTKLIr2tNLIRzHSAYSQmzBfJEfDqd9p0LjNDMW5jlRPjVxgobDgg7nEeTWBby952D1+Je3UntJfF4WP6HJ0xAOv4b4nFb4NaAglHDUrgXvTsDf4Zoke9tqidfyUl9QzDSe8xSQbw/vQZnQjy7zvkoBE5dRvXmDxrudA138g0aRov6Bom1Q2F0nMTn9fUT4wjzzGaaMkQP3aWt0GHNdF87f6qcSKzEA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:30 +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; Wed, 26 Jul 2023 04:02:30 +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 v2 45/61] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:25 +0800 Message-Id: <20230726040041.26267-45-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b04fdc4-df79-4158-48ec-08db8d8d1a35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g/4ybTHL+30vT9xfcG3rRj4zbkPBTyp6gNOeXhSm7fkUdF3iiQJ4vfTD4ut0mLOFGjgzzq2T1q48LZdpGhOVjV7DWMuls1FqlZX3j2IIMB2pDQh0vsDYg2m81sdEGwnIzViqZl6aGWeBKDMVgo+YMuVCv3SEDV7NJZqzH8/W6PqvYq2wWyAGPgVmLBEjSXHNYtO/p0212+CLAIA0VZ1abb7NkA35bBLosMw7jtml+NHdu0UkKQFg7iNX39Q9p9qZ6WfB7B3cPjttkjJzf1cN2r1NFpbnWYSqd1M6aDn9uJSnlcn8QhLeH6C1IrKwQkkcMPZQHTgr7Fd+IWGsmxNzW9iV8zmZzAL4v+nlYgxJczA84JnThSXKrhj3T18a3pNVRlI7bgnRp1xsT3D2b1IyVenaPbwaNldV368xayuXhHQBg7eoZHZhyA8SQ1D5pn9K8wvUq+w0qPXm54D3zxfXrM9X9cBszk5v3OoPZbwYNDt7th4WN92m//j3stqCYCX1W17q9wKRMl9egyvZ2hr+qocCs1x+uoK+0OOaHc+AYR1ILp/aGamwBAEC2nNJ+gxnftode7pvojT2s1LO+Lb3APYIuewwO5hDFixfXZBTB+tV/ZrN3F34kB+frpejjvfO 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QjJqVFQzRFN2TlozMVYrTDdteGNpNHBHKy9vbGJGUmlSUmYxcS81cFpLNHRm?= =?utf-8?B?eURXQnRFa2hvckJZaDZFUHI2emZOaDh3YUlQL2xXbDU4WlZjZGNIbWUvTG04?= =?utf-8?B?YkE5UHdQODY3Vmx0RitXVlBjSUlnb2JHaVpPTjlSZmw4NmtMY2FHeHBVN2x1?= =?utf-8?B?dWFWYllkR0VpNDlocVZ1N3doQUJoSkZCbko2UjI1ak5kY3R5OTdybnRsMysr?= =?utf-8?B?WGY2emRVSExEck1RclpKdjhJTC9mVlRFN2ZnZEE5SjRXZ0xHM0lYeEd6MTV0?= =?utf-8?B?MUVMeENpSW9Hc2ZnTGJWMHNNakwyNHpDeFYrb0tjQ2NmNVNOaC9ob09BV0xN?= =?utf-8?B?TVVmSnpDQzM5T3pjMEVoem5kT2RHM0FJKzlBR29KajkvTXhjb3l4STZVMkM1?= =?utf-8?B?MVhwRUN5bm91b2J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CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:02:17.3978 (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: L5c3xuTJzXnGt1jV2tMg2x1YcS4xjF3jRQolXAb4zznYn+jv/I6Yj0cij43gsk996boy1Ua87qN+lpw1DrlE2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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