From patchwork Thu Jul 13 08:07:52 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: 119654 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679404vqm; Thu, 13 Jul 2023 01:42:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHncgC8p7dznr2QzNyBRQiPDhUg+ZpGyuURDY/wkmvumSXXKX3Gn5JIxFBuxOx7EPze1DBf X-Received: by 2002:a17:907:1257:b0:957:2e48:5657 with SMTP id wc23-20020a170907125700b009572e485657mr685196ejb.68.1689237746318; Thu, 13 Jul 2023 01:42:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237746; cv=pass; d=google.com; s=arc-20160816; b=uba6L2K/5s5gzyxd/6vNiHG86s5+/2D3GdyD4SywKDAxJXufkrxOIy2eiRtuyvX2We KQ9vPgFnV9PEsFnMZq60+5n1BHs2ZghQnvgxvtwT+ZeGr7w5nhr8yLgHFAxGylvs/UWh iL/rUxooQVxpGN2KZwPtNLvCIs2IUFSPNDrFU5E472gONJ6AWt22gTgmRi1lsu5lrM41 XJWaZAJ7IIPEtwVv6D3728l3zMHuvrymPhMC8UHCPst0IRqDQwe68Csj/Ioyc3hm85Ge UcWJHgUKh6JEYQOVnGoeHZGzd4M5C2UKhrxwF/sDUOh9VCG1mUkubBiVAJjxPA+l2+sc nwjQ== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; fh=5tlb3WzwAtkLE5eDOyUXCz3z4PbNopcGbo7qPwjRx68=; b=bje9uxrxezFz5fIqzKa89YWDIcYFFxfhCQ9Q0v6F3Be2dOPLE56BXOb83ADcpHaWYb EmovKjhag3QAlY+fMq/eoH1qyGIuBtF9ynQZ23x5FT1rZDpwQUsr17yclXkc0wik81FV 1iKeFl1jQDPfxDphtgWtTFuR4klLo5EvDb5X9ER+6+moCCI+t7BKzN9aFIUsI77DfbHT wMDaPAYHnfO8cwEfPWnuE4hlb/vEK8c3eIbApH1UQ4xqxuG2JtJZ0SBC9140l+N/Q29G 18EIZ3dbya6d9tho0CXxSsz0iASYoR5/vLNwP05s/qeOlAJRI+QsPqErefGwOPV3ga0M kZUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mPVKroVw; 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 xo26-20020a170907bb9a00b0099280a7eeeasi7563588ejc.526.2023.07.13.01.42.02; Thu, 13 Jul 2023 01:42:26 -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=mPVKroVw; 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 S234415AbjGMIOD (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234450AbjGMINC (ORCPT ); Thu, 13 Jul 2023 04:13:02 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2107.outbound.protection.outlook.com [40.107.255.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 992113A9D; Thu, 13 Jul 2023 01:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CtzfVGbyEzJT81I2HFniJjx9PMzANlkFhtD83mn3DP9dAhI3KNZtlWBroe9a+xvduYbe2vBpG6pbMFhwh6skxwYH0DIafaTMMk6+ItLcl12YbGJ/H0ZZ6ZXIG3oYl4f5KYMG0kEkmriQx+cZMzbCWIwRkntB/HKig/Nhdj0xxli893mGAT8fUEKjo/ub3ysINo4DdjwwoWIuDjIqsmAdJsb350OXOEWV4Q33zfdTgX7GHb9KJP6XHgZoBBkoTTwlecPYBxH3/l7Qh7t2WFtXNWIGlTU7n7GzV4YBJxhyK01/JwmxyVYMtfR2pScTSNZcJFg7DpqrDavaBDPUjiUe9w== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=kqKBEWVY4L7xxw1srMrjuPtwRKgrxH5tq48E0CVyO3j6VhSJjcZAm2EgAfprLfJwS7t/QnKcj9UBOI/hKJ+7YdmMO+AK+5UpPMaEInPhLpu2II7x7Y1seIbpfMyV4aEmAlpXkCfhn1HPR0a/XbUYVGmb/DW4TjnqMMD1mtLAVGS4x3G7mIFX13rztjz9o7jvvZudvjde8uWeD97VLhfcql6Bv1rLg+9etpvt3pNMSlb0323/563nCOGut5rOVuAdiR/lWJGCttXHfEUhXvAn+Vdg+Uush4PgnKTqjyOOkohA/1LviB8YCJHfwf2nzuqh0wCGqjQrDCqNNC0FjIWWLw== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=mPVKroVwhB1GecJN0ZLGjKxhzUHAuBNP1TRGIhYdc52OTP+U3qWCirLIrq652vGpiuqyDE7xmkSmwv0edDODoBeuHWYCaIBdvyNRN/HC9MgEJ6kr8Sj1+8+gvvJSLxg+A3ZRzR9HjPS0zM/WidRr63WXROgoUwPgHkXYlyJkaMj+4G941At/DzjdQ/+Gj5pgp8yePS41X5ild0ql1hsB7jCm3ifmqKcBuc6+Vgp6eE74h/e8T0+0COODK7ctssKva/FqzorMge5ejDc0IL6fWVcEEQsKtOCQKQWmg7t2HQwe44JkapAaW8yrcY4icjbeTwqaHQa+dXCcU0NaHCFIDw== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:09:59 +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:09:59 +0000 From: Yangtao Li To: Ulf Hansson , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 43/58] mmc: owl: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:52 +0800 Message-Id: <20230713080807.69999-43-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> 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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: cee18cfd-0625-4b4f-0841-08db83787ff3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5QgRSbiIigNwH8BBVDzglXNT0nQwCtSUF2YDI7coXCW/012mD1bYwkDXSvpoVzb7M2QFFW/jdrzrIWJnLlP561NWxo+tAKhj9I5B2kQHYewmy/0CSyu+1xix30SKr6joMBIb9lW4B2tqMHvML+TNbbFdHn/J62aqPuk66WiqQ1DpeP5Tl5GSd3Wj6x4CZCmh9UW5HtWMFbv45ScQVqy+GUp1IfTFkpGflm8PSRJfREe70TzA1O5J/gdL1n9bVRuBLUiCkwQGMAec0iB41E96Sgmp8DMkspVn3tOq3+Z5+JKOLf9AymJPo7w6RexFhqNxlsBxeMNAGEVuMxsElovTLqu7mhVkfJ7ldE8XVoKPGJ0La+e0nRPr5oMJiUn8OU2hIbaM49aw5bgeZbNYBd5kMP75CbJmZU0NcSu+uvOSxxhX/U+cYj9E+c5juwRVqAkYVsbAdiDOzU5bfk22b3vLHHmkLLVVrNfYYlTT3iso9EL96rVurk/IxOJk3xvT/jwzWXfJl/ZNWCmXzbS88BBv2+AGaYC5tp288B1duziisMEcz3XKXjidRE9ttnQ9/YMfvUYvxiks7MEQQfuqjxasSTqASeqwe9BqbGJQpiCZAkYlrwzMv7SeSJHnlPNLM3DG 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GJeuH76lrLzIBUxfc1eTs2E76utG?= =?utf-8?q?NHiIONXRF5Xp8xo4sDECStrFrPZ0V0OYrhq1V4QEQBBXGFzepRVeG0iS6Zp5j3dep?= =?utf-8?q?Ot1K/5v7IH/Eun1FxTi64EV8ErStC5dJQ/RyTAqUsgi9W2nBY42PN6Z3zBhKilj7e?= =?utf-8?q?oqm9wKOFLzWDsb0Fe0ihT++WPmwC/MPZIn+zA/f5Fq3AOXHiHfUKbrSDbm5XYq7Sm?= =?utf-8?q?a0Uq0eNbMptnTmXj4PlvPSRLYTfmf/nAcmKRWdZT8gDuCT/yKnZpp7MYnn42TpPMI?= =?utf-8?q?iLbCYP3PRjCberU1icQQxrzg0CJrooC4Kiq5UH2P2xw1V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qKUBgU?= =?utf-8?q?2TGoaYnK2VfvN+RhlAMOVxkxReMIuFQSRIJGmREW2KM22NaQ3ktl+EIymVnm+Sne+?= =?utf-8?q?uknfYKv8ssFEBziAmzicIKIxeh0gjbzdxehl94Ui9gZUc01eexb/vqP5YsSvUX2Y4?= =?utf-8?q?UBMPmseUW3smYY99QENS/6XiJlKVgD0j6RfwSCZWLWQoaPdtMycN62YMapiFt5NpD?= =?utf-8?q?qxGH4nMg/9ct4ApoPsrnWIdxoY+qBAp+P6Ujj8uNCeAFvE3887DTCG9Bij9gjGPts?= =?utf-8?q?IjlxSuKJZe79Q79dmQhfVtVDPSnpZUP/pfIQk80tCcFomete+9MCuPbgBxvGqfw2V?= =?utf-8?q?q8ihUsneOTW3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cee18cfd-0625-4b4f-0841-08db83787ff3 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:09:37.0317 (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: aOp9e10R59yNVPffQMCIXXkUwk9egrAmP1Ztunup0B/17EZINOo7RtZtL6N4WeJz8UADoZcktO2RJLmxtl8fIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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_NONE, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771294159320015268 X-GMAIL-MSGID: 1771294159320015268 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/owl-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 1bf22b08b373..a13bec42554a 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -667,7 +667,7 @@ static int owl_mmc_probe(struct platform_device *pdev) return ret; } -static int owl_mmc_remove(struct platform_device *pdev) +static void owl_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct owl_mmc_host *owl_host = mmc_priv(mmc); @@ -676,8 +676,6 @@ static int owl_mmc_remove(struct platform_device *pdev) disable_irq(owl_host->irq); dma_release_channel(owl_host->dma); mmc_free_host(mmc); - - return 0; } static const struct of_device_id owl_mmc_of_match[] = { @@ -693,7 +691,7 @@ static struct platform_driver owl_mmc_driver = { .of_match_table = owl_mmc_of_match, }, .probe = owl_mmc_probe, - .remove = owl_mmc_remove, + .remove_new = owl_mmc_remove, }; module_platform_driver(owl_mmc_driver);