From patchwork Wed Jul 26 04:00:08 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: 126091 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp179292vqo; Tue, 25 Jul 2023 22:01:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFAtp8L/VuY+fxdAmtdTd4NjvPWyD5kD9MVOLwp6df435ZxmZ6RfA/ghqdF1r7oWDIr+kG5 X-Received: by 2002:aa7:c1d1:0:b0:521:7a5e:ab1e with SMTP id d17-20020aa7c1d1000000b005217a5eab1emr667117edp.21.1690347689877; Tue, 25 Jul 2023 22:01:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347689; cv=pass; d=google.com; s=arc-20160816; b=QZN0MjdOsGiNcBu5Wdgv6ezXW91cgItNorcI4JjoqKtjksudGawjh9nQ5EE1bqlFx7 /LhK8gTantNZWc4GiRfntf8hqtbjh3DNRtrRDldDp3n5dc1+/k/CloC/FBldaGfvHtuN yrljm2In+p7cEYXt8/7JJWhFFZGNM+TDDOD9a39iArQymw1NEX/C9oQsw7dDtEuZaD9H OIrqCROnq9tTlbkpKAgS0RKHSYfEIF5HMx1eke0g6LO0qqRmMaqYryCUVCq8qI20LK2Z t3ZtsD3vEZlzUBObLiquHkx+Qhzdjy3K+9x6WvuwiTOuLzPx2INQYjKf6I6b8bF1A9mi +BpA== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; fh=KaHw6wvoY0nORQNloGxgAdG9EQoKCtLTTxL7ZTkIt8Q=; b=d1iRJi1C2nU1+aJ4H4utkvHQcHBUPTahCutW9XFgk56OWM2iPzRyjdLxk6VLdC1EnU QOiIimL1BPadrO7X9PuU9hsL8OkvrL3s5l6yPKEwhaG2DbzsFE7y/2ij2RA7twRYDLF9 mQh3Zj7iMu+b6ga0DQOEQJVLJtuc0BjxRt/no4CVFeqc4HwYoX/3l6F4Zoogkl9T8y8h sbYywi5mp6VEXAHKgCzERmOuFTBlQaQ5+mxN2KfqlxnuXthcHO2HC4ueUVXH80TOUOZs pM7RyxjYY7nK9pve4QXcSDRCIq//aGLdfIDKB29p5FsaOwFWDiTBOhJSy/6wqZnqyghq cF2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XpX8JNNg; 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 d1-20020aa7d5c1000000b0052231fbd962si3517346eds.417.2023.07.25.22.01.05; Tue, 25 Jul 2023 22:01:29 -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=XpX8JNNg; 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 S231757AbjGZEHM (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbjGZEGb (ORCPT ); Wed, 26 Jul 2023 00:06:31 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 961584C01; Tue, 25 Jul 2023 21:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NiEVMxGj4wwxvO/HM4EUYcWPWjDiOqHJZ2Z5rubUO7gt/66pcqMwlSPaRIo3PupxQGqXg4zqvyLfV24iX4R0gRnaezks+1I5zQGGoZ5OGFHz/M3meg3iLpVT3L2Qe6RWIEWmLLP9PefB+9B7QbQC0NmjmgqIApgv1hpgmZFXHOg4Y4P9TLZFBQZOgO1Jg2ATWPSNCZb5DaePnrjdFiytOB2w0vDw/D4RJz50GsPurVjI9Vlq7JkVV86m1mJc3ZfSParDZnPAhpoxMSsyrtRW+RwAr+94zkmpK6YIUP2B/0KTgrfCpdt55A0Do1ZvSSxBbuGIyPjCLoVZQ8tn7K/WaQ== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=YsTdP8Vk2FUKvEw1pu6gVOkmzBqtpVzQaoN2q8MH+49A1vO9+VUL47nvn7Th9oS+I1T6bDF8RLYyPmSTQ+HXeaxGaBpXYus74fO7c9O3AAMuTCoSkMZ69L2A8oM3K0ySTFG6GwOhL/pqwJZlemCF+ZC9YoO58fi0Z4Dooi4Czwe+2WybQy/WXSHMLVI8n7KNnYl5Cj3JzesLhlbcOnPHihF3Qj6i02MBtR2YxmXTk221e16NfOyhDiSjFqskLb4zBIsrAaJGynSWRcDGJTU+diu/SyI2ZQ5iiXykuIEYiWsU5b2f0bz7+nOivbkY3tXE7bu5jNZ0R7tdn5i9emWK2w== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=XpX8JNNgsDBU0NpcRAlpkv4LC4qAnIst75cMsstYbenJ19n3MOk/0C1HveriffzjHqnr/SeiHJDoLprzxlQD1rGn4A+9SsWYjQ7IH4mTaH73lMlAwWrUOMSbSv3XhehflQ37UNiBXyqRCCmz5pYRoFXzQ6sRO/TpyEDKTdYjmYjVBne/F2BmvkC7XohzMet0ZupCuasyFKy7Qp8H+bs7zgd1tuJWXDqerUmGbtuR2BQUgHmorQ0Mr/R1G9F4kd1iEvHLuz5iDf4CE+D+eZK0T2whmIAyLJQ6/KMYDHW3SmNSjKqK948m68LglbYx8i8pjprcZmKNDdyt5yqTMj2wSw== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:46 +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:01:46 +0000 From: Yangtao Li To: Manuel Lauss , 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 28/61] mmc: au1xmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:08 +0800 Message-Id: <20230726040041.26267-28-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_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 83cb8af9-c32d-4acb-9ed9-08db8d8d07ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XjlCMSSqqxqI/pug06QNmO+ufFz6YF0FtXzYzPFQUj0Q8TRRrpB1G3vVj+gSJQgzqxUprgL9GhxCvGKQGwJMKpxAQ45ENYyKLkCkyt+FrM94T40NKM4bNX60bU5H620PKbXFa1/bTMEhPpxGR7E12HiRoHCzI29jcHGCYHFx6DM01GXJ4BeLui/d999qRXvr2Na+zmX+XMZYJihB+2L6xF/1od7qbS//fOQNLpfoIMKPVCNt8XNPtjq1eM25+CHND43cldz94g/zrnRvNXUkuraEjCfCvjgmhL871BjNdPPe2jwcNRujpUgGS5ufEd7fHgny+5iaZt+odb12Nq51a/glqpa54tPvJ4e+q/80wFgq4uau6Qp926k1V7BfKCLYX0tIo/XrkagMUmen5VWJ6afsl/OpGCJQMa++ZjuWDEGb+Xk1HamhzqtmpDpBXo6X3hUwF+UgvrEJFepb8dBb3ZSuJSSZaqgJRHr9HQuJYL2zXYY01F+S3zdIO+VG6FCrFatyxW95Vk+OIj3PTlYtyWbZaclq4YnaADfkBvNy8G8oTKTKyRzRvwelUhn9lcA9nQae7vu64EijNaf48aeH8HYuETvRG8olwCEKzjT6vcEa8K4la9HCdmzcN6g0NzChiztQC4Klgx94owfQTF7kOw== 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)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66574015)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TkbxY6Gydb5kyAw0Eug29j5mnEH9?= =?utf-8?q?anMUTeFCyOTIyxJRFEIhgvsTdxU6StLVc/46Wvtpdhrwf4C8ci2XiyZO6gGMgZiy5?= =?utf-8?q?Qohe2Re4kuHRb4o3zC9+Dls7sVPOn98arskdSwDNiNhhHbcUVko3BgBnSfMI4hRIP?= =?utf-8?q?tOTg8IOTVS9KGWBSeJsaBUr0mkj9l0SWpP8ODdbWwcC3+LKsDoHZ+GtztUNGktPVf?= =?utf-8?q?m0Ja6tjUsGYDPrcSRY9S9i8g6bRELeQsoyqRphiv1hmoXJ2eCzUAZPHPJIjmYy1sS?= =?utf-8?q?PiH5L6TrapPzVwsU8btzWon/udS/Q4FrKzyQGWT/BMcJgWs6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pJClvlKPAWh8SraOqZ?= =?utf-8?q?ESQaSULrR+Ev9ZM1G+pbECvSpPdHNL/iVNKZuRr8CmicRS5wBzV39jF1wyayra4VG?= =?utf-8?q?Vp2W/KA8+HI4k+qzC+5QdCTSEyABBnBe9z+XLsuQiE0NbSV3/Qv+kRQAfGevk0rpd?= =?utf-8?q?NJQGQV38lj8IXnAjcPRk3xypwveheCIEv7INxO+D/K5VmOBYSHvxClFuYXv1/JONr?= =?utf-8?q?SMEyKv2FX+CwzjH2vKzugpKLYRg/jIzEzGNCDjaJE3q2ZV41KVZe7ENhI3fflL8dY?= =?utf-8?q?8wJ5bKcKv9zQdpxR/h0222pdWVNgkTmAGeEfqIVDl7tJJQ20S+6aTdJG4V1Dt9DbD?= =?utf-8?q?1lqPJ0RTVciF?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83cb8af9-c32d-4acb-9ed9-08db8d8d07ad 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:46.3127 (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: MNGjgnmiO9kgfZT+jp1IoGNzizuTRAhrVTlM1a36jWa/TIQG+GTlOOcE4uz9hkXVPS67XC5fRZCmSb7ZXVyAkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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, 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: 1772458019306440193 X-GMAIL-MSGID: 1772458019306440193 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/au1xmmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 82dd0ae40305..b5a5c6a2fe8b 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1114,7 +1114,7 @@ static int au1xmmc_probe(struct platform_device *pdev) return ret; } -static int au1xmmc_remove(struct platform_device *pdev) +static void au1xmmc_remove(struct platform_device *pdev) { struct au1xmmc_host *host = platform_get_drvdata(pdev); @@ -1153,7 +1153,6 @@ static int au1xmmc_remove(struct platform_device *pdev) mmc_free_host(host->mmc); } - return 0; } #ifdef CONFIG_PM @@ -1185,7 +1184,7 @@ static int au1xmmc_resume(struct platform_device *pdev) static struct platform_driver au1xmmc_driver = { .probe = au1xmmc_probe, - .remove = au1xmmc_remove, + .remove_new = au1xmmc_remove, .suspend = au1xmmc_suspend, .resume = au1xmmc_resume, .driver = {