From patchwork Thu Jul 27 07:00:07 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: 126729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920223vqo; Thu, 27 Jul 2023 00:35:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlF5fHNpBA8WR9Uo6ajEQS0Y9Jej13mQN4p6troFt1zh30xRmYscg+5ljmPZIHZh/oj5Ebep X-Received: by 2002:a05:6a20:12ce:b0:12f:8755:96ba with SMTP id v14-20020a056a2012ce00b0012f875596bamr4412431pzg.28.1690443304957; Thu, 27 Jul 2023 00:35:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443304; cv=pass; d=google.com; s=arc-20160816; b=EP4iu3FA56Ui3yrPrlt1AsGODOIGtF1Z7tayADnaXjLoa4jG0oYTZwbodybZ9haNs3 6U70ODckPbm0RzLuFqyZpPN/IPE0MpxRXoM+RcQPMUXsY2wC/vSlxoYCiyT2dZu/XkpN N4tF+urXRGiNFdfdc2O0O3YSBJFii7ytZ/9Wab5ryLDOzLVLggP2wyorc/3BCkrBvWGt f7jPtNxEnMhiHTKb5LIHiZSE6OpAZt2B6CCguYEn28ohc07vte9f9wRSP9a0qy8laLZe puBTvfHp/hhY16qczPisweDNNIQ4MekgG/7PLnEWf+C6PzTGC04ew2nKlDeCmUP6zgz9 VLaQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a637058000000b0054fe2dfaabcsi839336pgn.526.2023.07.27.00.34.51; Thu, 27 Jul 2023 00:35:04 -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 S233019AbjG0HEK (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_Kleine-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> 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?q?AJ1KffNTZD7VznquOyZtQJbX5piu?= =?utf-8?q?bkhlZahEgugMa957GoZw6sJ6qlP6CgTjTTKyZ7GzBiIhpzcJINiKLgzsdXX0n3ozP?= =?utf-8?q?yM2VSvrWIM8qdmNrn1rJFT96z/JZlKFi7uoekpM3SrIA3gPpWIHAHudwed9HEWG/k?= =?utf-8?q?Wd3wKCNgrCX8VDjkRoA3Rv8WF+pEqL2cAIG5UMYGniJ6F2+XrF4k3hVF0eyz3kigh?= =?utf-8?q?jOrEr1bv0F28nbV4fOc1R7f2cUpmWwoqgv+Qxbz1WEqzzBITCQ3KdOpfBaUQ3fLVg?= =?utf-8?q?Xtppwl4XU+Vtky0vgFtrxaGfH8PLmIejVROaG6diyq5Sk09XgtxJugKQkg2kUMdgI?= =?utf-8?q?fVGAl2lhEEGe5IS2r+9q/LEN3GFbpd73Vp85E4/V7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4F0beMqF5DdJSV?= =?utf-8?q?VYjgok7v/h/sGEcqqAaZwiEiIL+b20WtqX4qfI2Xb57XS1JxDB53M6xIxWz2F9AjQ?= =?utf-8?q?w1AMqVBdwf5N134v1Zl1D2gzoMDAkvaDnomoh2VZDzAxSgNi1ajgO8zOBJF3WXN4W?= =?utf-8?q?iHiFrcq0WvI0WmggfQwmotI7V5RJGr+z8iT81cFJMwBVtKE+P9CRnbS8Zd0fPOqi1?= =?utf-8?q?2ofuabBRZKnHfJg+2H6Ee5VJz0P/Lhk8TPeI6JFrh9cpa1fTRbxdQ3Pv5jDKw8v3x?= =?utf-8?q?gSQFwWwfRglW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74071265-3901-4a77-f30d-08db8e6f4e72 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: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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558278931856939 X-GMAIL-MSGID: 1772558278931856939 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,