From patchwork Wed Jul 26 04:00:11 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: 126087 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp177686vqo; Tue, 25 Jul 2023 21:56:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6N1Lo+yc4YOAKW14syZgtLsWIcubdkakzbSJtXtxxGGgtP9PkvdcF65hg1x6ikttO0yNB X-Received: by 2002:a17:906:7946:b0:98d:ebb7:a8b0 with SMTP id l6-20020a170906794600b0098debb7a8b0mr4608917ejo.14.1690347396644; Tue, 25 Jul 2023 21:56:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347396; cv=pass; d=google.com; s=arc-20160816; b=jIFyPsNdR2AgtGd2EtbCTrodjloG0CyfE/WI4uztNDgKcMMUc7M1SAHl7ROsZ8H7Gy poXkUgWsuuqg+jKhURDjZ+RRZncZFN9bqh2HLSK4lDji3+BmZddJpiTqoiJUHUy2lHDA hJW4z0LSejm3MM9W6rDn48B/62avsxD/+4ymE/eh5Tj2gaFgHjd5fPYFMtuBbMhm42RZ U3NB7Rw+otqHczYu2ldJnJJSnXPzsrozYi8ZBoaOc4EVBSQadZuwGZvYs0/n2jVY3iXu BM7qVnZycFWYinOKm4SCUv8TXTbP1hqvmUTyMbqnDMLsQdYM36FUqRwfIIg+KoxBt52t k+3g== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=HHvOlta6eK1AA2sR5bvIgkaMscRkrn34qo9PN1F6QlW8f5te2r52oWVm4xRHf7Ingc u5t/zggUrs8mTNNOgk+3qqb9hB3VnI0N6wlgkXbjVM6ka2HvdRKdor0ncpCK3xbJT2E2 /IUnt8dsjPysTND00qSXPMH5QnYET6cSKDWKpL9skgPm84+UshkKkYoX2bsViKcPb8iq P8jbzUlJQzqvZrMS9gdnGqi4jlWUhkKvYl1rcAFxN3v8ge7sg7HqD7OZ53MLHvu/4U// hbnt21ZrkE984tNRLJlpP3Ym3pLG9tryAZqzrXxp28Tz+ZC9pruNcpB1cGvJHbcyJiIp vcQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=CS+WVAIC; 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 b11-20020aa7cd0b000000b00521d2800f15si9297373edw.519.2023.07.25.21.56.12; Tue, 25 Jul 2023 21:56:36 -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=CS+WVAIC; 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 S231669AbjGZEMw (ORCPT + 99 others); Wed, 26 Jul 2023 00:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbjGZEMK (ORCPT ); Wed, 26 Jul 2023 00:12:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::726]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C3E5B8A; Tue, 25 Jul 2023 21:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CEsEATXi4vJvSjKOTpFlyhFvLEKuvvHYmpk4IfoNCVeyPQ0nRdWqqgd814Ph9/Gf/7dnx3v0uQGjx9ksDAR+IXbZAMkko8Zr0CMIEmR5D/nwQmIEladfttrTBZVta4NRBMhmcqCx1Omdq/lL2VSWi+A7k/3S5PuzyTNuYNMHz1xPvVDYUjSTt7oIUhFWWC4bYIdRmkjqALCtR1aLSAxd94QUmVMhmSCjqxbGGa2vw3Rqo5nJsR0m5Ptc+RnYSkph86/RzyeQkfarSrv/uge5Edc5SoWJFSPDdee2pbKIePDJhbC8OL3WzuKvldmpvoDKBedXHvVjsEGnA3ewmwQNQg== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=GxBT+Hhcy4USKvZTP7Xs1bLKSbldIxbTf0WbxfCH/AuJJ0/mIEjwMKdn8UE/7BUqi52fOWkd52Vq4zjFyLlwTZHJ5Vcu2IIoYgMouxuQtmatkU0528N4OpmjfzY3sPcYto+K3AWpu0qM76NrHRL+82M+iLiXHNrOIg1TPi8lkBNpt3uTYzu/1BBng7QrTgrFxgMTF9G89A8WG8rA/s2+qxGeDgaQITQ8rixop3fqaV7HDLylo4sYPKWWoaYDgEwguOzAeiOIV3heIPhIh3Z/1fKskz3Og4GuJUsPXdXo777Sq+mWSSuIZ/FkGqdfojTGNpjS7ThXiYz16c1gbraCHQ== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=CS+WVAICRZ3m4k0Lyt1WPTUfk+Tc/204IPYE+GPOGZdIpITCixBvpEQ5hV6k+qK0YHCDE7Szu7XbGxpJjJouzzbeSwjDgE4eN7H0n6mFxGkhVYQSiQqAy4juOIymbM3rg0wWeaTCy4DeDvYrld8wcPqu3w/51RhPez+UnUFi74j/IX9KWWG610aIST3DmLBMqpikvn8C46pdKVftbify8Rr7k4VylEKBw2ahb2Wz/9TCf99ApPFf025si7TO0X9wyw4/hkCxXtH15mHG/PiKH2s654Xvuo1k+xurFYHYkh/f+w2GMEKIdnm7gGOwPRQKs26M5TEa/RV1PGWwl1qoqg== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:02:21 +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:21 +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 v2 31/61] mmc: moxart: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:11 +0800 Message-Id: <20230726040041.26267-31-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> 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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e44c484-c5b5-4c1a-4802-08db8d8d0a82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U1EmfHqAPmtreogvysOGN3BAkOnMsG/cTeCFjlIC2G5saSYjc96p9h7snxRjfXNYkQQyJwPayKGYZLpW+pZfreFJoZAVPGOAPQLMk7hvwfA67uujdm45jGRnyp/6lHUo7QuKEXmOSheq0Kl5xk9oSz3cxnPBx1LNvhEnHCysbBI5Ut3VCB+24WjxlLXsP6OpoTBKVySZDjo4AA+oqyVvyMDpCTdFMyAcdmIPFKKWwkyreCTAUg9kNVRXwxyjE34C04G0HGlAm4HfScp41eZQ3/131ZuwjfnjrlVW7Gly/AI6VVehmUelMnkCfFaxdIynKVVSZ+o1ka4wtczi3DSzmAwUJy15itYgbHUNJ2IEohxikYprsDkBC6TYBv5kv8rteC2+l27x5Vn/Lo9NUoDwQHVnvNYjF8OAX9peR5LKErdMOWAXxhm0yZ9bKpBx/0XwrOftU75eyUZTgU2kES1snYSA9IcBOlbWsaD8q0eTmfHoUiwgUdZPhc6xXx2d5W5SMrgnAh84vEW+nY1Q2CNy2gAdEE+u20GB+9sbrmaEbwA9M53Lx2jNLnPPwE1i0De3Go6IdBL5FnVSu91rTV2DQEn1u6rCU29KBstKYE1SumSMbApB4X3KmiwUzOIaU1Go 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)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(6916009)(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?q?Rjj6/uEwYcV8EWuoyub+Iw154rVj?= =?utf-8?q?fkQkFsPKUT3afnToCUEuhvd96DfFAVM1M1EmhIDoHA+1HIQVPYqGOimoHaDt68th7?= =?utf-8?q?cLBqb/vY/jGeaPtcNws2rUhOQhMGsoVCtrYPt498pfhSqa5g7+g7/aoZBAqF946/c?= =?utf-8?q?K41I3ynNdPODDr46G77y4srjmV854pbQn9KUBgzWRvAdIxMQuu/RymklMFyTR+Qoc?= =?utf-8?q?lc3Tw7OateKYN8vUvb/4ZgPYA3KWzm5FZnugWu+S7TuPU19xKxTVW88N0xTvtQCdr?= =?utf-8?q?vwmykBb1oYjXXqRRm3ACpnqA23Byfvm7AnIjucRlqMgoxRJBPKoyA+YOeu/rg/465?= =?utf-8?q?LK1AC0QRHMXtvbC6YYPu65CfROaaMf3Cbeo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40szXfAkRIHRp80JaZF5E7G?= =?utf-8?q?hjCqxO8lj2DYKLyQYCSVtTvLtBu46/y8rGiHXhK0WJrNc9Msrhh7/T/mYUGjLQrfa?= =?utf-8?q?nsoIJnXHZx1caTGXfeonRtZQIt826RO2C5Tcm1rZbKFJsIayBJzxVMJUVf4w2mTiz?= =?utf-8?q?RrYSe6flH+XGtbb5jk3CXPuhE4pcOWeebQZI3r31ivRKPbxmZAN0rS2Bl2UOVCc91?= =?utf-8?q?4aYbYmkAhyrHbWQ2KCrAk7PSxOrdUpLJXI7urtxhIMptMt1biNTsPWuNKLgbX3Vrk?= =?utf-8?q?56EiELNbRvbv?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e44c484-c5b5-4c1a-4802-08db8d8d0a82 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:51.0575 (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: iwkVEtilgjPw4K0guIQxAwA6dI8LmTfnf66jIh7vYdutstuwIaxVpYLfJpan9+9PB7BTK8hoC1QtKFcirAPblg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772457712138563824 X-GMAIL-MSGID: 1772457712138563824 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/moxart-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c index d0d6ffcf78d4..6673b95747cd 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -687,7 +687,7 @@ static int moxart_probe(struct platform_device *pdev) return ret; } -static int moxart_remove(struct platform_device *pdev) +static void moxart_remove(struct platform_device *pdev) { struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); struct moxart_host *host = mmc_priv(mmc); @@ -705,8 +705,6 @@ static int moxart_remove(struct platform_device *pdev) writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF, host->base + REG_CLOCK_CONTROL); mmc_free_host(mmc); - - return 0; } static const struct of_device_id moxart_mmc_match[] = { @@ -718,7 +716,7 @@ MODULE_DEVICE_TABLE(of, moxart_mmc_match); static struct platform_driver moxart_mmc_driver = { .probe = moxart_probe, - .remove = moxart_remove, + .remove_new = moxart_remove, .driver = { .name = "mmc-moxart", .probe_type = PROBE_PREFER_ASYNCHRONOUS,