From patchwork Thu Jul 27 07:00:31 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: 126730 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920232vqo; Thu, 27 Jul 2023 00:35:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlFpt11+k3NAFH7QrysIlAWwOpwImAzb2QnrRsQNH7UJwNeiWvPw1HR7Ay3FY+y02MY9kl8j X-Received: by 2002:a05:6a00:1794:b0:666:ae6b:c484 with SMTP id s20-20020a056a00179400b00666ae6bc484mr6207531pfg.13.1690443307120; Thu, 27 Jul 2023 00:35:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443307; cv=pass; d=google.com; s=arc-20160816; b=Rr51uHw8LYvhK4mBMgCMFem9NSrLalxg153FQ/HABaA4SVo3oz5avmmfgoGA/TX5/a /lSUDpxD7ylAJwGCIBTv2ToVfGuUFxUfIkyKOBfJ6+dMylLeyZi3nCvG2RgSWsJKtQJG fIVDZrRsBlVz2kRmlprjow8eAnA2bnMdcaofYgMWL4TMFkD1ySYKVbn/x/3/kwir37BL v9IFm5mjjzC1jmNZIq8hJqmgjsKdy9674OyBoI02cDIo709/Lt2vzPHUApUEgbqE2xJ0 4MTabw9InoBt9rH7nzEHqqBs71eG9d5WfWfObnUHtCuD/AyyQHv8ngVTdPQhTz7paBr/ PfEQ== 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=bkUDAs1zstcqw95nlsyi4w0ZFmup7yQrIEBsgj0Njy7Oxs4cjTWMfsZO6KkBV6aZgt qVCciM2im46ZjZueQVmy3KzbyI1VfDOS5a9LHM+0h+Lt/7TmbwDHnHm+Grh5D1MTq7L3 oDmdVwrLHZ+WaE7+LcG9+vcHqzGzBx9kOz1ywvh80vFZGI9rRU4FRPQ3hoTSV6kph5+j Vi2+YAGmHhDALRP9ru6943U/2/HzvUDIZLUm3oayjg+++f0PuNnEkZrSsKKfsfjiPv1+ pzcN0r1k2p+duLPeDaMitKquk1TqUNRVvyuEOesDjv//fr1YydVoMQ7W4svf/tJtI0aM 5Qdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SJpDNSsc; 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 e8-20020a056a001a8800b0064d28b68d8fsi1021385pfv.94.2023.07.27.00.34.53; Thu, 27 Jul 2023 00:35:07 -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=SJpDNSsc; 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 S232151AbjG0HHu (ORCPT + 99 others); Thu, 27 Jul 2023 03:07:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjG0HGu (ORCPT ); Thu, 27 Jul 2023 03:06:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928C32D6A; Thu, 27 Jul 2023 00:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+W4wOaOFY4QV8ha/H5a2OUlTE7kyIh7BvPo8NyR53FBuAJh7Y3L8oSrfmOTIs7XdmUjjEXgIvaoG6jbi3t7xRvnjN57Pm15AbA2F/IRIpW0w3MuAOJxN9IndEVntbtK0Cr93Dl0YO2iVt3XwKAjLTHRCfpZlreQ+BAH4Y58lljNfYjRkDm4yOTgtW34DhCR8mx4xoyiXNrp1qHSKESazJIO8EpG6D6I5lA8/PvQYexpdKBxLhdp6s3XZLwm7xFYKGUnLhtVVtt+BU+GGgC6kHGlLlEr8g9p3kRzshW8Zn6DrYI1Za8Udj16A+hNZRyBfzXSkosQmVMmCfJThMbYTg== 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=KAREA+U05B+5tyqhT/DKSe++TGW841uVniTQML3FeMLVRlSM887Oqi6SNp8I43qu9yPmUM8o0Ajhq6cI+vE8ltrxOHe/b/OsbvCcgahYASF+xOoc3Pv0IV+baXqIY4XZObsWMyEARxbQqWz4hAAU06dw8G5wE0jrTow1fSlm/bcQRLAQSVDDAErqIh29F8ScVNFxzxn5sP5wQjrH3G12s05uOB22Tg2bPemndlvDRw4d3BZKigw6NKO+VmluGw1UOd+V+XZGeSJxx0o+APrkXP1vEt+i3JxzUPTfVFyw8aZ/DtKHa1jWR3SCjehUK1otAW/pz9E5h0WwNVgoMWSn0w== 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=SJpDNSscgGn6PWwzjTwpLGqUeko3tEesz9Tf2LoaUv8mg8Giz2D/E3EYvEFFu+u/aaMWSTPrdUa1E0e8SnjNuTUV0MUQNmrM4jIckug6BsxQxW/37WJGwauQyxTK7h0jJgpHqhL6Qzun2AIfRllvqeeltTrJ9iRqaAwBpAFBkAu49QLHE5mpX6jZuTYHG588u6RcNzgvyceHt7Dq3oWDDyVF7YTqfqIF6bocV/2+uN9YcrfZy3pG2MzJ3Fwgh41eO7gP+bQN7Wr1glAsG9hZdmABHFUGTSWuhJOaAnEIsNrlqScqMbk51WmVp5D2CBhogfDRB2Hg9BZAdw8cqkYKZA== 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:02:39 +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:02:39 +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 v3 42/62] mmc: owl: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:31 +0800 Message-Id: <20230727070051.17778-42-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: 28c76e50-e26f-4ca5-580a-08db8e6f67c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YfB1AJc0MPP5MHwuycoyEHR+iDQEkWI+v5vUws3LjMQJeFc1FJmVCem2IprfvB4ApFl1O4vOtq1aDJ1HNjZL0sAbyimpNgWMB67MxfEKq/B9yewMzAoDm+Wu5xg5oNjYgpYOWAN2w4daJkjjxVNqOegknDn6BNidLrJoQTl49QEFQLwE9VJyAM5fcnJ5j+FTIGeLsAlIYjnKtx+md432flEySwVd2UZuRmTookQTMdxleLjjONohAHmYDvkOdKWGWe2W/XY9aE8nXLStGYTC2KTnmml0AeOt0afz2pVwW4DQzkTg6M5J6/6pJG9/Jh+CDfaq+erZKMhvMCneDmpyz7rX3BUse4lQEqZTMLqaREGVhWuS2fzci8f/gfjNJdVt+aL4GaNk/vczEChfbUQgHgs86SjNrDGmAWfH56RpHE/AUUl1Sf00L2vrNn2pD0uQOVv5iaBDPtu3CY7Q0Jq/m+YsDTRdJ4duYNGIwTDo5K6KjF8sFxsqELlrwiizm+/gg7l8jkZykuYq+qimBVgUWuHdJxg5JmiRXWvdwCHPpiSt//6jHWFJMbVO6PQCR1QylO5Zg/o1x+FIdJq2iCqKHihl11au4pHgERJFBxHAEzOerMEu+fG+UZGnvJAVVyOG 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)(4326008)(316002)(54906003)(66476007)(110136005)(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?ZbEDTkyqX6eqAwmChevxXRwx6OwH?= =?utf-8?q?/xDtfltAjYMhal8YYFqBH0rtQbN7a1bDcr9KByinDep4Z+giUyY1PaBqhr8sTsY9I?= =?utf-8?q?VgckDVQAKy9eQ5jDpOLEKneQmc1+G/2xo3MJvP50VLjAMMDF7QPkfufUh6L9tS9at?= =?utf-8?q?HunCix8ymXt+kXUUDXqNc5y9icjbFlxGzi1pYX9l65Qb78gwYfx8Li/lTF7CzU3U6?= =?utf-8?q?m/PNb3/apFS8Y/T41KdbmyFjO4IcU53NPheXhCyrufnpcYZHvDpWxwzhPhMr3wccn?= =?utf-8?q?lzuPDBrIDs+SP42C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lXLRBGXl+OKFEa2XfgoW3L6Sm5s9Ho9l/rptyuXrZbzwujGF?= =?utf-8?q?ca+yV9vJRJ3uGSavscvS6Su2dzROR0UYlpPtTIrO+doqI9s1jnZQYA2EAUbjMoMDF?= =?utf-8?q?SMgkJe7Hpjgd4Kk4gdR8W2JpsoFiGYhQC4x2G4tVx13seMVtAtXtHEzabIdcKqEzL?= =?utf-8?q?ct6HqC2EpDea3Ll2xX+pW4uZWuuN97BN8Cwj3MgEstUxyM3jgBXd3ibB2OY5MKmoV?= =?utf-8?q?PSNin2crPGg7trl5pn6RPfvHbSLgMwTd1iGIkaKaVHSMjExOnd242gE9GSO98K250?= =?utf-8?q?ddA5eKWcEEypkkgx9klLuWeSDdb4NbCC0UgDEKbNsnB1NS5cpVM1sKRVEnFokoH8a?= =?utf-8?q?LXROrgwUnczp?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28c76e50-e26f-4ca5-580a-08db8e6f67c4 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:02:13.8041 (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: z0Ppk7iH/bTRIwn6RdZ8PFRkpk6rwICObsKp/QHpB/wqXB1KNt3fxTFGN/iJlaMfQmMgYOGruTtDr592va7Zgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: 1772558281590916601 X-GMAIL-MSGID: 1772558281590916601 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);