From patchwork Wed Jul 26 04:00:10 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: 126107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp188611vqo; Tue, 25 Jul 2023 22:30:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHiuXPiZJbkh6FCNM2S+otucINATdkmSpQWORcF/HzDnyZcxVaefFd4KuYcgDJRGV0L11+8 X-Received: by 2002:a17:90a:38e5:b0:262:ee7d:2d20 with SMTP id x92-20020a17090a38e500b00262ee7d2d20mr1163950pjb.12.1690349407262; Tue, 25 Jul 2023 22:30:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349407; cv=pass; d=google.com; s=arc-20160816; b=spB+hcoZf70+DHgCShr9lQmEVyn1Zfew3TOxyufYWPuNxJc6OAsNj35qokinFAvqwb tyEaPRkmFGLK2ze7M8Ue8x24UKt/dXZUzS3zQdsB6EC+zPU17lExbiStKquOf1G5MBbw xt53TJEwedixup6MYh/zI9ZiOhZs5/kBqgTNY6ybMAo3/NG2VFtb287L8C87VfbfCKDc RKLaS/qfo/uteGakDUAIfX87f/wFtxnl0PKTWrzftGQiTz34TrEtNSyYiwV0QUvIBWRV A4jUHXp6v5oMH1a01AGpN1vR/0y5HKPgnGqLBftII/IOxetyDv1M+78owrpH4DiT+luo htuQ== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=JXxBe5+WGNPSIT2yX88HYFyYkiuAVrc6YyxrjPdLVYJInMjjSFIJDqYYttuRxK2IDC 9/JLFVG5rH/exlELqUwpwHtAG5EOibxIhKVsYMFhVQbKJIx1fpMSpE1XJfmOiTSth5sq GYzdMocWFGKCAoV/lYhdDE/jMTBj3OO3SbKZgsw8uGTDutQOAtjNeqQw+ixZLv7+n+WX 7Tffs/WyiYqtLrlGrRKoxQF+1I1coJIJuD6mSiecG+jQnhAPHXP0pUlKI6UwKzkTHWS1 RGzP5R1a792zGlTTY4iV4MF2FE9dfA7Q8nhlRcucp7h88oc6vgHpq1mxyNl+d0cP1thK ifAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GWH0n7at; 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 c15-20020a63724f000000b0054ff0049d08si11829100pgn.404.2023.07.25.22.29.50; Tue, 25 Jul 2023 22:30: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=GWH0n7at; 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 S231720AbjGZEEu (ORCPT + 99 others); Wed, 26 Jul 2023 00:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231741AbjGZEEF (ORCPT ); Wed, 26 Jul 2023 00:04:05 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2133.outbound.protection.outlook.com [40.107.215.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E534489; Tue, 25 Jul 2023 21:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kWJVu8xAC6RzhRpnbCRACJtpBIQSF6PaXsqWkd4xsoATwVNBDbRPI1GfSR0R2eCAZ9Hi4Y+G8A672mJ3pOQp1CvZGk3/2mT7ZfKW/ObOtmIPY9GQF6IrP93jgU1jFSHv7azsJVoV5CsJM9M18KrKzB4OVE2mQcDzjHTQ5MILISJm13sgR3K82vaCl1hpmp8FMFwK65w+rTXVh+R3hHtYmaxatdrqHqamAItpxQAyy2rMuoskGKWK+RmI2sGH3D5ET+lyNozYDwTXgPWFVw0cFKpQyyi6XrYwTQptQS1/O9O7HIMJYJGmNbM4HwSYaAFg1K1g96M3BA4KU4zj+A0fhw== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=ZKK9miTdXwcWa4gBUXFoN1sl8n9Xt8pEmg/uBzIti3/0Vm+dHwOuesWtPvkpxeTihsZyxoQQiXSzIVxmYwwMl4iq+FJNdWujG5ic+rS3/ktWfOBdqVrdGhbG4mTTUGrhBv0UzZYeXRDX4w0aG+NZ5eEx8hPaaUQZqWvSQI1OLlDBre/DqYgJtyTS37WdmCot7Il7mIQFf+2YeXebDD3QwomyB/RYXVbCusowTm0s4nkA7s/BwYn3at7EIS3plGYAD/+Jj18Dn2Ds6WW6BBQYb7ugBNWfZGTU1IgjUak0T/Wpz2u7m6+25amfakf79AFhWnytE3zPYp0o8G9TqY7F+A== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=GWH0n7atTIMuAi9ObhApCNjqY42Sm1epzATXaIRoPAPuhiUQgYW9yMH2ZrK0Lr1aY8Gf5gSbyWCUUCbHRLoM3XQBnwxpOjilB07zwaZXsJCFkdRHISmoivbAMwR+eoC7MQ2xVcOLUDfwpEzz16XLZH5gjXNB9o03C5YK5P4PWv59GWEen9/cuxA5YFFZ/9MsPQmmxDCQlFSG3/GwCaVS/XFdWtRjtqD3xE/d7qUUxCHyhTQbrPbrsL0Rk0IWXx7aIbW+APElb35L3eHOgVQVY7Ml3AZnf7gG69KyqeBtd+UE46kSpsZcW+Hf05/fE7KMuT0GxnqOkxBflQE0OpD2Lw== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:50 +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:49 +0000 From: Yangtao Li To: 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 30/61] mmc: pxamci: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:10 +0800 Message-Id: <20230726040041.26267-30-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: c05cc003-b61a-464f-0bce-08db8d8d09ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vQwZV0OeFfcynpOf/1lvuQFUTu/6nRkiNuiunJDH/b2UQJTWeGiCBbUqJIi8YGHXECIXDhBHkx/Tc3FmBdL6LmP0omCC8JEnvqVmurLW7tJFysyVRgH7CgzfKHtBw0D/gPg9kcpwgCE6/XI/P1mN7KneU0EVXVR88g4LTlC2kv5HpcBcWUJpzJov6198cf3EO8K9aJdXAjipkOg/BLw+Efqigtvaq+qEHWRMdi1z9PeeZ+F/Y1FVBUcK55ddRBAlEnJ/zwc64f3NZANZfLT52uKnho+RAFaa/A4sOcBcHiJOFhoKbu9EUKp0kMbo6gPv+6BY6y7suFYfc69eN7enNBGHl+8yVMrKr5SNTTDy74YreiVd8KKP2QSw78oYG23NpH2iGB9GkoF6zirFB1dchp/wS86w9GqPHR+ElIbDAb2vhoWa+AY2u/WKvby5M9zYbS8GuPzfFQugUNch9LXAUkrRZFdObj80HFj9vg1zY0+DwPFgvqXt06kv507v7RESCenRpyzvXjcsWPds5wPVpPAb6dlotqBLB0mGAYNy1gDDlVCRzpJtY8I4g0btq9ffMp7bi4oEwo0fYiQSBpSVX2mS+qVtTLpPdFJh2LrrcQ+Xgb9y8gap3mC0QwEeTcli 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)(396003)(39860400002)(346002)(366004)(376002)(136003)(451199021)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(6916009)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?X3m324XMo0Xt9rAwXXwNVQgjrTYp?= =?utf-8?q?kF2EPT793SBLps9vDxdroi2sX4DCKG+Bm1bOpNTInaDzRPs7LouZ4Vd3TVpuaboHz?= =?utf-8?q?4X9Fs6rlXH9E4RLIMqW1d7P7FByxYdcYtjzG3uulwfuoFnIIDIJTRSOf3SN9f1CZK?= =?utf-8?q?a7Vplru37fMFp7DOiJojmo/YNCnnRv2J6nbBuuEoO4kAMa+mJ7e+ew+b+jYSqdeTl?= =?utf-8?q?kRhuDSJuOEaE2UvjF6uWpLk+l+dQ756Q9lgoSKz69HiIlMJMC0pYNPCw3DDjL+riP?= =?utf-8?q?4lrbWN/FwnMAFapKzV//G4z+w1qw6F+uPPsGsbKkFVzMjIp6DHToB0MVLLYQYHsV5?= =?utf-8?q?VhlSmdJOQoR6VnaZiqJOLYck7c0jurbYuC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m4S29FrHhTg1km3?= =?utf-8?q?Go42oTWn6wYNrouO+9Vyfr15rbbHVGL2NFUhMe+4GICvQDEL9864rlJPPiAUDcgqe?= =?utf-8?q?r5bxALXae6zBSwfWMntoj117wvQ6RuE3tl9EJr1y5mbsnDnA78cJj9Y70RD/+uXjC?= =?utf-8?q?S8z2TbY+KNvfT4axYa+wn/VbV3stN6AKs3VbLJOt1mwcrKRzGjIpGPKq3bnwuTOGF?= =?utf-8?q?GWppC9jxGR2B4QPycRj9auXYHyPTL2obDTptHYQherts/05Pl+YCVYrLqP8FeB0B5?= =?utf-8?q?0vjXUvMcFGd7?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c05cc003-b61a-464f-0bce-08db8d8d09ba 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:49.7438 (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: BTEIMxtu8zODclDsTFe3qT0EuGJ+d4xSKxvCDPOl5TkwkcB0IQjfc4k4AqpKQA9avJ10DXj7I3O9PFix1i7I3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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: 1772459820283699421 X-GMAIL-MSGID: 1772459820283699421 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/pxamci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 1142cd2368f6..e44c8ff6b303 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -783,7 +783,7 @@ static int pxamci_probe(struct platform_device *pdev) return ret; } -static int pxamci_remove(struct platform_device *pdev) +static void pxamci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -807,13 +807,11 @@ static int pxamci_remove(struct platform_device *pdev) mmc_free_host(mmc); } - - return 0; } static struct platform_driver pxamci_driver = { .probe = pxamci_probe, - .remove = pxamci_remove, + .remove_new = pxamci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,