From patchwork Thu Jul 13 08:07:38 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: 119662 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680442vqm; Thu, 13 Jul 2023 01:44:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdhb5wnBrr3UCk/LgZHKcRGNZwM+EDc3gQx7RIYDBM3Z+U45ZpdeAhZYogioDVsBnKQB7o X-Received: by 2002:a17:907:37a:b0:993:6845:89d9 with SMTP id rs26-20020a170907037a00b00993684589d9mr732578ejb.44.1689237899679; Thu, 13 Jul 2023 01:44:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237899; cv=pass; d=google.com; s=arc-20160816; b=UOzRpJMvJq1j3mM4KPR9Dx5+2UZWWNGk5cherpE5eTLRa0HgjRNSUwTDTWUXHVFg03 PzW9KcFzJkva6o+KeZAuLmADuKP7Xyg/1kcxnXORy+GIr3RuRcHvtq990U9IT9onxPad R7H3qM3XgqbMzDQJ/VRZ5kdJj1fCq4LlzyaLj2CJQerRWp6pBKZFx4rqGMxjR0vuKmy0 kjMbSW4LV58aVPwKAtbvCjBvj68Vvrwx1fGA/giElg7e9a/3yVKvjpCNwHk5OUBbRSps g71lMDOY1dnEpzXY97iebUdykTicBJ/uKNhrz7oN2eGAfm6NTrg69xcAXaI7BXuBaUTk WeJQ== 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=k2RLwq6Y4Urty5/XXzR/nti8cSztBdB23zQkrow+gZ0Oysu+DZS5CbK+MkVIKYrHYz o19zGyoRrZ1cFWuAcnPAcG3BG7t2Qnv7EY4WrirkhJgkUpozUN/gYYrQ+Y9UMlVsPMLx UMn6HZpbal0K0HFXI8Y14Hdf+cPPiF2DB68+WBtZAMiCnLS7qScYstlfo3NmmShpv3cY 5mAfdseTT6JF6xT42iQ5sP+lgrgRl7ow+c97qb/hmUCY65g90n7F0vTl0iEC0PV0fW9r uHF3DJX7nOCcHm4VaWDFpx1+ORPwwJsJun4Ga2nJjgPzmE0kE6P9hbrpH382uYPXSGd0 rUTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UgQ0igkl; 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.44.35; Thu, 13 Jul 2023 01:44:59 -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=UgQ0igkl; 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 S234336AbjGMIMe (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234012AbjGMILV (ORCPT ); Thu, 13 Jul 2023 04:11:21 -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 0E84810FA; Thu, 13 Jul 2023 01:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mSOdt9aBnXNAzr2FUDhnOdeE1V6HpIVYXMUAcWqa8BKuiyJVixM7PAZEzTkxmOC7ifw4OdfB/YHXAVJQOkAsjk52vLXAAtcl7J/PmuqF360pyGMyTgiAaVOrZYUZ6FSEejCh/YQ6/8FLx+wE7+hqmbxKeEOvAFt+idupbvzbEzMfV5BneJRtriCwkD2+z4mHlB28nGLaOvuSby2bxQKdQGVpYofWeEA/HSzEFhf09Uvby77X10YVzc6/z4g6m4T5Wt1zbJQk0qvq+fe543xHqt+4U4Zkq2Yur8hSY1p1mo/Vu80fcurSeohmelXm1YlFerIV6rdg6fSgnkjWhU2QUg== 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=QewAxLKPCk8J7jfOhYFRRgEHSXZBFGaGcXoCGlDrqv1Kaw2NCFWoe6+MlLJb0MdxcWCpke1E6pjZJlNoE596TGvkUa2Fw0+QnEb/az/A4EXvKZQBd43ZxwAqRczCeoqxW80MYaCvdjzOoABVBCPgOFw4WfhQQ+I0H8FD+dSshdrbxUWA02tTzIg2niZ5/rx/ozTti04VxEkFXQLBhmVjMw/30gQnOgw1VGhfgSPzmkgH2AlaVDneV6JiC+X4t/3U2F3WwflTOeZTtkLGKOlCDW6Gldw8oePyUzlgEWxdhkNSsmPEGMk+j+1CJ96N43RQ3jntXtqyDD3XyFr1kBFVTQ== 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=UgQ0igklY8IShgThuvB30420emNdWELIvva+hVxq7lD2e8xAQDJ8GceP6iFAGOyi/UwFahCUsSnKDMPS2ue/nv9Y5jvc5ntUJ5WAdDHB/wCYjPXGTH8F0C64t4eXoYd89ou368TXYw7uwI6eQabpxKP4+Q04ELNdlCsoW9FlzsSpQczylKF0bDz+rZ310wPw2YxitQjdDVZ/OE+ntaEQTZHd25373kIwXp35/XGWfc9IkDdu0bFwp5sPvysxgmPzfaAP2q/jO0FwTpM7/grlJPOZlaoMgllJnnmZgLAms9XSstd8rVdri988Q2MnS9szQ9TRQANaqGvZDChD+qmgIQ== 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:11 +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:11 +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 29/58] mmc: au1xmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:38 +0800 Message-Id: <20230713080807.69999-29-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: 6e97c850-f265-4f30-b8f2-08db8378706f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dX1pNE4yEphqHHb2u4T/vj31CTMX83+gcTn6A3bpo1obfXaX9c0X+CCFSAqWAJlybw9vCn2EXm6XXTjxaX+7r8zTZ3T/vbrRQ7O03qz295Owyl1SVCVipM1WB0uPvzHL+QDdbVTLx+EgpP+0XxQVdenpJ5qcEUPPO8eW9uErOm/76XnfNmf4wau9JvLFNL0PnqTvSR8ZdNDnznOd9g3zbdG5Ur/Y7r43WHhkozRoVlrCJIfIRetwy24rmGuWXkcggnB2t2XxSPi3QuP9sRnTzTbzhkX+7OhQayi/iB/M/wG5r2fZjM7bAhsYowX6lcJ3z82Uh8Gw9AOn13TYXMnfqjrmrfVJJaBEcQ4CW6Al17C7uYYfpIandlylVRmS0xEQKkfyW2Nxb2NmQtzpoB7D4mKMKfVTrrIVpkpcQ4+JKNRnfkB4fyqnPX7++dI79Q+iT/RbpKXAtjGOq1zQUiwNiXt7veJpFAGjjmry5dZgwHr/WfbYFl8zK8TCokvgwl1OYUyjHQz76iOc0nEOM9QMqJ/SNGd98PBTKo/nhOLkJ05dolrE8cF7qwVL4LjgA5fSGbrfI0J0UB/4CDIsC0ri+fTjFqJc3u3xUWoMEDb6EYuRaQt6ux0TwNbzR1Hkeca4o+5qMdSGyKUWgwrOwT82aA== 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)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VXO99rXwrdWtTDct25fYTRmWCt4u?= =?utf-8?q?zm3GOQ2PP9Y7f8G+B+9vJyzgTa2e5f56FEgBB4MnVYttuggedSkZ/K2lM0RpCTJ/9?= =?utf-8?q?EZy3hrFsenjvT1x+PKyVhhrmuQooe0uxJmTPhHp+jvI5tUqbaHFNLuBXL1BnmgdrT?= =?utf-8?q?tLdZfjz8OlyEdEsOOxSwG7QsrPRJtY74N6YKF+lCCAuQKro2bgWCeT5zeZoWzx+2m?= =?utf-8?q?JJ0VP8BhZyzn+hiAtD20n9Ej+pH3LllfzssRMhk5uZy+YcDOC6PFrJDMD3zlluVBx?= =?utf-8?q?/iFKFwxkypV9S1oi8roM604rxL2Updru7anyeELcQeJULLzIG8Yv6rLxjy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dRHD56LArWZ?= =?utf-8?q?ByKvt8FwWfvRtHl/78tvkW0GHCJhV8dCnXvJvs5XYH/VY5o3puAulrUujt5+r9oSh?= =?utf-8?q?SmDA5sxUIjUzyHzg/WNE5xSZMJaGGfFlY/QVoHs2zzfxAoa/OcmW+7wzYdRg5bcED?= =?utf-8?q?JslOLdt41fDNXoxAr2bUGBH8sYH0kBid+1xQOby1P8t3aWMPD7Kj66bUS08H2rQrd?= =?utf-8?q?Z1suGzMTBj8Yat3XRVpJ18DMr9VH4IOQikH5PMtNI1/koQuPr9NPm/UsRNoRD1mle?= =?utf-8?q?VWqYuXi8w9hHLNWihAIrxUzOxgJj47OiWi2Cy6LZLfIPwq79+qd+R1c8Sp5RtLzXF?= =?utf-8?q?NeglHxF0PUAf?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e97c850-f265-4f30-b8f2-08db8378706f 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:11.0085 (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: mvx8GXP6jN2PXQH3ZwXFxSqEBgya0AUmXafIW1TTMBclF8RUgRZXtqe8gfDfOnfWULQk0hx+IOvLFgpANbuapQ== 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: 1771294319831760670 X-GMAIL-MSGID: 1771294319831760670 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 = {