From patchwork Thu Jul 13 08:07:39 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: 119678 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686730vqm; Thu, 13 Jul 2023 02:01:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlECOcBmdHBGYV/xNv2JorTiymerXsQeSgzuZHeZ2OIkep0sJkmzMJO3jIha8nVqs+prNy0z X-Received: by 2002:a05:6402:2038:b0:51e:293b:e1ce with SMTP id ay24-20020a056402203800b0051e293be1cemr1185449edb.31.1689238869749; Thu, 13 Jul 2023 02:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238869; cv=pass; d=google.com; s=arc-20160816; b=IWdIXvzlqiCuPExDSk1SeGlBd7sSc1U5FRezRCeFgitg5TICM/PJOlmWdIpP8/xaPB HJtm4vF6xoHa+57RXv8X57mN6l0MES29i9WSSNLwDP6m0SxXKhJByLHmyIh4zmhr+EBn VPDJ/EKorKKtSG3oiKHs39vFDVCeFedaeDBmNOXj7kMZb3UyPH3cHR9sdy5tcUgKO5HZ pBSARLgAS2kiL8bSYTRv/Y0tip0JwEVFZa6dNYbYQ9diIHNtvl2po7UEFJ654PhHQwD4 a/raF+YCpWmiu3OJ7KOfpUD1/ax0MEAqdl0aHiLXq5wtMAg+UIBsplck2SWhMYr2xDxA L9PA== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; fh=9CpPSVh0SzFo0KnH3YRmW2WZmdBNCBKVHGYrAagGn1g=; b=K6RmFEz3c/N49bKnx3NxngMceYlAGq8HIeTe4dXVIY9VBF/e9UT0Ty5Q6EcQl3yEbK l2D30Hj/bE7QXF3LGpfd4ZQFjJ/0xx6Pz6TKalKhVnBdNZpuyF1+1wj01tK+ocUSgms9 z1UL93rz+V4ruF4vsMoefEGvdLEVyQf4D8dCbGCcliL7H1r2/wTddbZQjn7WJp8SYjAx ozF91GC7y8MN2tfu73N+6+yBNyaXkxJVfpCY7uDN9ur+Zr6BHDV/6c+r6BQ29DDj0mnw 6YDXxdXpugUtLOcnCZWwamzCy8a7MphBAL4+QsXGmDnqIfUthUYdU/RbH5Y1MIYL4tg+ Gydw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="gvwt/1gA"; 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 d8-20020a056402516800b0051de2148abdsi6663411ede.359.2023.07.13.02.00.45; Thu, 13 Jul 2023 02:01:09 -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="gvwt/1gA"; 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 S234358AbjGMIMo (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233752AbjGMILW (ORCPT ); Thu, 13 Jul 2023 04:11:22 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C9172127; Thu, 13 Jul 2023 01:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gptmkRAxe/UpnN44/zZmnghqPXf/agolPrkfF1JVul+lluLQTjaJ4S8Xthjx3RQy8brASGpLeME12I7IJkhfLiJxQUfkNKfB/H80v1Iyhoyg3oUA4lw9Y9QpyGKCaDc3/OhKSyX1WrESVX1IdVIKksi8pm+uHsw4u+sKRFyIFSXDUQgAeOBcVJlzojaGHG5m+awdKncp8gXIrN0AjXWbRLeow9x6CViBXoEKxlwPfFslFCsKZ0MJHX43OAKe6CLziogig4+s1qtPKVEaGkT0icY1zGA14RHy6Dhh/IrOcLWWj1JI8djJgGP9Oq6zk82kp1krk/RP4FrCmpgL4kG4pg== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=PG6Qtgyfte8vMQV7dYUbataEdiI28+eGQRgFrj1F8g4B7vP9xI0o3zGDjpUFvIFwNNXk+4ZonqBHlzEnAU3fgSA4SkSd2HwTgx4/RPuseib+qWwe5DB/Hiy6jXsXVTv42jrqPdsCqjcHYTz8waZk8l8CgfkbYf6RkEJM9wrRuYt5NkoGWuRqNACaKxIpGT+jcqA3S7hN2XJTvxchUYjv5E9cAxfObzAd1UOqzlJGatQo1t2oOwThKBgHGXXH0V7nCNIiRjP1y3RnDpdS5Cq0wlsZzJn5d+Y5ED+5u5k/bbhs5VGLsiGiQon3HR/jvUxaV8D7n1ajr19BuStIoYsAYw== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=gvwt/1gAMHxs/97yF1e2BWZ4Fsk+GXZK925vONP268NFIEQYZ16loLlqA3t6ANDkeELcEujwKjGyk1S9KwTVvArOpDJ+2dqU6RY/losGZKavmAgMIEumrG0Sep93H9DGDKxyGSOGNcwTUbPgZWiU05A5kcFeduiy0SpQ8bpMIrWbbzWS5wb5RIr0N8mPq5TRG5MEbf/hHjnPvFla4GfMm3ImzNj4s3V+AJSuPQXSx1huiFYY8krF63786Y0TYePJuxj+1CxqnMBq8vwYyxNdGkNt2/mt2h/MNml4+qj8cRMWBlFvReVhUSAR7GivxghJo6LV+C725eIhY/vp5rQ4iQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:12 +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:12 +0000 From: Yangtao Li To: Robert Richter , 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 30/58] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:39 +0800 Message-Id: <20230713080807.69999-30-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 0394a9d1-0157-4325-5165-08db83787178 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jxo0T1P4S7chyv4HdKf1mXjv72yLDasIvM9K4RvqpYu/bPp7aA9XlSYaa3f11j66TK8qW5AJvNi14lpNsYwD7/SGf/Y5yGOPqPDj7R2GxPk8gapUiVvmMM8u6fWQf+FpjCr2rHpqkhJ9XlYX/3VKw6IrL/MiS9myL27ltP4SYUtgYkOBggiGqwX8qK+C32NI/vzNOgSGKGymhPXWBBq6bIIPmr6U2BgtuhokSVDjrIYNdDfwhSeixB1bR54PIbahKEkP7sp3YnrHBObbWz0jumuF0TqxidpvFPLiQzf94Z5BUOrRhtnAtZuKmTVNQEUcTTj+QSYkp9zEeGFw1PbMgMxfeZEesfgrcQQECCv2sxu3oRWvAq5s5oDki62GZu5U+SeH1y9OgZYBPRMISCNwzBSrwtf+ta0aeIj1irc0W5w9frFFYfvu/Zo1Vk6ls+5MMMzP1Lu6mDb58e53W7LEPojlIjuIMyKOL7hr/HB56fB/aF1XiVla858lLwHviB7Z2qbkwdOgs8puVPGGq1E7Ktl/bOKY+UHoPV73g41ug85luzkZFBLXvnMLbyaZuAAbwA0c7BsUn9PbKJ+6caMHnGa8lJwsT9z23HG+pXlc0Gk9NtPN9eiMUYBUkhqov1we 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)(376002)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hYBIAC7YGKEmcVyUEf6wFGRaZd77?= =?utf-8?q?Of6T7VE1/hbNofDomtWtUjFBp2EyB4EgcO5VXjUS2G9lKZ5dVWfaUHMt/iap/Voxk?= =?utf-8?q?LpeFAN1DUdB7EEvB0sMFcMjmh2CemUraAYmDQAvky8xiC7VEGbYyhSg9LSx7x+yDr?= =?utf-8?q?1doIHQ9LjMJAWfSY0g/SF+zfCAZsqwjmrpkE7eVDxEw/HsGcQs48FApguO1zC+5ib?= =?utf-8?q?3zNdcK7xfN9VdzPesQ5j9vj5HcmwROqILI+HjXw9CwhUCxfdpSPCiUobnEiZEwbdF?= =?utf-8?q?Ni7ip+eSRdd15NlOz+C/zKbeMTjhIlpJs3XMbRhz26VsFJLyFIVovG4MmASuV6gbM?= =?utf-8?q?Dsse0bZGI0d+fOB9Npzw8Rby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E3Anc86d2lgN10VSrbxVtbK1Qb2KHdi/HlLzB378S2pO/oS+SvT5S?= =?utf-8?q?cndroG7FBB40uB7JwaWz42JiHzX5/X8xtoQz8o/gkRy3OxScBkcFBsWemv2q5IhE3?= =?utf-8?q?0Q5fSsLo6bnhNiIgOs4cXS4VVAQy4IvD6R9peB2MF2j43TGmTL7jwTNJsJY3gDINk?= =?utf-8?q?bhP9ODaArFbLyEqVVTTJ3GBYhFI5SJgVuuvnqhCFPTvghbVb398lrcb1uVxYJPJNs?= =?utf-8?q?v2W98y9Hh9rCQzZZO+cX9JeJxqkqaQq7Iiu4U7C8fqi0gUEuxzmT1ts2fMlfCTMok?= =?utf-8?q?fFA1Kcv6ZX28?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0394a9d1-0157-4325-5165-08db83787178 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:12.7995 (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: yB30iq6msy3mkFA7nuVDQEEL91CywknPCAN6oS0UrSjRXxpE6Hehn+ps2p1dIaA5TaZDk0YWC2nnw0DZ16Zw6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771295337082796283 X-GMAIL-MSGID: 1771295337082796283 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/cavium-octeon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c index 12dca91a8ef6..d526868b30f6 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -294,7 +294,7 @@ static int octeon_mmc_probe(struct platform_device *pdev) return ret; } -static int octeon_mmc_remove(struct platform_device *pdev) +static void octeon_mmc_remove(struct platform_device *pdev) { struct cvm_mmc_host *host = platform_get_drvdata(pdev); u64 dma_cfg; @@ -309,7 +309,6 @@ static int octeon_mmc_remove(struct platform_device *pdev) writeq(dma_cfg, host->dma_base + MIO_EMM_DMA_CFG(host)); octeon_mmc_set_shared_power(host, 0); - return 0; } static const struct of_device_id octeon_mmc_match[] = { @@ -325,7 +324,7 @@ MODULE_DEVICE_TABLE(of, octeon_mmc_match); static struct platform_driver octeon_mmc_driver = { .probe = octeon_mmc_probe, - .remove = octeon_mmc_remove, + .remove_new = octeon_mmc_remove, .driver = { .name = KBUILD_MODNAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,