Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2042455rwb; Thu, 27 Jul 2023 00:45:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlE639vq8i5QTcaPRClCAwNki4Cmtf1Siw2j2gF5AgS9SJ6MaeSrb/sHV8KVmm7c/oSdBrhA X-Received: by 2002:a17:906:2cf:b0:97d:ee82:920a with SMTP id 15-20020a17090602cf00b0097dee82920amr1302387ejk.74.1690443938589; Thu, 27 Jul 2023 00:45:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443938; cv=pass; d=google.com; s=arc-20160816; b=Io+UXDJNM8yQqkjpL2MUr0P0m6Y/Ca6uiqDr9ToEB7h66/gCU0UxgojnmBd6C/zFeT qAh2CU9Rt8/GiAsQ+BOfp1OpYL+WVRFA2BXoCS7peO6fLjqw55A/Vlq3NzIpaj8J/2vB 6DrmqJqDfK/1z3q7iRJYoqDAw4eV3RuOjtTeI0beuaB4jq6uK36DS9Wf36cZ9Kx3a825 K27Gb3DXDhs8t3W0yZyq3BmDo8m/QtmexK9wWd6DDTAo55V7I4dGmYkXOYzoIPl7MTo1 Wj5AXI/v2Y+Uq87vFAYD4XqpVq9KmdfKvdXvhF2UvfPrfkF96rEURN714oWTt4oPv9CO ef5Q== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=g8OasbPQ2G54xjMhgileSi+DVuhOq79Cwtprw9Mk3DTTUGZ38lTQ34wrjftqc3PSbJ 9Mu7EOfKnLvDbqrfGsf95n9BJMFoojTAk5+RN1c1RzEHHdJwdLMhGEHobjUcjmih9jxR H/k2G4SHI8YXyqZVjhXg7mo/IqDooYgc+ZZYXoQHmJswbqcCsRFg2uZaMZq0Ez4I7H3n eYibbRbxYwtshr6mn/f07wo5PKcula517KRWTNGmF3/yeyvqKG7QtHEq2zTHSo1z2Jws vyfuRf5vbLGCs5tuBELZEjg+mQjPNAprm2FuoaP4Y0ohgrB44dXWjLWbnLw5VEOgnG9P nl+A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LHUi29VB; 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 n17-20020a170906379100b00965a6d6b536si591402ejc.335.2023.07.27.00.45.14; Thu, 27 Jul 2023 00:45:38 -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=LHUi29VB; 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 S233017AbjG0HEK (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbjG0HDY (ORCPT ); Thu, 27 Jul 2023 03:03:24 -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 AB0352D6A; Thu, 27 Jul 2023 00:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UNcvX0mgVEt5/N4rV8GERdAzkKB8iX3K3GP4OtKhsvh3Lv2q3vsJXgYcCFkEHj3kjSr95sxMy/0WMNjpzQua6dryXVG5e/9O4Uo43zmkKVRZL4gagyYmEOyaJ84Y5m2PQT44qjk4z42YAfVEDajwWwQJDZ7Z9WWQsO/RK91/vDJXTmY+rLYB/NzH0nlw4gae4hwax/BiNySAvBOBkbEIJ1ODLabGo+qmQKrPoB6QqDw03RmKqDrHjeAMdA55zDM/vGSzQP4t8fzcFJfP6jETAQji1L3ZArKTPTENxPhBpToJHVBPCAb7VWmaptshqNWueq2z8zE6l+YPEAyJ8GOVSQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=CxrAIiY6VWLLs6pbQ7YA5t338yj9hsSMLn0c1r1gZI77BMTb2sepH48D2tvYwMKZ5EYO0N2gffv8wc9yCpUrCV84Ev8u3qbbnyWG9TKbEdwl3O75sqd6s0RiKsaZaLtmB03rkN2vhzFS0JW2rX2sA71aCAOmRfkxhTN/6KdBOvckHq+AzCuAjWynUtj8+pJfd9UgPY/tnkhfgPcWOaWNfwQPGH4EehNW9VbMsUAIco+9y6muO+S72aNWx4JSjawF6VTnJsS3+nWtoX+fxTmAgk4w2MShg6UsT/UffsWsM8i2V5WMtKC/YuYzuj54wZlrbxM3O83tf4ptXcVeuYEalQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=LHUi29VB7/HApOCl6GTXVIUa4PtG+aKZFbXAY4RXtSYdlE+RFOZTez196R6U/qJJa9YxE/H1jbx5qYmqvqsDSoAcTF6+RsQy7arwm1whzacT0sjRkbqUnTKoyLbrOw05aeYCZfSXe62vFnagvs8urbnCS61Wy6azMqZ4YqNaj7nBY6H4PvZK90GSZSuvcFelFR8qI28LaTEn6GqNOHjgGAHYEQlN9isFcbU5h5BW59JyqFcK6ij0Lo+GyrCnThS6H6zqg3cmVm5BSlCPeFvqgQ4kM/3UUOzIJ1V67TZiJNovk9YNOznq2fQ+TjPqTuBxThLKbo1X8cqKkVURnX8LoA== 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:31 +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:31 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 18/62] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:07 +0800 Message-Id: <20230727070051.17778-18-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: 74071265-3901-4a77-f30d-08db8e6f4e72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RbVKWs5pZ6IKrDe8aF+VH7uVXQKumDYIL3XA0ffTeIzxjmFsXEisHXsPF1MYGIr/jK4dQHGYMO6K93RQO3OQ17uPXwjiRZMT5IWTLNs636GYbW2vOuvZrYF1SIhHnXAUDVvybuQG92guaG5DM8DciNr7issKtJvj9pDibk8EUGuAlbHiNqmAFGargJmFDiUVYO4c6ETg2INogk4ElbkgE20BYZtrEPvnsN+otCYZ6qw6PzBRXuZhVuGmok7YeTdBkw8WBIvllAa/4F1Q1/PyBwuhCMfcaq3KBB+HdYdc951BZYSmMscWR1eGgyflHfeZySmaMEVNegC7zB2y/UQnpwYWiau8bc52GT3PpSHB9VN4MbGocG4yNVGzNlsBB1jYmrrW8vtFN6huKy5EI6rbtmmTt8kxnWNBvrclsdbAkmkNDesRRjl/M+8CtqO45r+SbWPeewlT6w8BBqjJwwG6JmDeQY5YfKvIoJpSshJmFFSs3/pQlJWCppd9fjknsVmMJg7vdm0i3bGe4SbO7bInGKuigYJkif93FhIeAwCXyo/trDsnVQ4F/3xd+jYYM25CRWm042h8RddpacnzLxr8VMYz2BRtk0BVN9pd7mqkidQDiaPFmnKlCw7vE9ZiLEiW 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)(6916009)(4326008)(316002)(54906003)(66476007)(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?QUoxS2ZmTlRaRDdWem5xdU95WnRRSmJYNXBpdWJraGxaYWhFZ3VnTWE5NTdH?= =?utf-8?B?b1p3NnNKNnFsUDZDZ1RqVFRLeVo3R3pCaUlocHpjSklOaUtMZ3pzZFhYMG4z?= =?utf-8?B?b3pQeU0yVlN2cldJTThxZG1Ocm4xckpGVDk2ei9KWmxLRmk3dW9la3BNM1Ny?= =?utf-8?B?SUEzZ1BwV0lIQUh1ZHdlZDlIRVdHL2tXZDN3S0NOZ3JDWDhWRGprUm9BM1J2?= =?utf-8?B?OFdGK3BFcUwyY0FJRzVVTVlHbmlKNkYyK1hyRjRrM2hWRjBleXoza2lnaGpP?= =?utf-8?B?ckVyMWJ2MEYyOG5iVjRmT2MxUjdmMmNVcG1Xd29xZ3YrUXhiejFXRXF6ekJJ?= =?utf-8?B?VENRM0tkT3BmQmFVUTNmTFZnWHRwcHdsNFhVK1Z0a3kwdmdGdHJ4YUdmSDhQ?= =?utf-8?B?TG1JZWpWUk9hRzZkaXlxNVNrMDlYZ3R4SnVnS1F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5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:31.3011 (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: utOJFE2mYMHUXa5w7fl4/RhJGj3nEB5u2sXw0jZOqGF81Z9sxUAe3b+yDcyuenjrRM9JMorWD1MUUJZM4t/iXA== 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 --- drivers/mmc/host/sh_mmcif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5cf53348372a..1066e0c2831b 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1509,7 +1509,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) return ret; } -static int sh_mmcif_remove(struct platform_device *pdev) +static void sh_mmcif_remove(struct platform_device *pdev) { struct sh_mmcif_host *host = platform_get_drvdata(pdev); @@ -1533,8 +1533,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1561,7 +1559,7 @@ static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { static struct platform_driver sh_mmcif_driver = { .probe = sh_mmcif_probe, - .remove = sh_mmcif_remove, + .remove_new = sh_mmcif_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0