Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp838516rwp; Thu, 13 Jul 2023 01:41:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQzzL0vEnPw/g5uBhT89P2XecxyRc9PNIc76a0hfHH6u5pz2W0V8wT57TG16mH+wxaJFU/ X-Received: by 2002:a2e:84d7:0:b0:2b4:75f0:b9e9 with SMTP id q23-20020a2e84d7000000b002b475f0b9e9mr889125ljh.10.1689237690809; Thu, 13 Jul 2023 01:41:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237690; cv=pass; d=google.com; s=arc-20160816; b=kkIpzwXZdZU3V0uNQyxdoJ618qu0kFDHhj+0es4Id1F9rfGfkREF2nMOhyFbnbW35r /VaO2gfj80W8lqSroqf/4x65diQ8IPSa5pSiFLAIQsHMood9WnBohFW/be2WwxmqXEBs zRNsHRgmdmcHM2IprdqkFLh/hRA6ug2rPF3/W6hHmAHSItme6refUnThRqwwxQt4h/Nt 7Jc4e76QtclYn35MDF6Ln8d8zHjpq7Dr/9zWw1GfeuUGReUsoetHLNt92jIw8dBYpvjV enrjnOwo2rkTukVzWwdlFjzx7Ny/Vbjch4f88kvjCEiwp0901z8Ch691EuDdecfX+U8P UdHQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=qeQ8awKifsYF7WqQHc4n4NkmQvIFqPedfiG3G4EyjTvUe7fMXH1dG5vMWwW5lDhxt3 /EAZ5ElId2fFw+X3BFNvdYOgC9s0KEYXS4UxcV4lRcEvEzbWhPcLlm10QIMM+RRZL/u7 HCldIh53fwmMQpAEWF/8Kjzds2GNua1FoqW5OKWlR2DGjeuCNrNceyfE4sDIF5lyuRSr dXoy2JU6ncQNw6SlqkFdpQKxXyx44KokX333R1tlkjPgKPj5CnguT5bi6qasWoORey6C 2MiyCXCouGWykJFlpi0bEV0eg3HwlMdl/pjzZiLwt9C+SUGUZOBsurd9gp93QmqO+ice Mw2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZCaz+22R; 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 v5-20020a1709063bc500b009920f18a5e9si6480276ejf.728.2023.07.13.01.41.06; Thu, 13 Jul 2023 01:41:30 -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=ZCaz+22R; 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 S234132AbjGMIKu (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233916AbjGMIJv (ORCPT ); Thu, 13 Jul 2023 04:09:51 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66B83582; Thu, 13 Jul 2023 01:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+7LzO2ESswEnHho59wiFdaQUo9TWJcrJdrYkYh0WTqIKCmdzhTzDx22yZ9dM/TA2TT/nhv8s6VFw6uSUuohXZbJKI9IZyPQNxNRtwGA/zX1HTXU+Ucl8q0WC46Qw2KvfjutlqX4KhRpIXhPeAuo5+zqgvXKsAJj+PIGa44+mwAL8LI5UA6NZ9bTu4nHimugctWG8uJzAwk9oelVf5/seP8q/nlyXt6FmQK7oBIvIv5NkIDmwgZ/FiZ+rJCzg5dY16pDwN/zkvrQ133NecEe3x1SHJvFW0KZT6kFncLHT7Ya6dtjrok/IA//jP+AMTteAIyxtm82NcrMeocuY1ZmCQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=m1cWayIbTldEt5v9nrkODjePljP7Qy2nuGdjz/SGIBspLhWwfztlBzuonwAO3yDTUGyNupzkpIMxkr1xSlDDCGiPMWZbIecqsCq7v+m6YdGSiI0ZqHHrFOl+fJyv6l/9TY1P+O7Ghus0FSCPygea5GmTI7FBzj7Z/zRDz7VnVq5NcHE1dMuTswKhcqdlE19sxnt9JkPhe69XOOuczvwcI5rPSgEkre04TLxmmNRPh2ZoCKkI2Txml9+mosNQ0W5TSP3MUzej8uZ8hZEXIutta2WvzwuDRu77m9y0OFyjHDSAWg0MDorDEXULQS4x7frMwVLXpQ2hrV/4VX7hOYXgSQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=ZCaz+22RWlwS3FKoHtLZTCCOJ7Y+gO1FFztXd78kX6G+a95T10Haqf7SLUoabvArU8bHb+3h9VeB3++yXUu+hPjSq9sQHY5BxajBZVfHRdWT55wcTeAf1STASwaxTc6RBNDDwofi4+4dqjLZEBtI6FPY3SrtXcyLIUE/6ZX6KDJedDk604VYqBO/I43E1iU64XtjLrzSf7iAJIRvmh9gU22/0S6/WSNqD2sUDrSmdFPtdaT/hjwC2U3RcBMqvTZWMd4eLMZcZ3Otxpii3ZXR8eML4dQNXd7EFZsjcui6Iw6iLxSV9AbMiucgoQF4/cWgd+BBiNEepj7zaba/cU4QfA== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:36 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:36 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/58] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:19 +0800 Message-Id: <20230713080807.69999-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 3944338e-25a6-4ec8-a567-08db83785bfa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JU5xiBp+9JigU0MgYTTjylbgYboReiMXfzOugT7FkHCibxFFqLoyw9oi/JMGkx0RNgwDyLzbe3Iy3qaMnYqxR8l5CRYwIByMQXu23XBvR51ZkScDks9jaNLnA/XiELUfg4hzPobW++EofqEmRAQH8ubl8NkId6ZX4RzKsheLMIH6+9pu8I5hFhfW1h3p38k+aW7DSEcXUZFHseJXbrOnlizkLjQUs8nANXNzmaD4g3s//Nv9ghgRJOU3M4x+/J/fqpxAuXGrDngIB3AtdNnacJELS2q5Yv5uLN6/w/DnkgtG9D2tbY4aPhHblYp4ahWmLY1eq1KrwrtW6BUduqbFp6GfNPKOxPmTqWSdJ5oHzenbmml0RnblmHJzdHbfo9r+IwuMMFOi9BO7ivGEr3t0WYXrqjZS14iApjusZUUNK3QIN7MZssWdpuxlr7LGifFyukKwMnjp1TMxIcDDveEOG+vt1TkAY/EOXbxV+jLpCbYyPz0gEi6wHKfaLrvE1ebfvtiyx/Bsika2lYYzAHHvGqYH/rRM4bmHb7UmJSMNOjqwH/kr8GLgqwssxepkNcyiMcbSYjt0fwmoho7huFPmD2p6ZvfgjrPPgGdT9+Mi0vOg/bEPHR6NhBY56KCUwuGxMwtDC6Adhxw3ZIEf8bSPyACiLmpPwZnPmZPQJ1kWuCg= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZnUwSEtxSzNxT0dERGt1QzVzakZLTnhzaVBiU1JaWUhlem00cUlFa1ZpR3Z4?= =?utf-8?B?eGJnWDE0SFErcVJZNXJ0L2p4MUVzc1pyN2ozQWNrZjBWdnFFQ1ZYSTk0eDZJ?= =?utf-8?B?c0xNVU5tM3NhSjdVZ2NEZFRydER6U0wreWcwbW9tZU9iMFBEY28zL2djWjJ1?= =?utf-8?B?TFcyY09YMllXUVd3ZHd0ZHRUTDhtWFcyRlYyY3hIalVOOWM3SGFsZmlxbjN6?= =?utf-8?B?N2tqWkp3NHZZV3h5cHNCSmZCb2Q0SWhqZS85QjRHY1FPUnNSMC9QamFuNFJT?= =?utf-8?B?c0s1RlI1SFlkMW9PZWw2WU5GYnRzcUtGZzJ1TnNIVUFXdFM1LzNzemZ3aFVa?= =?utf-8?B?M2xBZ0Z5eHE0OE1VQUUzUGdOU3B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-CrossTenant-Network-Message-Id: 3944338e-25a6-4ec8-a567-08db83785bfa X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:36.6880 (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: AIlYVeMllta3UBADv+Ro8GLhAAdTge4YRG3Xyt1V1iPBKv1z9Jz5o1UMew+NpiEK/V5Vr0N8LS+VMqScjyz3GA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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_BLOCKED, 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/sdhci-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver); -- 2.39.0