From patchwork Wed Jul 26 03:59:41 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: 126069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp168688vqo; Tue, 25 Jul 2023 21:27:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBQ2cXTNASiNXftK0H7/pbG1abfpW1BHmM7F1Rq9meoZE2s26oUOD7fkb32ku7x6FhePgV X-Received: by 2002:a17:906:783:b0:993:f744:d230 with SMTP id l3-20020a170906078300b00993f744d230mr550896ejc.16.1690345622505; Tue, 25 Jul 2023 21:27:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345622; cv=pass; d=google.com; s=arc-20160816; b=OR8wqrxvzulEr2rv104lhpDrRRzmW/Bo/MQuSWH+Hxt6jt1/QANDc1/7q/cHMFvD/I o0D8W0U+Z3DZQ9KjtqhLdPUUGNA+0iRvpYh4DfyYO7notnf/9ozPaXHqM9FNQ546P2xJ lLdQhfzc2Cr+U5xSf+E6XEdnIzXS28MBMvaNu5L143p4enG+9lZUZR9TYS1KhV75xCZF PE3JYqrItcezl0Xd7qFhqUJHoykdL36xOHH1uAVEn/C1g8y4oq/CVoWjiSJtBPmvF0eu 7GonUd2S6KWgK3nhjZooGH/w0R2b6UZFphfKsvxiR27PNiviJYg7Pbuqw8iTKGPcPA26 mBXg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; fh=Obr7MIEUOpnq0pB6zulldJnRaWUMQlXEdPVcMkgQvIc=; b=EQ8KqkJ4BvnbdnpjVP7xz/Wn7WK9IwX8ChvDdijXHVg4dqUnaiKKVbpgmc5Og5V8ea 8M9ZujiXVDUkY9Me/tIf7KdTFwbfheSwLUkT89jN6sGrl/YXcJNw+/wQbZCsfkYBrdjO FWUndjoR8O/LGDgMP8m20ZXms8+sjynUbMx5EkVouYBHytPMBSrafa1lX9ym2nwcB+WO P1EcrcwR9rh0HyIwqFYfIipA++hZ3moLkqg9tVf34VGhr9SlHAKwI7Xi0RvawKqnrGtZ 3hVwEjowvS/PQlTZS7jBtTjnG004GdodvqMrUPBJzKGuAPepCizYNRrlhTUHTcAYLEj0 JrxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qroh9Iix; 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 w26-20020a170906131a00b0099bc8469e26si222261ejb.923.2023.07.25.21.26.38; Tue, 25 Jul 2023 21:27:02 -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=qroh9Iix; 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 S231473AbjGZECD (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjGZEBH (ORCPT ); Wed, 26 Jul 2023 00:01:07 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94BA8269E; Tue, 25 Jul 2023 21:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MlcwkgcHGDI2TqPpiisMMeT0ZLIkpVHKVH/4Xxv+37Zu78HxGuRNmNL6qMCt0nL/68J2yC8uX9GfikSgVN/JwoXAudlQoSwEFJbKGfrig23w7BYl5ucAGwQWZty/IKPBwYHcMujVN/i685qEEy3bOuXnRaRR1MFVfTkmb04502tIJLaEf3Zq38VFnA3tsYK2We3EkvcBHcjaGtXksXXDBgEYLtUuC4MxvsDvFHam+LhGS4JO29Dqipu33MZgs7nTDB+HRWsTj7+SohFtX2224IRXf77tl5k9W3P+VbIdB47vmDeXdJuboVzGS3HC08gycLdoh08dHoXdzBVfQYEUhw== 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=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; b=h1cw918Yd1ry+EpvVr6WMXIxnqPwS8zYYGGNzt6U02ZzKEW5n3sVD3BUQvHh3rzqZ1GCJ8oAGJjgKApsqESYSVQ9QeqWedTzgG3NOz1QTSv1ZZAtJYtrLNLX2ODBesVzJpMRdNMMu3YwYVZVGn2sib7SeHWmsiEFBdKxGN/FBc4VA9es+TlimHZZRrT2qefNJJyDV8WqqXZxOlY/aHeqgzzz8mBQSBX2tYcyNXx0OaZ8J8MEt8bpMtuuSRiLv6W1KUnH7Iy/xdBMNx3bt02edPjeI7W2aK8500b19f5S0DoUAFbj7aJsYLEwhoT+SjcZHHqshoQWoQ2Au78WLX1O5g== 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=3BDV2gitE9ZgnfS93zzj6+ruXHPsGkYOE2qo/yJJ5Ek=; b=qroh9Iixb1OsbPnjY51PEiFN7WWzI3lOuDikVcUJQKG2CZ4w1E1QD8HCPoOo3dKjHJ2SfEV5b4cyanRr/L8/gnBRZAV5YD0Yydxe2IoilVNq6RioCiLENmgR2PTmzPwzXEIsZ22dGPT2Wyq/Fxw6VKXCfM3GaPWUzRQZjVNesFP5Cf1UoFeiCRk8WibEuoXVMCzwzUpk51xRXa9rE5rjT7/XWp4/ysziIrt3cDIEZwYBo7MmzHU3GJQk5XYshlTLzBmO2p2M+8THSTi8tvMubb6Nc8XlGAtw7ZybnKS8NJ+1vswRmwfzAs41zJQTsk9NSFmYyJn9l/t6DOj4MSJooQ== 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:00:58 +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:00:58 +0000 From: Yangtao Li To: Ulf Hansson , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/61] mmc: sunxi: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:41 +0800 Message-Id: <20230726040041.26267-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: 5ba3f6ce-3a51-4f19-c4d2-08db8d8cea96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ALd4vzLpCTgLlrooFKH2HPnGprtEEBSQjEVvatApTIprT1rAymjZrQqeGl4uFjMmQOYbPekNZAbJKTQEPbvVDZ4V8NGwBWhW73Wlq27tMxw2/BccxAq/MkxSER41S9ZV5HxSfUrkMA2DU/P9j/pEpkAIVEcLegclUjNfikwXF6rBy6RpQEL3365hK8akXEokVZJYkFpxN6PJevsEO5v9W+eLKBgK4zuXG4NpmRqChopxJ//zq+Lw5dMuftiPKoSntDgxsOE3ly6aNtFbQKzxa8atdztsaYytaWyeYnqS3ARpJOf8FSkv03cVBqhWPQbPg5/9L8wARNVul57YlJd6VeXGnWCMwmXDgYpnwH7kh0OQQAyhP0yHHQpilRpiNuDWPntnjDGHzdKDM4EQudVjHGELd7JOYUlNflzrwD9yT90QA9wrOmNM/HUm7zYIL/xAqFBaIto/scZyNDkTjMngqZNnXtwaigy47LiNGkw8dTzFvTNRcBaEV6WolHuOAj0IlHmrUtZKE2IQ39ZUicB1m3IgU9hi6/Jd03FQlWd3Bg/rfno0PM3rlvqnC6oDAb66iEn+GQvaj6cIXl5lJbDzvU8VaH8qrPCKIW6IDo7GKRkR8z5tz4z+jwi5d4fMO3xg 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?QZyuAwVhLXLlSkvKwYmV7Y0Qu/Q6?= =?utf-8?q?Acd7aUBLuqX59EhwyyncmmVRodixvojUaHVQPVexWh59iF/4xflTUY0RGoekgNJtS?= =?utf-8?q?nlPM6wO6AFMPozgPe02OghyNW1aXM8o5OZ+S9XQez1zmCt1+rW+08OzS4fQWdhQT7?= =?utf-8?q?4cVFrm0Dxk0aPhn4RPXNp4lChpjT9qyxTth+We5Qsnu57PvUtQM96mXtXoVvALruQ?= =?utf-8?q?sl/HeINC+XvY/GPqxcwmDVUF2HkeFBogC5t+xqrqZsnBIcpnSfyGwwf/jz603E2sr?= =?utf-8?q?9YX2hd/L7mORJzQS5uwX7MRpLPkCLc6Zfag0obRTYEoex2ugzrcRZNkj2ZZRoMDYg?= =?utf-8?q?mhxlUHjTDSaB91xpD0Mzs7mU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LgMqPufNG9h9nZ5a/brPZ4?= =?utf-8?q?5uryh6mquelWdEtN9lMW38hdzk41eW63XYtUM6ckftpeb3NsEHVWW+KP/x7KMTGJq?= =?utf-8?q?R66ArpX+TWCCqWCQREykPPhiDTwSZKN+J6Fw9R6JGStR8MiBPh7GGI80zXMf6rUZ5?= =?utf-8?q?qZYn4HsUl5qF99Cw0lPIOe1YhlTEj4bpKG+KYciTXt++BI4McKcAG2s5gue8LZe7a?= =?utf-8?q?Pc99+z/1dLQ7JHj8zC0yFG1DBH61mUhP5Twt7JJ4JePINYIKu+6BiLZ9a5tto/BI/?= =?utf-8?q?RS+TjIw4cF3W?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ba3f6ce-3a51-4f19-c4d2-08db8d8cea96 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:00:57.6171 (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: pGQOb7S5oFvM1sOBl45W4LjCrpWFQ2mGtpHKFHiuBXOzqbHiHyKoppRWEnudIkdVv0WL7XwWpujNuIdz7uu7rA== 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: 1772455851315849677 X-GMAIL-MSGID: 1772455851315849677 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 Acked-by: Jernej Skrabec --- drivers/mmc/host/sunxi-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 69dcb8805e05..d3bd0ac99ec4 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev) return ret; } -static int sunxi_mmc_remove(struct platform_device *pdev) +static void sunxi_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct sunxi_mmc_host *host = mmc_priv(mmc); @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev) } dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = { .pm = &sunxi_mmc_pm_ops, }, .probe = sunxi_mmc_probe, - .remove = sunxi_mmc_remove, + .remove_new = sunxi_mmc_remove, }; module_platform_driver(sunxi_mmc_driver); From patchwork Wed Jul 26 03:59:42 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: 126056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162630vqo; Tue, 25 Jul 2023 21:07:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8REb7VQcUk2VQ1o1SgY0oItB29Redyis4lIsepbjaWN/a7gZ9MkSHHjmzZlMORiUo8XPf X-Received: by 2002:a05:620a:15e4:b0:767:2198:b52b with SMTP id p4-20020a05620a15e400b007672198b52bmr780571qkm.78.1690344436399; Tue, 25 Jul 2023 21:07:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344436; cv=pass; d=google.com; s=arc-20160816; b=wdEzB7Mml5+EsxMsj/Wu/6gkgLyWz1L2yjb0ntV1AopWKgYXxbjDrvK6pITodYpAD6 jbWeyut2ukZFkXJ79DtUcNfQZqFJsL2c1B+pra+b0kS7d42x2S2HnhpHRuRJJADGQXRH 2tCZlXwZrDmKlZ5dhWkzUrUOOFnQ7ADmVr5UBNqUSDuOJetjtzDvCcdfSxqHxZSzpseA ryl/jJSTc+Kb1u5ix98/9cswBdMArZBXvTjVgxYMHrRuKiTb6zscAokHlB4Xxh5DruRO z9iV/q4KmIh/UWImRJHorEc5WriDauVWQ1E2OnX8K/xG4Jf3110W7+YgluUqXIY0OHGi DLFw== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; fh=3lxePQ8lC/6W4f2E62pbw9rU36jnfhYwF2zv17uKEhg=; b=sAImZIZ31QMVDLCiTV3/kMYhQQ1aWUrT59+ppjhXaVCQfIdulgYw23mDmUj7DpbA/b pYjM9iHnhEJucwYE0OUCNccg+SqlNlk9g5G3PfzWc3J6V0OaGx3A2WQD5sykj/fr9yY5 yZ78Y+BaqLC3n2msr+zgPV6tkilpFZWNEtzX7wPH73dKhIm/q7VdSDG4i2ZK8LMl2qE7 49yyqw4aqXcJYoJM94wkGl4k34iDwd5WOvvVm6UZzUZH6Mw14EUW+/XjpBLxTqPtHT4M 3p/glEIs0Zm9NV9XEjVIqgLsUEA8slTKSzSv/WQnrIFoSWipHZ3YTehrkO+mSFBmx22X QUDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NruAjOg3; 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 z18-20020a17090ad79200b00262e99964bdsi500432pju.99.2023.07.25.21.07.03; Tue, 25 Jul 2023 21:07:16 -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=NruAjOg3; 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 S231467AbjGZEB6 (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjGZEBG (ORCPT ); Wed, 26 Jul 2023 00:01:06 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A857268C; Tue, 25 Jul 2023 21:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fh7YWxdKOALah58bnDCmiZ2sCI0qE/25krITgbQQb4JAyj3GqXK8aPyU4nyEmLtnMTeCavsk3rANyBrQcsK0ZWx1I9IVyBz48owFCUA9x8G29QZfyzID5LaHg2AnCiuVGpSKj5go3k4rEwjPcYokxeAhpao+NmYNUkO8eTf/gofE7BQgzT9Z05d3nIwbojHxygbcn+jXIDkqcFSbB5ilgaSnfO3CRHderFZb+Zb9PGZ4W4LVl2DkTo2ANVIdJcaVlYWrgLQuWjcDGrZM4wYUkn0JfpHSAzowEu1+Ae4wDuL4c3679V+VjhQthGG272zYEUqk0CrZ3IR2bLTP+c1P1g== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=H4jErh3ybX48QhlrZGay7/tVz0PTb27F+7xled3A/i7z0trUt+foAGzgFRlAMtaK5dRWbRna+1KuisEphodWakE6edWCorXMrwaYWpXr2dBGa96jzmqpYo+ouLPreUF+Jj4xlpM+/DhZM+4m6I/pd2O6rZYID7LgJP+CLAtl0+uEUukdeOuFUF4CpK9Z/eRHBEcHz1q0s1VkZSLlPlMJqPo2o9/16QUaNqe5rHfgRKLCOA7vUohEnHVLNJ0ETi36HzhTPWRdkwrXAzKWo35RcpwAo9weufSTsHgRlgwOPg07OeyxQdevXxmyIeGMXHgHVgs7R9fdnA2o5xZXrjquWQ== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=NruAjOg31qMr1XZqENKd9LE5/XDm4XlRqoNJfmhdPRF1bnSwe5GJdzQM/Nc3Nf+L9LtrWG5B/xQIbEwjxr5eDNQ7CuXdz3X9At2qfUltF0zlhMxr2BfQily8YvminzhTDxyVPDBUYhJeI1qHIDEZzyo4P9NMwnx7If7IetvdFLWezCTXk1R2+Il4N3mFZ0RGAtmLmD+h5MBzGeIRVk7FJ0lyaVOS/ZgWm0diqX3AX7yHiIBkzT6jZmdvovrHylAbi/Sge+TznqDqalGuZv09ERqrqmzaL/MXWW3NGpsgE6TrjO8yP8TAi06p0OxqjTiMReFJY2fR0MvaGHjfsEeQSQ== 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:00 +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:00 +0000 From: Yangtao Li To: Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/61] mmc: bcm2835: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:42 +0800 Message-Id: <20230726040041.26267-2-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: 08d442b0-130c-4a34-4066-08db8d8cec08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R2ZWFXdJVmAefUSR8IGC57U5g3OJ3sfLkfxhxN4uMM4Ycdi8iAxNNCeuAK//v/U/jRvrXFUI6K509ELVKTXkiFLRFRF5IlrMsUaoQkRb0EVk7YFTntX65az5AaMrFUUPDQPDRhT4xqthid40olHSrPwkFEp3+XQMCvrsiDpH4i6OGBTv+BuIHRendPQYAx1YK1oJMOPq96OimaA6qCuHLMhrpW/ZY5LBu96CbkS3x4Hkz7GbMtNoZ85iI/kKNJm5zx6xb3CYGJB1+kiq/d/7j/SQJHGmb62biXrPSMFh3nZEiVke2hQZkla04msGuXlE/bvPo50HuplaU0OtrhQsSiIjXcaztQMqjw+wlTywyCXYWicm23/GRcDvfjoWVIf4aml0s+nVNbmfDVGwRuaqGBicFJbRJIqwmrdO86k5l3lMd5xphE6Gyym4u1Hb8I5S97rnuuBq7KLd8W7ExTUpVqCA9UI9YXgSA+cvGj7jWnFl0JgwBwGSW1gPpF7r4ub7WrxeuoP2tm0nYkOxHCZEBtDzgkQZE0Q7u1zbN5H1qtCw3feMz6zDVQFqVlSxYVCviSir9uJA34FkQQzjwc/T7Fdi+KAxdRGeG4bGFxhKyolNySPnIUmiTi8fkKcHNSnn 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?d5/4socpRjLIihxLzkLhVUsrk4jS?= =?utf-8?q?DvV1JzP/BejVD8b0AEGr5p97mFBRPKmHDC6Ae+RMgVQyLyyFPTayKn9Jr2VwLizf6?= =?utf-8?q?r2FM55MobwRyCUEVdFJjDVOK6rIFjdOf0KJXtp7sYwU74fycKsZcR+atwVAbvT0VO?= =?utf-8?q?wcg3OuB5Pu1/uHnfmjO/t60SOJ77NpLrzhh0vAMG+omWb5cgSui2vM98zPOuebmGb?= =?utf-8?q?miCHIfUO/TXrO2ZqIlqgBdGIz5bTjwn4cDscs97Y6rcJEZ4MiJz10W95kHZrwRAp8?= =?utf-8?q?2x2ESqmunF/Y9pYbrEYUaODZthSJQEZshhyqvvHHVt/qJ0Q9O8EAMGRPtVNSzQN2m?= =?utf-8?q?81KBkNetanyX3fMqlCC4n/tvfsPifTYGQe05c7G0eoKHhH/u3X3Ax/zI84PfHwjI0?= =?utf-8?q?JkCyQuIIkwLhEELESlpnrF0Xr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T38OCoaisnL8gho/AE3TDgxmanUpN6XzfVz6T?= =?utf-8?q?STG2y79+QfPpnISDFKfHeAHXJ+4hFxAFeIBjz+vguGgwN0JR2v1LWp35NmPwpEdQW?= =?utf-8?q?m464+7aCJIn8hmcMLVF1Ga+Dqp0ey3R7Vrdbm0q5SHrFGaWxTR2xpFEb31Fgaa0BU?= =?utf-8?q?N2MbNGC/Mv3p9s8VPf/65bpw3fuabphvQwrUYkHaY5QAFKhSr16YLi/mYBxlBYjx+?= =?utf-8?q?1pXPDYBlR4v2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08d442b0-130c-4a34-4066-08db8d8cec08 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:00:59.9743 (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: oKrN8aINOvnirejrfeB/CP03i+jJQVk/0hkfLGw67uh4vWaqfE4ZAg7ksyG6kAsfR6NmlOXisYKBlAzz2iHSlw== 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: 1772454607644990005 X-GMAIL-MSGID: 1772454607644990005 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 Reviewed-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index eea208856ce0..35d8fdea668b 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1431,7 +1431,7 @@ static int bcm2835_probe(struct platform_device *pdev) return ret; } -static int bcm2835_remove(struct platform_device *pdev) +static void bcm2835_remove(struct platform_device *pdev) { struct bcm2835_host *host = platform_get_drvdata(pdev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1449,8 +1449,6 @@ static int bcm2835_remove(struct platform_device *pdev) dma_release_channel(host->dma_chan_rxtx); mmc_free_host(mmc); - - return 0; } static const struct of_device_id bcm2835_match[] = { @@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_match); static struct platform_driver bcm2835_driver = { .probe = bcm2835_probe, - .remove = bcm2835_remove, + .remove_new = bcm2835_remove, .driver = { .name = "sdhost-bcm2835", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:43 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: 126061 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163561vqo; Tue, 25 Jul 2023 21:10:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGXNE5o7BV0bOrLpRZz3nBBQkArQrmuasPenkKHPwptH+3ijPTjgzg+H1gZK62JKdCXI/6d X-Received: by 2002:a17:907:2bc6:b0:991:c842:2ca2 with SMTP id gv6-20020a1709072bc600b00991c8422ca2mr642064ejc.15.1690344604266; Tue, 25 Jul 2023 21:10:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344604; cv=pass; d=google.com; s=arc-20160816; b=ZIrwU9HC1LeBeN6iA69HeMZQAlJi7TjOLbbm6ANguElXGFQ9gtBWsgJ5h1aKYj+EHN ALe50TIwczvGGFgw7iIkjXDwDdFvcndO12DdoXgLp3zw3S/JoBy8lHxMRC12DrsLA0tF H6Mfc9WQN3VBIfkUloe3jVNA3RSQfB7udYWHwFE72kY5JRHxoi96l5niBpYmPNSYaTx3 0+74Vqwy6JwcIvF+iOsz2ESVkMNHY/aKrLUrZV+ypWgTpIv2FMmXoQZIMAA/lv9mneBf JmfHAdLnArJWB1mzxVkfBV5KlP4R9mjMv3sGQ/jrcL+Qj04+VPfybhXdG4LFtuiVpUKx 1ngQ== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; fh=RRst69AylAmQjTenUg5G1MIx2YhIHWYClupGBxgNKIA=; b=E1HPphppus0K3IUl8WuTZhtz5lH2iAC5zpgVGLQlpa0rKfX0syd9KU3qgF9v4Is/VO DuLehR5f3i+ZmEgQYNrqawW7cSPlP9IFfL+ECmxZDxnlnCzzsr6A98RQfK3LS1UQBEFV d2+qDaq4/cG9guuf20REU5mKcxuIwWGOPZjAMEDmMFYJPvWW3CJ8tKU698B6D3VjMFnR ZI7hr0oPGxaxAygMw0Z3vSy4wKjjFwRgoBfd3PyQwdHWBWwwCh4VI67LBzhVo1OysSZ9 d0O94QCjtZ954BDEolRztHgYZAybVVd9Wqk8TEsrkFd3HxWj4Mm2tCjFQRSMW8thDKDE dZrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mNkz7HsB; 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 qo25-20020a170907213900b0099318060d50si8820433ejb.463.2023.07.25.21.09.40; Tue, 25 Jul 2023 21:10:04 -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=mNkz7HsB; 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 S231162AbjGZEBY (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjGZEBJ (ORCPT ); Wed, 26 Jul 2023 00:01:09 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14F0826A2; Tue, 25 Jul 2023 21:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AaNajTNzecTM8WTYp8Q7ggNgloBcHTyG93CzJYbVKfHZyHV0iWy1UXGufVKBuHskBofYmunKAVSM3W8F/W3saEBt+k6EGtx6XMgces26wq/gNc8Q8o1kqvn6tftETpvqij9BDaNxZ2q5k9I3ChwdQw61/7be+diJy8wMjJG7UH9CCC2pgNp01N5K5aFGukFPK9ybps+BQ26PgijhyMaipVwBeYE+GomeTH1FmVbLNHNLW8BmgHfWcs99cFw/SfFrqlyEU3ti5wt2nvfnLPlRvgx59AO3c4CvBjWt7+zMx0y1Vf8BkA9xJy3CqUpyD0cDMb7pN5/Q6jRjXw3caWwc8w== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=i6EFv+qwU+uuo7cmIoGIhTEjpgpCPQr+tmVfsoNlWgGSBpuOpAahKYP9ctr1btuhsdIj7rrE8fz1MstCmXf/DHdn+cigDdruYX3uHq3v7wOEDIG5dgz3Xcd5TgM+nNcxY244C3+AdsBpHMiZYbKF4hrvkDQSIYsa9RsmnRWpS9LMyjsmaSHSlE8gpr1a3qy5UOJZsPhJ56xUDRHETRC7ijaKJDdHE6EPakZFN9BIPBvRyJuz7rqNiGwR5I5Ltu/wEAnaceDC2CL7nBj8y52MRBXTURabETyx42Zsq00/wE/PzurFYESEbmoH1cwOsPLiEC6p3LTR0eiMGQnf+X/CkA== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=mNkz7HsB50waEWLYCCDZ4lHK8KC7EAdImAclZdANxM8hB0X5BzCAoyVc5xo4GxQjhVLrKoudulEjhNHGXjXJqnDHOrw2Then9ylWvvKXemaMuwIZpxdRJcu6Z4FqnQPQACMAKy/ZbPaCJzurG1cvoNX5Kwi7SQJb+HMmc8YBXdX4NyBOSJcch6N+iU0O67Zljn+XJkfy4BlLUTjeBSmIfOTu8GtaMw3f0YZ3w7m515ABmSa8qiGBB0PsJm6rEwpXY2zLmIl3E4FFJAH1/zdDSP2crt13j+HDhhNenr7ccLv/pvpGOoGNvzFrPLglMJsIAVRw8fREos96kIVADqj3cw== 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:01 +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:01 +0000 From: Yangtao Li To: Paul Cercueil , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/61] mmc: jz4740: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:43 +0800 Message-Id: <20230726040041.26267-3-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: 4d78ad3c-d4ea-4000-6519-08db8d8cecfb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5ZVTXxhx6zdIjFiFtEu92/9J36py0b4YQqFP15JBJkV47lsW7L8ga+LnEMzZleMFwcflg87XO5CM/sgR33pqTneasAkKq+qfA7cxZVqGWBG0qqY5z6YK8xHlT2Usf/5tI3o81Mn5S5t3OnI9gLN63fu1ycHuiV2I9SD9qiRwklkZmBwLHxsEPIZD+Z+huuE0xVnPnxS5VZgigEzH7lW7sj25C/RlOQvsUlmpaCMdi2E9+WQJUZ7moEiUq5Q64iejpW435MqgpIgpAnHz1qu02E8hIzIwHRqxCbh4Sz51YIX87Phf6ZyT2s4kXjPVAghEPJUyHftePbQ/N3VRXa4sH60nONpbDKlx+U4rQw/FtCJG96O/AliMfjy/UXcvAOVw6EfvIwB9T5lRDoSz6t5iHeB2GS1sGxBfse3aipOd8QkBr8Itqyn6iVCoV52koSePjJMDs4jm02zPL1Ti7V/uVKds9fq2AHURxHmhlMQiX6n0XS1fPSTOXm4xpmVdY1M0C6Mhiafa+qnDC6MoLcDN+bMSrNcmr2wGKey9Q0ScfcY1vPYPniVXaqMsMMRcUnhe6KDpFt9TG+frqaK7QgwUzqkk6H6RNQMYn0o25/ZN3PmcPUEJ7WY+4b1YOR/IBJsp 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?adAwsSCPcWrH/jU/8sXMYrLCoidh?= =?utf-8?q?dmbshNXH1/u+k97nvb5o7M60O7HBbkGXVKo8uavzrKbx5sr2GfXzmEMbV+nBEPw3e?= =?utf-8?q?Vmye7goqEnbhxURy56S0CUqa+of/bN/ox3/vOL0WyPkbjU+odAJ0ltaNBZP44BcEV?= =?utf-8?q?aPY+jGq+vF44wO3meGLoc9/iL08EEdUEhZp/M3aS0JlzFn9FhnFww64ZI0Y9krwY6?= =?utf-8?q?d0JPYaZHgyv+VGxzK1JG3D8Z1T3xCbjzgg1A7GYptH03c2SOPfjazwgh47U3GeyK2?= =?utf-8?q?Jm0c0mP8aKjzHs0lO13h8YFN7CJj1hTr2O05bhXvXQzkQXnB7AFxFToMRaCpXvFsM?= =?utf-8?q?lmokkA9//cSZzeTRZjsCvcfRu7JJRKTrzUeECdd/rQyZuHW3qvpBMzYE5gVe2imGP?= =?utf-8?q?75JNUGH3CU2jbkFb9Hnw4OLy13sbC8JVpTzMf1lRxmAjKg5eCynmHOH5E65DZUeYF?= =?utf-8?q?opR+GH8jW1oei5PNw1j8o49ZjRerXtExb4/DXqInWBGLCEzJ9USzn+pRv+wlAAcaE?= =?utf-8?q?ZstOgka5MKUXCB1hL1uedltGE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4WyC84suO1wV8KWFfAxNGFA2zamvo8cEdT?= =?utf-8?q?C+NiXmkKZRHsFhPmBFZklRoXEkMSSy/y6JX8Ws4kpmAOT8FJWKchvnEZSjRqZyuik?= =?utf-8?q?SqZdc+K7hBmv?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d78ad3c-d4ea-4000-6519-08db8d8cecfb 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:01.8636 (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: xV1hMIxwM2JrRqMZX7jHCoUPI1mAed3nTcgQqQPk8zKre7scsyFmTKCY4Z+e+uzugRjVzHcL2smdTUkxmVIAQA== 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: 1772454783672438096 X-GMAIL-MSGID: 1772454783672438096 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 Reviewed-by: Paul Cercueil --- drivers/mmc/host/jz4740_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 1846a05210e3..f379ce5b582d 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -1163,7 +1163,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev) return ret; } -static int jz4740_mmc_remove(struct platform_device *pdev) +static void jz4740_mmc_remove(struct platform_device *pdev) { struct jz4740_mmc_host *host = platform_get_drvdata(pdev); @@ -1179,8 +1179,6 @@ static int jz4740_mmc_remove(struct platform_device *pdev) jz4740_mmc_release_dma_channels(host); mmc_free_host(host->mmc); - - return 0; } static int jz4740_mmc_suspend(struct device *dev) @@ -1198,7 +1196,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend, static struct platform_driver jz4740_mmc_driver = { .probe = jz4740_mmc_probe, - .remove = jz4740_mmc_remove, + .remove_new = jz4740_mmc_remove, .driver = { .name = "jz4740-mmc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:44 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: 126059 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163271vqo; Tue, 25 Jul 2023 21:09:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGKjK0L/cVFzGM2YbB+0y/t4hRxRKRAtlFY/PK1C/nXm2qeOeUMSz2kg+bp6pazQ9JErF0s X-Received: by 2002:a05:6402:34c9:b0:522:3ae0:aeb8 with SMTP id w9-20020a05640234c900b005223ae0aeb8mr5136205edc.18.1690344554990; Tue, 25 Jul 2023 21:09:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344554; cv=pass; d=google.com; s=arc-20160816; b=C7vKroomjaKURKsu5dwY2TNtQ37SxEbc+DM0AGeZ/Mqqiu/9FxNRMHi8KMK/PCpJIN UyGdVE9LV7Ua8mM/PyVSTQkvt/scPUp2fiZ+iQlsorXHzgaB12bBBSiEZqcsIhY4Z4HN /68Y2cvkfrOGUnzeaIY2F73lNP1SpxjH9BISRvXVBQ3nn8wlbKx4m/cAVkoGNHJu5Qgj KBQd7FxvyrFTqnKTPAaBXTLLRN0w9GAHEeHtUdTLzzs/QtIYj4rIj37D/bR7nkSaWtcs 5VAvWD4JfSdDNiwOH7lOYIPvJwhy159aZN7ztHByImWHw2mZ3h9eSbLG2rjisbhTbrZJ ZYqg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; fh=knVXWtuCx6XZGhgGSUU7JJPQq3c9JBqKNP/6OINxeGI=; b=LML1ngHZR6UH62/qikHTq+P020Y24zxMFjm+Pexlrh678LhPIJiiH9w+BuecPDwWCX +IJDeuyfZsN+YZIf2AkuaYfk5eD9pjZzqCNox9edmOteiEsft4F9PtR4MGei8WGTTSj8 lyPiObJP+yr38fWlzVZDwyD64/hxOEXVaXvXiJJO9eqizgtfrOgaIpGGR7xVSl5nA3sg t6cXLLTcUUzwzmtNS1dVTQG3yP7q2xxrhymqoY6R5zdOPJOMuh8Gvc/KUmaIcqSCogJb ssPc8D94QOMIO9o7ijDO6bg2l/sM0/vzhhOG9FwE8Yy6gRs7skY47Jsk8mtBloFTnUi+ YFtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PmsyaZ7J; 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 i26-20020aa7c9da000000b0051e27ecdd08si8902709edt.114.2023.07.25.21.08.50; Tue, 25 Jul 2023 21:09:14 -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=PmsyaZ7J; 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 S231370AbjGZEBb (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjGZEBK (ORCPT ); Wed, 26 Jul 2023 00:01:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A1FC26A5; Tue, 25 Jul 2023 21:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GMep3FonivACgSzPK+gHB4L4PwO4bp7pZIEgfg/sfcDlBCSY8y3RMtFxbDyPxhv7gs+nElSwJfcoSGyzVC44GnDVvs1dRkwO8bVjPxFW3BHuRR1Ogzw746sOdrj8YPjQivGO6OZ4TkmHD7GUdx1vHBUUHSUBjiYi6twZxM8ivkjBRHQNHpNKTfmeS7oWYSBTJK6/CwqOpD2/CIB20mzE+GRXr1xl95KIHm4tdpCkKiNO4lwuXorLmpPlb/JQFhwCyuoW3Wn/eJLjG0QEqfgUzPsaxfqZ/CG7yaqjUhXJx8BYRUUSZOGGffJLOMdQhD/pwtDC4pzsv/aSOqQ/QChbMg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=Z+/+gdUtFxIL/0DUNMrFmH/oZLMxWX6V4m6hN5On+3YHxI0meneUh25gS03iVd+ErjUSswQR4TRkeM0k74FNm90UWtpscN5TATIOUcm9tRVSsCVrJR9E7ZghLx/4AoLSW9dxnjzy5Tx/4nQ1maWbDaKqj5fbHn/Ox3Ea/GZiTLgm7p+OzF7WdDfBLrISS4uGAF9lYQ2HP5py81c7PZ4eEQnbWWcs4+GLjF4JnnTToUxiVmvpVfGoNwjzvpjYRyP8zDYsbzcvt/O/P1stmOtrfngln/48o2PdiesufXORPLKY4aTwVXsJMS8I9wOoNSe56eh5xyFJtnxKf9nLfGt6jw== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=PmsyaZ7JH27nwgeQuzanaD3MbWTI/Ej//oc18UB+/BkefVCHHkZbHxtL1UaIvJVlYp2pT/Tmb+a60fj+zzeaepeGuRyBlV4D3KmL1ZwPi7gQWkuorYDf9VWdfxvmYY3FUhAZUCL2kX98uM4YizhrYN3ICUU9had4FCfWFOBtUlpDJTGPnKInX+4Lovxeda7l1J2ztidFgOihdh60HQFzKVqQKdXoR07/wG2+Xoy2HIdEXU+4NNi/SFObCJ/ScFRUXVk7hTHmN5L1i2ZWrcacpyCZ+USztqv5WHKAumjT3QbwORll1zO+4byPWroQUmCxFPJupDMF0Ntgd7VgpED5EA== 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:04 +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:04 +0000 From: Yangtao Li To: Ulf Hansson , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/61] mmc: litex_mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:44 +0800 Message-Id: <20230726040041.26267-4-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: 8790577c-d439-41fb-1f0b-08db8d8cee49 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ffd3mD2VrfUdkopFRFpkxDyruaSNi1SrEfvteXGEKFwjJaFDL6wfKLIuiZNzkn41AcOQxOxFznk7UEIUmiMwQ5cCAio0I1ZDCr5acLxgBxH+GhdP1Qfulf0TWaAowJz8lwubTTBsSzGdKixS5OIJI0rTMF2Hw5l/KQJhOevy/tHwXE8ZkVS7Mnfrwy9jdKmjFU31aAdViPj4mx6ARG/6XDnO/Hr3EvnRnxjCMPvLk0yFOkn3xjmawgNO0GXwIcI2yGQx1lVJoNT3127mGHqjW5H2eIS8OKVbaW7MfZ6H9Z4HqLhhQeMCPLfFewGUf+t/NlCqq6gQRPWjo6/aFuzdblQJFVaOlmQe1Y/k1VJZCORSdie/mkonjstBmXNR+ZpYGHSanyZIlvvaLs1Gb/jcPmUE8TCXREacl3izx89Vkp7k5Au7amnEBWifooKGd4a9kOJN212eygidB41Uiv/DxCIYyP4CkLpt7V0/mtXf9YzxzMurs3kOYn9jwUsQG/JkTMP4JUk+qNHBUtTgDclOXCwdXQEVENZpk5RUztVkVGFttj2n7wdiOkIT5vuOlSnKEsnHhoMKdeV4NttwjdDGUuS5Q49EoQjUG2ajCaHs9KXsOSeLZbVkUG+6zlAXLN2l 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?xC/t9Kk+3VRHRaTMyJQjuoim1erV?= =?utf-8?q?VwsnNKuAThdaeGUkT5eISLKQZJSaCkES6z6vdjkivd5pUYCCUwX1CFi8sGIH6NqeI?= =?utf-8?q?EispTNnAeGY+ekdaGBKQoydsnX6Gi1GmGSi9AsOMR8IDGPFq+Oq3UPG2pyAKdnudZ?= =?utf-8?q?DVS4tl8R5iHe/aLr5FnQV/bqZaqV2JUN1abDMZvBWBWiTvhfzu5pj4IYgHVnv4Jbp?= =?utf-8?q?xnYuCYgzqPyOyapesAU5HYqcUVCygpdqqWOxNveO+Wr+h2J4X5SgTz5Xlz1gpNdsf?= =?utf-8?q?WxKBlzIWYIOqQwevYbmdzrRDnXWeWGFUbBzTI/mp3+NHOV3e5SfCO3y0GJvCMg23r?= =?utf-8?q?RccUV4mVTPpmABqWQcb7qM6JAUaMZifodE92geNmUziv7wKyZCZZWlgUT8T4hbieo?= =?utf-8?q?ulJCkXnOoPbGgol5EdeJ2ufSq+pGn952hx8fYwWYH01M4//y6lio13ZtsRDoNW9IG?= =?utf-8?q?yaL6VJ6q8J6LovZoOskwiGkd/J4ZJYYsAJMlPxa9Fy6njd4c3MqtzAXUDBRZC7H0M?= =?utf-8?q?Db6vL/CiTVYMvuFZBUdQIP5Uur/PDUcLljuiqpQM0oevMpDEPncwxfBejNYazZb38?= =?utf-8?q?/ZM154r1KarsBny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ZAjXVhVkYIXwzkWlDmUE4F/PtEWvCZZVfsiE5M4Bg5CVSgAEzV00fa?= =?utf-8?q?QVmTEWgLsmrA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8790577c-d439-41fb-1f0b-08db8d8cee49 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:04.3134 (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: BQwbqI8mJQsWFR/fXQ/enZJDZSTKqJ8204YniEcowyJjVrASTPlH2Vi3OgVYVn4sC9ko+qzSTZUNcOrEEkBoFw== 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: 1772454731666874828 X-GMAIL-MSGID: 1772454731666874828 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/litex_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c index 9af6b0902efe..4ec8072dc60b 100644 --- a/drivers/mmc/host/litex_mmc.c +++ b/drivers/mmc/host/litex_mmc.c @@ -629,12 +629,11 @@ static int litex_mmc_probe(struct platform_device *pdev) return 0; } -static int litex_mmc_remove(struct platform_device *pdev) +static void litex_mmc_remove(struct platform_device *pdev) { struct litex_mmc_host *host = platform_get_drvdata(pdev); mmc_remove_host(host->mmc); - return 0; } static const struct of_device_id litex_match[] = { @@ -645,7 +644,7 @@ MODULE_DEVICE_TABLE(of, litex_match); static struct platform_driver litex_mmc_driver = { .probe = litex_mmc_probe, - .remove = litex_mmc_remove, + .remove_new = litex_mmc_remove, .driver = { .name = "litex-mmc", .of_match_table = litex_match, From patchwork Wed Jul 26 03:59:45 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: 126050 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp161139vqo; Tue, 25 Jul 2023 21:02:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGeFllc3mRAI4WEKYvrmSV2rhpJ47QTbg7IUt1VopZpHLzFYvUL4K/qvdsGOaT/jzihavzH X-Received: by 2002:a05:6870:d60c:b0:19f:4dc2:428e with SMTP id a12-20020a056870d60c00b0019f4dc2428emr1222385oaq.14.1690344173910; Tue, 25 Jul 2023 21:02:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344173; cv=pass; d=google.com; s=arc-20160816; b=oU4k4sS01rMWqOqjCOlplztG0f9dcpPY4l7y7Nkl5OPQtvOx4xuFDaR/InQ4ry4Z4V FAMNWzLZmGWs+mwUjx23atwCeGZYJQ5wFVN04wtjgYIkurcLuYjf8732tNfv6JpMW6qS YxNHC8nCQTKVMQA/pKVxIYe3uA1ysR6lmwn1rt95AMzfAFN8mPD4inM6xteeOwRtxVll FJYmOtvH04GbeK9PCO7m3/4qehKcP3smQBaRzhflp7fnbU+q9EBzly/5YQsk6luTxAgI xzMqOXPy/BuJpvC9WKPsomM0bUpZbgRPqbs5Q2SWeqrpENK5ptbGVH1Z2eO0AFod1OtJ kKPw== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; fh=CYjPLkToiURQRXIzKWym/VgPpx/3DQOiB4nlUMd4//U=; b=gM0wBhKKgr//WyZ3bQzfmfbHJ0lwYc4vKb85wLfrt9A1wSstgRo0gH2HPZP0aPuYRC y/7Ay3D3YeZvRByMIqpASfB8+yj9ETDKbYQwzCJLsldFV53LNbEbtLrhjYzrjJbrkEcu 4p8uKsLzHbnKFq969BbLRdQJnFr3JhK4LnqqokH455U/XEBfxGodiduWOxWiAI/aTY+R uXexMaAViYeRrStPgHNiilgWGoaw0RQXDJWsdJHzc/Alb3bb5Bza8F3MOlpYE9D5iuab u05sBcDk3t1seelNb9+/tD9njzgwmgtdqqYAO+Iv9njPlh+YCiz/hYeSf2d993C6AHPf vgiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="pQB+MZ/h"; 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 k7-20020a635607000000b00563de9d4ed4si833705pgb.828.2023.07.25.21.02.39; Tue, 25 Jul 2023 21:02:53 -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="pQB+MZ/h"; 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 S231405AbjGZEBf (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjGZEBM (ORCPT ); Wed, 26 Jul 2023 00:01:12 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E8C26A6; Tue, 25 Jul 2023 21:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CIZNJ2dmw1kuwuXxsa/wsxWmteNuj1oA435azdHPwkdUp46zcf4YeXosHmwNmCtIVW69UEjEr6sU05q+rkGJLQNagyha53EmWxUNh5H4ASvDLonhDrknfbXQ/cMAq3YLeEyNboe7bqMjPgtetHjJ0tDFXsF6MfdGjxFTyg5QMtAOsGWri2M1PIsrxRfSHND5KzIE8QnjXwW6mltyVwQ5naUgm/s5d9uVUQJRMZofiQODjWPQ3O0VDc+nenO5Op3r9wNb1VrZE5JxWqBzUo4ceofJbGHVx9XV4ltFzarD+1jUmZ9gOZeGrKdeq2+N1bkn9g+SQFHZdIfDLj/8C0J1DQ== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=A0Str+HIRj1Ju405oRMRbeE/fFh5eHZ0Cc9CoKw6FXr9rvBm+DlQLtgdbN0kV6H7QaD47xOlxpIVA+yHqUoQAmWIpbnx2awt1976r2Yw5HKCocMMdfJwN5akhVeHnk14DO0I+0oFxkfaesp9BPi3DSpmxb4jTfKdcI1ong63VnH9lNJvdvXg9cFiuvt4k7uhdH67kltO51zBr0uI2ndnEN+fOwlpfHFlrEIwTrUWrpomh0YHT93t9D4XJNYG1hljUUkBVoclbTkJnluwiNA0ckV3Bsyb0hiZlLUFXMqpJ5wUtR1sy4szawl0ILU5YmrXGQg/genEiKEHQqDs4oODew== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=pQB+MZ/hUNndkc0XceidJ8s5uhNTr7KbDSYxvS/iUlwtLqwQoU61F7vIxKOaJ7WyIahZSIIsFYBza0vuffcadysU/VhLDxJ4uZ1l+zYzrvU+Q7Pv3hff6e7EU804KGhSUFCi3y+GIx8XbaihBkrMFzTkuojHbvdZnBqy3TZ9yYYBrQUe4cyXEJTcN/C4gzRMOdVnzAwmbOxeWjcJomFV8iyPmpMpN5iou73IFqsxakX4PggpBQb8OubEy+EFLV3uxEULvYaeRexGpdWOrjbuZWPNzxVUZ+x51qUuPYivI8W/RNTOCs/m5u7JZbJMOWGenZLHuFmj7em7N9U008S45Q== 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:06 +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:06 +0000 From: Yangtao Li To: Chaotian Jing , Ulf Hansson , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 05/61] mmc: mtk-sd: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:45 +0800 Message-Id: <20230726040041.26267-5-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: 1d643e5c-2e1d-401c-85a2-08db8d8cefc6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HaOqApf+ukmv648gwx0JxCMO0Yh/BL5daVNCa3kOr/LUviSCceKs+V86zPSkOvbs5XHtEWnnO7lOoIQjmjUJtZorF20BngoE96i2qdfUZhIFx8mdwOAPQU4mClRRuC1kpGuedg14oLlcSkOu9Vm0njuodtcsg7RaMQ1pUg5rJTT5epcBDi9OIvZ1cjBdWoh/ZTV4LiNcgL1M88Eai8F8YZbKJeGumtxIDeMFuhh9OF7A9Z69YcrmFRKLJdJknpiVc129Yg0aSgQl7Fe3xNN8nndr6GDpFSaKf6dGfNG5JLD6UAtvn0X2KIjWnETh3PegQAdtwU3OSB1tzZ7euOzGdq/1TgUYXK74ki5ZPYQ6ptzW6e6xzc6uFKTgGIzDgRhwxje0tNYC2lGIK6cmOIByYF/z4tw9B9YRNkF5GWN7T4M/hpMN/Q27K3DL0nDvMuVbuNddtpeikS48RVukB8J0oZkt69qEmPC/5bG6/K6oavi4R6XprR3GQHovOWjOmiExAvpi1D3XBea7Lawkb/hxilt1dfyxK90uv+o19KRaElkRpwoyFQTCT/WPd+a1O14CeJjiFHE5ePWjCU3sb1zAckqlkkZHK7WlvZjO8RUUUtOojHQeGeZpSX+j8KaNbSPC 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005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025j8?= =?utf-8?q?0g8MMnR1y9MsBO+IuqH6LRpIDuG0Nc9CeX1MaAKPz+Vq7Nkl0I/Mp1PiQ99THz6N9?= =?utf-8?q?2PqvP2EO1O3D1vJH2acs7hVwBI+3S52EkMt/IyubE4NhsWUShAup1iyMmIkXI+H5M?= =?utf-8?q?7B0HK9Wrw8fOk+JC+coTR/D9jgmGvpdsk2AnzT/MO3IBCQt0kBPTudaCgXLjwijnw?= =?utf-8?q?8DQ9/UaxOe/W8F3kuBUY3DzrU4NmLjpHhHzNB1+mYsoVcDVgcitj3RbnGkzLlZnw0?= =?utf-8?q?5+RwzJP09plV8HY9hCW2fJGe7SjgI+lswClYA5pcES9Fcsuvb4wRWZhG6TCkzaf1s?= =?utf-8?q?Wg99SEqycW8KJ/89NN0S7DTDBl5mavK+GI5ptGYwxEhlKi3BiIHLtI694S3QfJvij?= =?utf-8?q?UgJy2rL880OemjLXUxXAh0rsyngMoTeUMg/nd0MwDrVCq1r7QduWc/kcDO5pD0bjM?= =?utf-8?q?9sBaDDC0NWCWp2t8jZXz57m+hSG1m4zgW+NMztCv4ing3bbQH1TOVAgGXSdF8/ooX?= =?utf-8?q?s3ba6RT1hMGSDJCevYl1Y8yuHIaQqqi5n6voUf7jEX+v3fQzjRcO1PVYtpyIse7Lc?= =?utf-8?q?77AKHNp3+9yckQYc8KwyhWEdUwvMokdKW1CshDJ/vvbexPIHfPXjtiMyy2sSR9q2Q?= =?utf-8?q?XrKhCRaOXXoNcDOEnYa6g/Ds+AbzgylsYZMQ+rVwbYkB3cq1QKEvxkVn2W0Ld6zOu?= =?utf-8?q?qxAJUXoX3alghOhwBqNByCVMSD9FT9vXyfRlsRPIAijr2Kh3m1Cpn2e1RW3gEOmgM?= =?utf-8?q?YngDMw8GEB/6?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d643e5c-2e1d-401c-85a2-08db8d8cefc6 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:06.1981 (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: fBKvOtL1ahBw1U8E2FSAEu4ZeyAnIikVrqxYA6VSG2+YPWbzb8TuKLq4foqcTY2jn4uDOJaO1EB/3oQOEyYJFw== 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: 1772454332298065116 X-GMAIL-MSGID: 1772454332298065116 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 Reviewed-by: AngeloGioacchino Del Regno --- drivers/mmc/host/mtk-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 02403ff99e0d..9e2debd1edbe 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2887,7 +2887,7 @@ static int msdc_drv_probe(struct platform_device *pdev) return ret; } -static int msdc_drv_remove(struct platform_device *pdev) +static void msdc_drv_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct msdc_host *host; @@ -2911,8 +2911,6 @@ static int msdc_drv_remove(struct platform_device *pdev) host->dma.bd, host->dma.bd_addr); mmc_free_host(mmc); - - return 0; } static void msdc_save_reg(struct msdc_host *host) @@ -3054,7 +3052,7 @@ static const struct dev_pm_ops msdc_dev_pm_ops = { static struct platform_driver mt_msdc_driver = { .probe = msdc_drv_probe, - .remove = msdc_drv_remove, + .remove_new = msdc_drv_remove, .driver = { .name = "mtk-msdc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:46 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: 126124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp209007vqo; Tue, 25 Jul 2023 23:27:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvOoJm3InXaORxdozYCqRcmv4hsicv+qiGE541+M8JPczl4bszzKxV8fDRy7yIcAjenXP7 X-Received: by 2002:a17:906:3156:b0:992:a836:a194 with SMTP id e22-20020a170906315600b00992a836a194mr983147eje.59.1690352868874; Tue, 25 Jul 2023 23:27:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690352868; cv=pass; d=google.com; s=arc-20160816; b=j9vwH0FJaZmVSEl+sh4WoOCpxJ15Vbadz6884AsuMlVx39qap47rH7pktye5XJsjCr HGOYxJSWGdK2+bts/evp6z2xhE04FS19EUyxJJe15XV2NqbJbdBLMaQ5QsmKSaLi2/+O xx8C2cWkgUHacdRpfQMz8puA0pQ7NxaE9SZkUWjFwqUA1xHr6P8RQi8Ji+EfMoKPI1iD GFHHyjT6LKY+rj01BoM2Wo8s0DdChN4xMjQY0Ae7/jA0FVJ+8xzWZuk8ew1NeSn1j1OS rd3eTU9Uc1gJBGAQ8VqxYR4UE+Y/blNEW/dHBYyrMVIMOGgfJL9lWZd51xHA89L6ePl5 v4mQ== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; fh=E03QyiWENBCRDAuP5hv9oopN2sdsL+hYvdCq53xM60g=; b=bt/Fq+J0osUEcbEz+SfEjByz3rz48dgRRcWgS96/16gXYxvz+hsmH7FrJd8eIpCzyd +tWVvf0VhA+VAIo8z8A0GUuFgawyhkmedfZX9FQPBleM+ma4P1/BPvMks3yM8k8vSn8k ljRD8EsFR0fFcwy0jvaf4pK2gy3UPJQjiHo2ksD7TC7GVSMbevEmxNaxp2nTkhbAa3jd hbGfIFk/O3OCN/bvwus9hYFdJYYNiGHe6oTYv9/zenFZ2oLMVT+rZ4LGHlfh2pIo+OJv eCIRrmUpubNSFTlVMJKPErKs89Nz6n3ggllC/h/A31c9T0Pdw9KlAD8G0/4HgO2JBhsX RnxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QhMbmKRD; 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 m16-20020a170906259000b0099367350a83si8719850ejb.898.2023.07.25.23.27.25; Tue, 25 Jul 2023 23:27:48 -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=QhMbmKRD; 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 S231421AbjGZEBk (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjGZEBN (ORCPT ); Wed, 26 Jul 2023 00:01:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B799C26AE; Tue, 25 Jul 2023 21:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6Fj2eaCRx8IYRQ1S2pTdSEL5ARbT8T1qV6G9GIOxcxQZ1AVN3bFvaJM+8ykxobvEMor/GThm0vaiJaTL3ziXTNuv+TfPt48P690gqdFnASRotCTfIjUwplw4RNG89TeEPAZyT+Ep39TYGLWMulXFA1oLv25vGZl1Sqzfk2MVqR/u4zBoUM31BxVXaR7uS1RkVYPwKLULdkSdv/mquxlmtxJj3UPUsj/L6c4SqIPoKIPqg0+ed+UaE61BM4GC8b469ipG1k5xe7GVVMTcz6W2ZjCvYnFE9lp90SxWqip2ZbYvt2sOCxskfVIZw0W3B9xk8MM9+5kaVH8o1KbdsorMA== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=Fd9oFGRnnzLi+AlbLo8y1jFKTXmyoDmbwne7NVmEz3v6sybuCYSUw+StAXyHlB4gS87NDL7QCIPiKQ0H6RmmIDDeo6xbpi3LBLhixwpkRsTf+h2DCGgX7YTo0r+m7g3qnVRu7ZBeD3O790fRjtWfXZ4qNXkRj6d0mJKcayCJ1+fp6pb5wg+/sTkvg1VBI8/PWM1p2TKQL7UfFxMWZLwAW4k/p0BCUQ0jVE7M1hUZ30ARObhz48FhpNzzM8lUk4drohzLw4EeWMnVr2GU1JS/f3eWbUwdAy0NMtgIjinzSgzrLXYEiZM1TT8u6NjU0lfNgcCZJyiUoosuHKpDzGhHRA== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=QhMbmKRDdXg/OOQl6guPZoP+oZy9Zw7wimdcwfz21ME/zvYegLzLrQhJNP6GJzaZ7rleJE+mFuv6MCJxLHKP6Y7WWrZ5L5lBburryLpFkYtuU6H+V3M8PDYO0FsCi2LEAmNuJ+oh1IudwNcPhSLhltIRN22J14ZJpudo1M5I82BK/YNokH0x/LjvltoDdjuEiSzt/AAKrBM9SaUNoDa4jg20N0xfdthwrBwtXDhZKh3+fgJqk/tVTZhjrvofKOXa5I/zRc1wptjMt+M97pKLJ8xsXOXLWMy0msojDyS1j0XVe2on5F+0ykUynkkJPkYJO0o+M5ihzVtXTI2kEM287Q== 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:07 +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:07 +0000 From: Yangtao Li To: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , 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 06/61] mmc: cb710: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:46 +0800 Message-Id: <20230726040041.26267-6-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: e7f4c318-dcda-4de4-0f5f-08db8d8cf09d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wLQCY1k12dIcrpD6mDGr2zwjvt7VUyMsPucb03BhjehQmdPbveh5ZKpCqCOwK45KjPkYtOTNL62MJHnFoMS/6Gxhbft4YlxR+KUtLtG0YRBgJhMQdm4TiU+vNR1sAY5bVN4GhfxDkU7iqQ1eX6aH5hz1qaysLCtxcgCcEmPfZpMCJXLofLsclJunctrEVkMU7Bbdd46C/tm0vnwwYEBKpMe30BCchBcSJpmt2lBghH5MVwaJ8GlaNq0ZBfHloHydOGBcLJ6pNLM/cmdod990TieIXHYTMVs8MA9hPQtdfi/c4sLHniDSquqIraTkQ/zYH0bm0GVfc0aCm0DHEi/9/OgUSJ5CRd742k2X9necMSEInaqypfGD03PKVy4aq4YgHQQehgTX7nOsxu6soj3GuTCLlv3Mo+IQ9cJnewiRvRbrIynvg2uUxytI1orKvjvbFVnj+wr7SNJpRPHH8l9Bi2i5zZhSS2verJh9YtgR0CXh7pu40vXUZUWwc1MbWd25mzDA58aZUHHPhIv6QpnplQjaBcN0q9FuZfs1YQHQUD6jMURD4/Mzdtcq2P4Fj9gMU75ujF+2oeys3DlCeIfZ+W1bOaU1yO2xxNh6l0cVUtM74Ndv5vrlbzRg8yNFMuzs 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?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dowG7cCrW5RjMLrhbbZRmXj3PPf1z/?= =?utf-8?q?IW9Wy7dco8eZ7gcCB1QV1SkfLzH6CwavvAiqO753sgB3bGK5UadYxvzthS3rgZ1mF?= =?utf-8?q?290vYPkyw5xCgHq83YOsGiY+pbHEkndvjvx13ewwUozvwdAusCZkNsc9NLWGCwn2n?= =?utf-8?q?Z2YgwA8btadOQR8PMWhdY5bN8aq4I5q37qdThBbnDqqHx830HwH+WlWWrIghBn5fh?= =?utf-8?q?SLApS0GjiqdfcwOMFvohVJu2mhGoJAV2K4hMxqYEDG3bH88b2d5/iZztDvGyPwR04?= =?utf-8?q?rWBPfMMxNCH75dRllHkdrYMUaRWhkVivzfuBVlFPOJadyVQhqM6yxURHIydUiX4/X?= =?utf-8?q?00i3w2cWgjfFiwG++aJh/HC8Ojr7BSnLo+DTyCSOW4+XeGsl7WznfyopLea4CGHTH?= =?utf-8?q?tGIUaGtSjdik+Ord+eBsPBB7MO3txy3OGx4MJcRk4/yLwff0x/lqUJ8R2GZODaNoB?= =?utf-8?q?wqyOGb16PnBLTjG3Vay8fVzOlbK6C46qX5rQ2GRXDQ1zpnUtRa7ZH5xrD35uBKFie?= =?utf-8?q?gR2NekZeNEU6L5KU5LdK7gPuFPY5n7bz6lsDFaoxzhrnSMI/NG08h3lAR5HT5rYYj?= =?utf-8?q?ePnqN1R/fKq9vsmWf8YrVOLQmsCkHSxNW2Ok6F4UIiavUfYrjvUKig8piFjIId4qs?= =?utf-8?q?/Hi8MbOhQ+TP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7f4c318-dcda-4de4-0f5f-08db8d8cf09d 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:07.5966 (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: XUcIEx4xz10cX0FJjvBbUcd0h+GklEfN9Pqbhpnxak2irWl4W/01ec+sgjNeUdCo3fsubaw3Jsh2YZlmcbyhOA== 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: 1772463449718684752 X-GMAIL-MSGID: 1772463449718684752 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 Acked-by: Michał Mirosław --- drivers/mmc/host/cb710-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 6d623b2681c3..0aec33b88bef 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -745,7 +745,7 @@ static int cb710_mmc_init(struct platform_device *pdev) return err; } -static int cb710_mmc_exit(struct platform_device *pdev) +static void cb710_mmc_exit(struct platform_device *pdev) { struct cb710_slot *slot = cb710_pdev_to_slot(pdev); struct mmc_host *mmc = cb710_slot_to_mmc(slot); @@ -766,13 +766,12 @@ static int cb710_mmc_exit(struct platform_device *pdev) tasklet_kill(&reader->finish_req_tasklet); mmc_free_host(mmc); - return 0; } static struct platform_driver cb710_mmc_driver = { .driver.name = "cb710-mmc", .probe = cb710_mmc_init, - .remove = cb710_mmc_exit, + .remove_new = cb710_mmc_exit, #ifdef CONFIG_PM .suspend = cb710_mmc_suspend, .resume = cb710_mmc_resume, From patchwork Wed Jul 26 03:59:47 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: 126055 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162554vqo; Tue, 25 Jul 2023 21:07:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlELvLm/WMpM0bHmAXZm7EGji0oXek3HPpAc+D3garricn2mQfTo/LVzx9E72c4zGJ8BruhX X-Received: by 2002:a17:907:5c3:b0:98e:1729:aeee with SMTP id wg3-20020a17090705c300b0098e1729aeeemr4478029ejb.2.1690344421550; Tue, 25 Jul 2023 21:07:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344421; cv=pass; d=google.com; s=arc-20160816; b=TiP81Z4foQ1L2+WfK+irXCNNrvZJfHYN7nNwdjLMeImnflvOrSYydxj2bXd1sOtIJh U5L8qxK+vUztW/gcqCWkyb3vrXD+B99+b6Q60Ph5LkFaiYiDNkP0Miw+aEa++PygCuhe 1qPwRIQlyG+eZTC6v36HH12EShzsRWNTV5hW4Ifp47lT2GJBFu0tNnjE+gpn6aj7S/n7 +c/fDopW31AmGVV47bPJwT6qIKztKUz3nO80wBAxzLyIV4vI6Y1yxZ19tYKzO2YFMXfR RTK8EUHDXH0Ne+wfN9Ayqt2h0bLtBns1RFYydM+0iprjNcBOF90HfvKhuCqbgfkDePU9 UYfA== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=SN5XAmhmkKg8UqvP7gT+Ysor7PE1SOJJg++KR3Hjypr8RwJZMeINIBa9v/pOCmxPtg MXBFEY7JcZc8xTwAwh8gIzuSiTcBcSDgJbPfR90Mk0mpDtjgq8uminXe5gln0bQ+ITNT lc7UZVMJ5oGvZuA9kU4fCD8hNK/b+D4aI3LQizct/uBUnGAH2QmC6mZ13Xa92cHe++6z IXpE9BTo87t8EcpmlzSqWbCu/1fKApGjkyVR7lwrt5Vp9o/I3Rf/G1g8dToCcM1hZkqM NhfkQLpBKyxwfIiNXPtumiRB+uqg0X6igTl8hbka+Zxs2/sn14Q1VXk1P/6WYx3Xl48W qs9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=eZHaAbbA; 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 w4-20020a1709064a0400b0098dafe075ccsi8686056eju.97.2023.07.25.21.06.36; Tue, 25 Jul 2023 21:07:01 -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=eZHaAbbA; 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 S231416AbjGZEBq (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjGZEBQ (ORCPT ); Wed, 26 Jul 2023 00:01:16 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2150711F; Tue, 25 Jul 2023 21:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RedkM1C7uYp2R3smU0+9TQi5TBSKzZu84cSE79PHHz0yPRlVrVYsbdt1wrOBBI2E/e0cUoVmpeJ0HEAhaa/Vh/jXSQPZvx1HbsLf8UepG+Ie8n3vg8zEL+8ihli8rYKz52zYVsKBd4JO7t0RqK7s5GJ3+hT1jL72CWhwCw/Hf8dZ0pwXBbdul7enyOmMk+8toRdg8XwEKFnHFkMhajdf0OviCIwfvxJrx0f8t4z8ZUmVGe6fZ0QzUiihruHLV+SE95fBPzk5e17mM9ilUGwUohM35X+KjS/HFg0N0hxKiX9jOd4KXTjkZDUbwj9ciLY8UG2VwKjARwBy21+CKI6xwg== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=bAwip3MfudLL/+QGH96tG2BfCHBt96+cHcr/x1G7ahGtwvcoTDe6U1jkLTnqPnluPynZeH6t4bSIzsfcV8IudGYCh+BeV+mKaBVM3pGz4wxcoICJofb4795s4u8M0Vu5K9vmviYQnVAjJtZd30VXmDlyj4XFlUNmWCU8jGPCAx6ANr2ORaV00AByHwhEGJHms7i4Fgn4UAlg7DbiHfwYv3fqaQ3xjnuZqKC6bElF4yKAJ65LxZM8G+wJzlqE5hTlEM5RkkJdZe5XBBk8POkyhMyJyXk/QeNcTSVlQ+ukJmk7vjnPLD/GmzqHEs5Mg6WDs54n5QQJ4VyEcMKIUSNnPQ== 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=o/FEi+NHrJgVzPUdApTL1O5ZKA2lbL/MoTwujWdTFXw=; b=eZHaAbbAXBLKAVQa5/YQHfdmjC4XXZSVYtcftVYwSJGQJN5VblG7IfKa+rnbszQosQiAh5jgpMa8y7EtVhVLNB4mvZsPKv0UvelmfRbjXo7g4WTpisSZL2Y358c+Y6OCeWy25C66/nXfoqcb9KGKWfi8zt8vOep/7nkMCKLpRKIq9oGsBXVypkWNfDmO/E+iiy3YvjTimHW3l5CcGr/YM4CveB31Wlkp6GPEeGxkw2sVnRN4gfiuyZHdVHEqrJIvxufZJlIiJ87ct53rMHWCOxturEQtmY9p1ka78MwM1HIzYgkVV6hiLXlrYM91sEkLmdiM9zIsiq2aC11GOUVsrg== 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:09 +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:09 +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 07/61] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:47 +0800 Message-Id: <20230726040041.26267-7-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: 1b0f6ada-7026-4f4f-2516-08db8d8cf15e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yrBSyRdWwYTDrYE8OmlFYaZ4Lh31XP3WBxouB4pbT9MkoLHGChvocqmuCBX8VVZaSRNCor3kHXWnIv82aIG9LkInMveKyBQ3E0nXG2jsUWec27rf1L9gqV3GeM1FdHDFtX/a/QN2Ne7loK/IKbxezQqWNfyTYZwUIBV9IEC09CoWmfJoERYFHWoyqhldFClDkwIGnhQFmcipIYGrE/13VYX5xBouyPoxnhFSeoctsQkU35y/2fx2gq2MFuTSzZvVbpDIE/93AFCayjcVEiK2U2BIYCFWpQ5pnYRV06iL/iMKXgHd7Sy+6T5/2vYJNOHr86WtVDbJMnWyLKiOlJPuw2+d5eBQnHR/FLdOnYjnoKvNI+gfZscBfkeJg+Zzb576pVcDYNf8al/V/AjLSzg/4mSvF8zMA7YoO0daruLc3ktMvMOc01IojroyRGwV5KqHAXfUtrMUjMNk27aCEHb9iQYmiJ9aGD/oDTuP9UV7ssyDqKMtWtKQFNRHEJya/W6p+UwTQuanAEqdadRKvzMkEV6aA4u+H2Zse0Dlu1KtNMiV++48I/hPx8f5rLDWH0KEYsNj0Lh1xD8r/CEsRCOtshPJA3jywzEI+ojNZNr36faTnZIijjL7MvMrF1Ast9He 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?4e4J/PPd9ydxC5AKQdGls3bbOv3z?= =?utf-8?q?6w+pCjOR4K4GSEAilxaOAsTEz7JbrwaFZ/7rXyIDNMj7AKpm6lDuwQ4KQx5w6s2Br?= =?utf-8?q?H0nGMNWOQoZJIcswtif5FAjOpS2nVidQSzjjQEMgXWvT3Eny82bjODTAMeCk0vkR+?= =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QwG3DS+vYxfbHQoA0G94LAyN/6yGdcaL8IhDGd4AaOMb12NxjQj9RYPo+HB?= =?utf-8?q?zeUKCbaoZxHcLaMC0tn3/1YE3jvtWT3iHuQFZcZN84uRLu3VplQhMqGrarrIi3U9w?= =?utf-8?q?bu1mdmRIiD8KZMdWqU2T5Z81UiGfhdAFlak4sLMF7dVKcc/IGsl9qyrdxZOmwzgkS?= =?utf-8?q?H5edr4GOFew9YGKbCCker+Pnf/bmxYF6GdM0FkNuMIDrqbAxaiCw0aQbWbcdg8dXM?= =?utf-8?q?M+QOBxOOQm6pNaFjoTSpT+W2/6cXiRMG0XYXizBvlc/nc3OIo2dbsngTAqw61PEjK?= =?utf-8?q?tWr+kDro0vI9IxqRVpRJy7RYdt3Zk8NrM0rkd5L0wYON+4k3KyFSOhOGSDFbKxgY8?= =?utf-8?q?a7dpUk6PptdHQc8ES3pZrRMb+sVN0zmp2V0ltI8kgFxGG5oQVvdz9LiMD9T08WWET?= =?utf-8?q?Bs6dZxllEYa66BO4BPHFMPrMpaCs5tM3fc5FABSHiEfebhJhpRHrOC0oM9579qJBP?= =?utf-8?q?dfFe6JfiG1Q3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b0f6ada-7026-4f4f-2516-08db8d8cf15e 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:08.9861 (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: gfobKk4+O4AR51y7PMHxo83Xdi4Vev8ekuil77Q2YbfBuWge4iRqemG66pkIplOgTs/RaCaBzXhJE6y/dn72VA== 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: 1772454592326716071 X-GMAIL-MSGID: 1772454592326716071 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/davinci_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index fb686c0d171c..3757e4ebb614 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1345,7 +1345,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return ret; } -static int __exit davinci_mmcsd_remove(struct platform_device *pdev) +static void __exit davinci_mmcsd_remove(struct platform_device *pdev) { struct mmc_davinci_host *host = platform_get_drvdata(pdev); @@ -1354,8 +1354,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) davinci_release_dma_channels(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM @@ -1402,7 +1400,7 @@ static struct platform_driver davinci_mmcsd_driver = { .of_match_table = davinci_mmc_dt_ids, }, .probe = davinci_mmcsd_probe, - .remove = __exit_p(davinci_mmcsd_remove), + .remove_new = __exit_p(davinci_mmcsd_remove), .id_table = davinci_mmc_devtype, }; From patchwork Wed Jul 26 03:59:48 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: 126057 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162814vqo; Tue, 25 Jul 2023 21:07:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4FSgsUuIDVuInChhK/Rbrgt+ybVjF3CL0Nd8t+3D8o9oIyuU2sfVHQ9Bx0v84mt2/jOfL X-Received: by 2002:a17:906:64c6:b0:99b:c2ce:501c with SMTP id p6-20020a17090664c600b0099bc2ce501cmr721324ejn.19.1690344472765; Tue, 25 Jul 2023 21:07:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344472; cv=pass; d=google.com; s=arc-20160816; b=rPdJTdBfr5/B8P5YmM0ltSKEm111KQGTnIFbVIhLdq2ISoY4ApHic46vTtcJJM7tZB 3b8PtJvwn3Y5Xu/SU4l4kNaoQSxMNg/mzDLxxd8yXOAogvIqEaxonxTAgmV95koQN6av 7PDXxzSScAKQz7kcwE8VVj1c3zVbt3SPx9i/cougx+EMFsSe0OdY6SB+or+UX0nKbLq8 N8tYAzTATSsaFqkwvXQpzDJefTv/XcoZ+GT69b1+mSlh4c2YwBkJAcXuBWqlt/1rlZWd UQvjiB0rtCS+Tn1FTbtJR589x0EBURAb2pl6KI3jh/7oirs+Kq2GEiM0LePaEfQukGoN ikTQ== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; fh=vEpmipvtuUUFFWbFJZgk6ER9IoVi7xyBonilERpGTtE=; b=Qqnr4y6uw3HIaG790blFfo5Xa+1Ys4IJCopb+SS3ZnAzf44I2wjTLVQMxjq1GLNLSu SzxgHfpUJ6WBZzeti3mQoe8wNufcz344umx+rAMaTAkbIhertjkrAnh6Q8NsyMUKVBAh SNIQNMdgxrgpM3SWIhW62j0u6lPj4D4KBpiYFV7N+NJli8IlyjnumRNXeEFQGSYNbJKD i9iOO38dxHbXpsODwWMfhiuPAAs6Kdr9QNfZgAsGSSuQaOlpZUkSTF3O9Z9+WGUooRAG iRpOhBUgbOH70EuXFaxwGgUWW7EcMn6dZZHOB9jW6ZRYo+3rgb1fXOFtfC7mOkJsVA4P 9Mdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Rf74xZWH; 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 n27-20020a1709061d1b00b0099b4e5359besi9522508ejh.4.2023.07.25.21.07.29; Tue, 25 Jul 2023 21:07:52 -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=Rf74xZWH; 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 S231455AbjGZEBu (ORCPT + 99 others); Wed, 26 Jul 2023 00:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbjGZEBR (ORCPT ); Wed, 26 Jul 2023 00:01:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A237826B7; Tue, 25 Jul 2023 21:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V6LPhN9ibixv6tv9Eb66+rOiCuyAVFXRI7u3VTdMaJ8B5LOsn5P49IfQs3VD0BolNeA4m2Lhc+Q5t7XHwf2FwpHVPVd+MBvNsFtOSjJw5SVrzqWm8W+9MnP72DjAxQ99o8nOLCQoA2y3yi7UKNWsT1N3cI8LBCGk/9A3KGW9qvuGNOO2uzSI8C4LtXFp0mV5yatnXfW66R6XMbwSYEkZGvIV70p/iFD0c03sQHVe1xr+syzliB/l4ZPMioHklVPTbwNciCahQIH0f6V29MLFM+YBgbbsEUuMdrajyRWiZQ/WcUT1ISXrB6n8kc2GLB5kMSAJ1Sr5h2JbwvuaZwFbqA== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=kaf/Snv+sEh/Pg8G5cnF083FXELxXPGImeB/Au5tsMfKQKrKRItmZdjrL0YKnBYGUb6eFKFtVfYIG0pqnvbouivveHg0mBAE1TW97PmvLVt+W/OUZZc91ZWtocl8br6kSgP38L7RiIj+ypW6UGH5jrfLWsdqKjL3JdLDOHrpF4CHL+CKz0PE7yHfM2j2uWca7Fc60DkS1pR71+UFrX10JWGH/hTQLb09bjIhi6nv1WUnDbyczcVg6cdaCU28PUhXl/DXYaYRWar9NQg530qWD+ds7FAmejseHtoD/sfwaoYWF4QWZg06pc2o90pVbEnT1Zc0tzfQSqQBm/++XbMiIw== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=Rf74xZWHQb42YSn+uFw4yGdkTZZw1WQWQ1tBRjvrEo2JxCnqpyQVxTGlxUkuZOV79riwxR0TWSny4XUtND+o57mlf9VAX7N35MvyHlftWNUR0jgim7CpI6/lhAq79FY4nKJJKCeBic643jOhJ1gn/ahu/Jcd61OTeVNDiHKF4G/9yqnpEY6YfzD1M7ntLzR1gzWg6UKoR4giKujCFUI5Rg6n1LNn2Bkz/T/yreRy/DJak8oNhOun7ClsHidE3HDC+awyPQ53E0MC/k+QqTAxEiHIl/har2FUF1XftlPt3yeZMRCuXj5LQ7Q7S/4M7Sj8c3bhO1x9C6sVCCoSh2Ewmw== 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:11 +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:11 +0000 From: Yangtao Li To: Jaehoon Chung , 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 08/61] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:48 +0800 Message-Id: <20230726040041.26267-8-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: 4914b60d-ed6c-4986-6aa2-08db8d8cf296 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AfPLXcy+B0OSU+doe+6n9k+/ihtNEEqqicfY8owA786ZU9n8khQWVwHTLNrISQBlwEiLpTMPZEluf7H48Nl+USQAyq9bY9BLBQaWp797Sb+uvOQ83gpL4DfDnTDuCKiJKld6pwo6BD9IjM4i2dzQRuBTqs8Tro/HSHNRCjM2O21/wQbO/VN4Vely6ZUtJdSVaOLtc3UjEjzY5xKS36JSXqxEgwrC1rqTTfJTZmkoOoa0lwTRIokujUqaZ21kGJ9KPaMu1rXoHmUcFTGXAZdGRqrDtspxCDjaNQDst7JLZI9Z9JHNAcyuLlCcND3uXwHfi0hzjLX4o+OzqzW//9YS6aRUCtYhDNkiwopir7fZgA4152A72ew7dXAPqSkFCr8gf5V+BEyYn39sWXVdFZ3skmlwxMv1t+p9ls/uFZWWfi9bL7khYIIoCCF7/mFd+5oJLa+ixQbrCR16IrrOSSZMz0L1Gboh3aPkFKzl9kjscnr4/rMFg7rs5a6RBA2C/sKbQGsyIsrZ28U3eFZsBIRpLavLzQx3s3DLCnN/N+lvqT9EOzP3hF8P7Fsr5H7t/YatLURJJ+T9ghN7TrcpcCfDkg8rOpDP8AUrel+BIhRd9iaTQBrJkCAcJO33L6R8oqK9 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?O/nE+qdj3FW1RSZbr/4+abZjH542?= =?utf-8?q?vMqtU3u5nmebanL93FWRP1FpwU+/iFVYzOiJOLrVidg/fG9uPGmsrZEES4lq7sEMI?= =?utf-8?q?R7hZKusaoYc//qUdvgOR7MnKUfH+UOta1xb0e40zD1kNDCewX9RsMQnsWqdCGL6Dv?= =?utf-8?q?rmzu+RysswGLeiJXzp9hVj3fF5uXQMJ5p92CHbOVdOvRqllZ4Yco1J4Ji4h+2aVwj?= =?utf-8?q?Kw2KpWmTURf20d6ubYfvFrF7bP13lAkZ4guOeYIHzE/Ob+bgJ7awJx3gyoXD4wB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8?q?Od3HeaUCJeJf7fm8jquteprtWCHAN7s9CPH8FHR2E7jdg8A6m+RKokvIf3QbzYTA4?= =?utf-8?q?7zpE/VYQLjor5wi+UzO0NxlF4gggmPxs8C4qZS30gvboCXjI1FZx+HEfmf06tVzAz?= =?utf-8?q?5/sP4niP6190adLUpRL5yZNCIrhPM1VJNFjW6a3zFiMBiYgmMduE5KOWXhQziMVAl?= =?utf-8?q?AxfuD6m+NHkSXHkKF8ogwuSli6muzzZ5/yE/TwfHcJKvPMtBmm83bLC/rnFqrH03o?= =?utf-8?q?WY00WoWmQkLN+C8ATp5hqkZf+RlokZQoEcflzg+QS6GFBUjw0+Zs22BqWpZj0nLK0?= =?utf-8?q?RnzMD3HPmMA/525iuZ4Yx5diYFG/uX0TEwMAqPir25GbOkOX6bRr/pAu1vU/+vcrR?= =?utf-8?q?evB+nRqhPTvW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4914b60d-ed6c-4986-6aa2-08db8d8cf296 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:11.0231 (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: L8W9Fuy5OwlDay7ItYgUAji0p6yDBKDOyxZqjfHRQKteBd+ViBW/U3UNp5TQUo5Batj4aRu+GAF1+FK5NzG9Ag== 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: 1772454645742053440 X-GMAIL-MSGID: 1772454645742053440 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/dw_mmc-hi3798cv200.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 6f22fe054087..e9470c50a348 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -171,7 +171,7 @@ static int dw_mci_hi3798cv200_probe(struct platform_device *pdev) return dw_mci_pltfm_register(pdev, &hi3798cv200_data); } -static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) +static void dw_mci_hi3798cv200_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); struct hi3798cv200_priv *priv = host->priv; @@ -180,8 +180,6 @@ static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) clk_disable_unprepare(priv->sample_clk); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct of_device_id dw_mci_hi3798cv200_match[] = { @@ -192,7 +190,7 @@ static const struct of_device_id dw_mci_hi3798cv200_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_hi3798cv200_match); static struct platform_driver dw_mci_hi3798cv200_driver = { .probe = dw_mci_hi3798cv200_probe, - .remove = dw_mci_hi3798cv200_remove, + .remove_new = dw_mci_hi3798cv200_remove, .driver = { .name = "dwmmc_hi3798cv200", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:49 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: 126068 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp167949vqo; Tue, 25 Jul 2023 21:24:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlGw8sndVh73SSWz5CClPpXe1lugQMlQgEy9wGJvfYyXfIRad19dZIBc2mwDdKmJ1R1J762a X-Received: by 2002:a17:906:2192:b0:975:942e:81e7 with SMTP id 18-20020a170906219200b00975942e81e7mr659377eju.37.1690345460048; Tue, 25 Jul 2023 21:24:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345460; cv=pass; d=google.com; s=arc-20160816; b=HE/kfUDm55eUUqVOYyLLf8PNsRai9DjeUT2tgGA0dEkGP2YTupPycD5enH1U8TGA62 2bOLaylJBQmDEcJY45RjAqPs0pttFhl9Ka4Iy4KaDlR1fqe05ER/Lqxfp0z7JV2TFxe8 6tWGl+sXLw8EhcdybgnnEU4/TfwHYjxQzvgNzcQCE6NUUK/FXUsKPfR9eMCZ1sWh62MN /yn/9bbHGJni3/dw+hrbmIlYFvLqHsDDchWSt77qD9xk1HPk+YJrXcDR4vDLQLnRYVM4 rarKgXGpTFka68Yg0KZ892P8MAweRygnMIGgbuSGDd3RAVSjO/kywKmtuUdYF/n5eEje QG9A== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=MQgG6My93NteVKgKr1rgrajri02NKNkVeaqyxrSNAWPYwye8k27R6/SIv0HfMDA4Wo /ELjyuu6JHIh4hrz4Pf58iiAQOxFA7B+VycmtGt/rwJOFTLD7Nh+dsg6h99rM/S90Tsb ogtA7t4d0Rx0obDsceHZagdNcYNNLM/Ek8XJOhjzg74egqsrWDyQEH67bQUyHcWfQP20 Ss3//MA8I/PGnnkaQRIiDIumKWEND08TGEipyC/Rj05Az0Rn3cG3+6LgoCo3kdKQoaTi 4KCGa33SRLHyBkwEB+wlQwuBGCRZbnUajI3emTd4UFZe5PZewOx3lytCLCsByg3/doB9 i3ug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PupFyPMK; 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 gy22-20020a170906f25600b009892631e251si8858510ejb.770.2023.07.25.21.23.56; Tue, 25 Jul 2023 21:24:20 -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=PupFyPMK; 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 S231497AbjGZECO (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjGZEBT (ORCPT ); Wed, 26 Jul 2023 00:01:19 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC4741BF2; Tue, 25 Jul 2023 21:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mlPRj5kaBhVAXZhijrNOl9+WR1LUNPc9HMdyap3C/Tc5PMw8/or4o5RxVy/JhYIc3ysrsBbiRmxF+NWcpnDTgpBfpL9BeI/CUIEjlQkaJsp5wFyxzS7nzfZJhQwLJipjWALTFINLfJdCLIYdqv/lCnLFAC5YFmBYGhHR/uYG4cH13KWeh1RzkeWDLnkcCIvMqWiibt3i8Al5McXnO6US4lp0WopABh/LYMNV/ZTpSY+KqmmzUYpEBZ9URi6XhSC9dHCdaXWCz+hnWe5qeIV5CZHGECVObX2kFZq4Y+mScTvJhGmqBCHU0pfgj5nFlEFrjGgcia7UG6O1PhPime7gBg== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=dOlRFHjbXSfRtfMrPLL0EZkmj+D6/Hse8xEMCAz7SuoRdlgc+Gs81FbF3wD9h48xdUW/spT0n3BBazSz+BoBAgpEUSuTGV04ZOi4BhC8tUYsPUjnWTHytLHhwvb+pona5BQ8JpwjP1GLUfkOLHqw8/HUUqk71BL9X+ecEya2t3wg/3VlP9LAbd1H6bhPVuyIPWk+HnXnPbtDnX930jGi1qGHJgCrVFo4sABeqrXXpfjGUnYruAplWohRzr8fwtVf/8RucElyQLz4wT5r1kgMEo6qu+N5mgIYHsbaflt9/G6QnUqb/geY+HLg8Iovpy8CI03yyhibTpN3OAok4sAT6Q== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=PupFyPMKH+vsGTMU9kT2SpTvFBGVzJ5XELDhpU1FsiLRKV7gOa1B30wGGBXhJgg31aUxzMM+7SgSMZjz25gdTE59VjVygobpiw4b0MUCO9VvUshmo8dy8RAFwwJAyFvq4F8dYxFuU8UCH54pBmwdap9xa5dW2eMECu2h2zc8lvzXPtHeBPQlLZ/mo6ZwPKG71ITfCtv2hoazEJ9p1Wtprya0kIkR663oCbKAe12Hn84CqBsnSaqJKLbcj8XXEQShS7MHOve5EyiN0B7Lk8bQbc89ug3ViC02S6+VcRNfsP4xfvNMuOKrgLQiG5d1FXfMaLb22Hq7trJ28vk7O7CuGg== 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:13 +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:13 +0000 From: Yangtao Li To: Adrian Hunter , 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 09/61] mmc: sdhci-pic32: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:49 +0800 Message-Id: <20230726040041.26267-9-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: e2090779-55c8-4c6d-c23a-08db8d8cf3e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 94mWmF6BEXjC32Y+jBnbE770+FWGLS8/nU2LYaGfjJugNIbtufydom0L7mDAQGo/DsSjI768LXYlUyLwJBiFWZxDGVm1n7bDurJ0CF6wGJzZQdrt6r4mIsUKAiOUpQM1gXLcWOEohlFeOKw95P1HNNgxg0EOZEa447DnlxgyL4/dalnqOc3v2P08j7Y49dWnqnJOi12+ckfHrWy2aq4N6qZbw2foxaJjuLBjaP60/Llbn+WORQH3dVpIzCiGNb0CkTGfZSoloMkITuYlRguXXJJ6sh0icjXHtWo5QaUo+Rury2B5bIXtyb4Va2BhFxmtsUYRVW3rgs5oCFtVqLJx8ndpO0OFCqgaUmuON4Qq2PQrHdSSr3Hmn0f7A+3wyUg/VDWW+QIR2ULct19SDoKV+jy7/n+sLQc8E80X5A4WJV5ESWm/M2Klcjs5zFz7BzCqRJ+BjPnHl5HDFndHG0Sn0zC8N2Y4pAR4890RNNIlbiYMp2Cl8nR8fnmNC4+YQWg17C9Q0jENSxGVr37nmXIYWM+pdELq+eDjfTWtr7bTclmuZ8pnU3f50oYvr3PAn5GNTP8mkkIcb7VhOz481feHEQHzTsIykFb7NoZzJgo4f3JnuPGckfZfyuuwEoHv1YdB 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?IlNstXskqZ6m9GVdp0gJYkYmU0ck?= =?utf-8?q?2x/BFZx1TLiTwlUmRmc2zKxvweEIMmDnkBQv9DqXWqqrkwiPT7MUj7WNB7MQeOq8i?= =?utf-8?q?NWgFyI35QUIcIJS4LwTs/p2/uZ9GilONhw4+OiGxTDsbenTbJvu8V08nPKVwVv7T+?= =?utf-8?q?+pUael8bMhJh1EbHOFi398p/Tu5/0ZxOtBdsYJF0Y81nPBM9aCGmPDHtLg2yJE4jQ?= =?utf-8?q?PM9OAj701oX+cjGQOgnY7rSX4x8k9+NWJqDEBibeqZsNlf/9yJCo9eE83RDoI49FW?= =?utf-8?q?VBFEZV47J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ZwC5sU8S0DsZBsyrMJGNBxOGD3o9A1Z?= =?utf-8?q?v5kXFx3DGrkXMRoPXHYLYBzLJUwmY9lpi+LSha6eeRJbIHZ93SqiYQuKOY1OMJAN2?= =?utf-8?q?su7qDg1nh1xoHxgujzoaOF/o/udSS+uUgIL0FklqAxHoyTdnRJm+hKsg5V5BpxLZ/?= =?utf-8?q?coahsuO4B+UdTYVgVL1Jv0Xny8+oMiBXlzHz7dji5wO28byANTdynRYKIl5Z0v41c?= =?utf-8?q?38iWZVtNLcCxnWbMmL00PX2Bn4keRAWshTctZUrTVJ/+LGGSCcZBsgUX3Igk58mWU?= =?utf-8?q?z7deF+YWt9v4gepYpQO7LVs6SUwbzdtMSsXfb+fUX5+59PU7CWb2Oz/XywoQPRMfT?= =?utf-8?q?QnQ+7snIIuRz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2090779-55c8-4c6d-c23a-08db8d8cf3e1 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:13.0956 (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: XadAvm/ctYxHikaGSEO4I0VX2B5oy5TqIL2G3A6/LMNagKRRkZmwneFb/NgtEdhrGNJJaBP3bYQpSidvNjhqIw== 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: 1772455681087924019 X-GMAIL-MSGID: 1772455681087924019 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/sdhci-pic32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pic32.c b/drivers/mmc/host/sdhci-pic32.c index 6696b6bdd88e..7a0351a9c74e 100644 --- a/drivers/mmc/host/sdhci-pic32.c +++ b/drivers/mmc/host/sdhci-pic32.c @@ -210,7 +210,7 @@ static int pic32_sdhci_probe(struct platform_device *pdev) return ret; } -static int pic32_sdhci_remove(struct platform_device *pdev) +static void pic32_sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct pic32_sdhci_priv *sdhci_pdata = sdhci_priv(host); @@ -221,8 +221,6 @@ static int pic32_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(sdhci_pdata->base_clk); clk_disable_unprepare(sdhci_pdata->sys_clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id pic32_sdhci_id_table[] = { @@ -238,7 +236,7 @@ static struct platform_driver pic32_sdhci_driver = { .of_match_table = of_match_ptr(pic32_sdhci_id_table), }, .probe = pic32_sdhci_probe, - .remove = pic32_sdhci_remove, + .remove_new = pic32_sdhci_remove, }; module_platform_driver(pic32_sdhci_driver); From patchwork Wed Jul 26 03:59:50 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: 126052 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp162142vqo; Tue, 25 Jul 2023 21:05:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDXI14nf1PLznKFmb40mCFkqCuBhruscfH8JeeGpbY/62cbrneBRN5jjplpkp782LjVSgA X-Received: by 2002:a17:903:191:b0:1b8:862:74ee with SMTP id z17-20020a170903019100b001b8086274eemr1042441plg.11.1690344348790; Tue, 25 Jul 2023 21:05:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344348; cv=pass; d=google.com; s=arc-20160816; b=Rc2UvAeZ8hwf87ozP0pKC853ficLTDXddcw9rlVruA50zgKLmcjyMqIihKAk1iAzIz Lf53xWo4mw+VNqCBZjGXr+Ux0LLSVnVTeJfLeP55nGWSK/IUl5kUWT4bNsTcff98m4tt +slqBtvm3G/wUwkB8zjitT3Xk1ymA6Rq761p2MyeuL2sOk5oDdEzKRO5MMDoosCcx6wP ggy3Hz248TATmU07b42jhAtpPIok//fhxL3yIz8bveouO2MXlWx+dYOLajJiuWYzdlmz kyhpTeRdJuCXujM4FDKxtgdcUMQzpBRs92v5sGWt+dMSJnJIjJ96MNkktJwiXGEAfTlT 7qLQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=jq5Ypgitr4YMzZHzKuJtgZKfzmX+XWk7NXdydkYdUA/Mn6Ru6MUD9SGSb/7Z04fP+o PJp1tsHhPQ1jl99ekyG5Hcd/I5s53InSYtY0fpQJF1Mu6+9Nq+LBggCkuH1n+cPOMqyG FKeDRrj9smTZMlnDsy9BG4STv3K12PDI/wwKiy0CBl165dwXV+ZbrLP/E8xiFDoHejT2 aTEai94pHCXhkaOkP00yjqQzQEfa5AFxSuNNkkz+osAkPWZxMyg6U91mSZgCAYgtgaTM hb8jlYjlukFDTNB0tP0je2Sn5gfA10BiDJ51KRo9/pDoVZZWSXwdRkWtpBxGLGgiqoLq sn6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aouJiSuY; 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 lo7-20020a170903434700b001b8b6089eeasi11349146plb.326.2023.07.25.21.05.35; Tue, 25 Jul 2023 21:05:48 -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=aouJiSuY; 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 S231481AbjGZECJ (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjGZEBU (ORCPT ); Wed, 26 Jul 2023 00:01:20 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 312E7268F; Tue, 25 Jul 2023 21:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c6RDGwOGAYNmTgJrraLjT46Zz4R4JSCyGb7c+TMfOh9YW8KCg0bdA+wuVgcM5RFvY3yreDyjVxpmkororJUQ7V41h/bNccgH4fjeYE1c7LH6FJQZjZUvCWBGr5gvx1wplZE/Vn7GK4j3l3Z424OO1/+V/Slg5m1DVOkysXAeVcKQD3Rjixa5+wkDzcLVSc7ZuXaX7+IYzDVdBGsfkmUIJ5t7RU7DezhR/lGgi12qzSq+NttiiiE0b0wdOFAZE3hFxmtV0gkMwhWvPup8oSCVMkXjwHrlmMPa4OTbrjx3WmpGhOBm0Ogy6OHcAkHusD4P/UuX/UsVaoo0on0zcNHEoQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=dXFbkOZ4I32kg5M/H8jO3UsL2v73bQqxFHzOXAmFYHLU7vS0PIHj542+apTEqP4XlXFgMf3AKBA2xAGi5hrDU0IEA1ZKuRMX3RPPhWcZ+9Dv4bC+dz2j0RuXICvsHLv5chbv968DGAryKqaU6cIdDfskDCPJxvr0W/zVFk+3+yOi/ySaMhJwdOfhdwshXDht+yrEA8CZWvwyUPmlalKsAL6ebmbm6d1lWHIu0W2XBZKBpCw3WiXTxcLSaNcF530Wxu+O47fEMpr0r7WuYbOjxfHJnCh8qVSTOd+3tk9oHLCDGvn6rAUWUtsXfA0ayV1/HvfF0KYzlVXyt58teyNP9Q== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=aouJiSuYZojI3EhVijF7uNSdmhFEgLeVguKxHE5D19t7NfAX2+Dh/BQ83wHKKn9L0ADaJRx7xfISOBCPw7EV3Xlnaa2Jpy0hmba7Mjp/LaVAwO5E+/YSqQN65pJFiUh+v5EWODXhCxW5a94rofNX4BzOP4fSKKNIerCGmMzhfUpzT9ptFxRtQJW8/rz4lLPktWDBBkLdwkWdQEeRMCsWAM4m1HTcQYNu/z+jdD1Q/AB+B+iOHo3lX5YYIVJcPXRTznM3y18O3CZCyVMwC0/WgXXojig4h70ojCTKtkv9ugL387Hp9sf5q3FcrSjQlscIwlGO4ojrSWYviY1SHWii2Q== 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:15 +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:14 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/61] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:50 +0800 Message-Id: <20230726040041.26267-10-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: c3060b5d-09b7-474f-bd66-08db8d8cf4ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k8R3niK/KwdqiYbcLa/Jcp6/5u/eKTE6nj3Agyuq43xOrR7QXqk9FZkohWmJydeQGrf5MYrrQZgHR8GjOwS0T4QuSqNHdASDz/UNx4h39ezNN5F5GVkzUC8QgHVLsaPy4ZC/qd5P7XIAeE6lxEc3ZqdK0N83NjfzbGsTGYcjpo/apndyyVQ4u31rSDFF+HKtsu4gTEuQnA8/3ThJN3AeIsaTLpJP8expZHcqYROGra1351HH+vbilb4YTYy2859tP5y64B/QUnBVPahL9wW3X05rrp6fCTZVL5dgtLUj6YxmekTHEmLFdsoLVNBij3VsW98DXG4DVfXEsh+Jcp5uw7BL2pSuroJCHS/cZni1i8zfscxCWyxZq8n3WplW1/fuFp1Yl1+nGxFSuzerJc8xriW59mc6Xi47666Js82qyKctBoa3GtlAgkRu1QaTRAjTpeLFpBb0RB4LlhITAhYBRXrD8m8ox1k9Q9rl+gIi7pJJHxydRzzUNo6CeH2vZozqDJ3cy94kGgaoZ7Md0IH84+Y7+1bk968yYe+bd+L5xhDbAvpgBdlxOTJ42u4EGvRxOQYASMpvfLtqDfzqM/+QUDXxT3dsXCdRSiI/L0kNzR1ubUFU1dYAf19oOcxcTdMg 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?5XvgmEJXR0suN6k7xKORi/9iHpqP?= =?utf-8?q?ZxFRynU5O3sFeplU5Bdr6DBu7Lq7fMrJMDFC1+sjK//rau7DLAcc3n2sdmY36h7XM?= =?utf-8?q?Y8T9uDTjKAnnKyswJFtKFZEptN0AmM6+Ko/Lod4GEVq11yGHttPzweibAyDL2EAaP?= =?utf-8?q?erNbME3Q4BYyd2bR2b0Fe2/DrCAhqtkMIA7RLQ/U7JVGN6sHhTVRluT/1zAwPJYqc?= =?utf-8?q?7DK90hj0q/pOYffZyRdad5SoIROsD8aCAFCtcqohz4DeqyXaZecLgHq7LyTGOPMEj?= =?utf-8?q?8Vvf3uvK0JbfjFMTGpFyKoW+/Ude9LrNpKjJHZ9kd/vNmaT5/8kg5W9bivkiVvJuu?= =?utf-8?q?cX1Yw4IRSCEhbklL+6BN0GYzR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7jOj22zCjLlGZLURP3FLPHvPZG8ZaHrRfK?= =?utf-8?q?J6msYD21rsgzi9i41QEm/SLkcekNTB+/qwuY16riGPbkS2j8h5L2T1zZWenXpYWLI?= =?utf-8?q?yh29oGH8wjPaq+Z/buDnXeGWQt/WpgadUH545Cr/Bhv6mLBsu0RZRmUflpdED1HwS?= =?utf-8?q?71RxsNvyKQNaukd1dUlD2qdCH74nyJTxdIXbOwKIX/9qsjc1f+tv2zfp6dcaXq7Bj?= =?utf-8?q?EClONOciaDfeAq+X30hxEQ0aRp/8//sq+7A6+1NCOddF7bjoIBDNnGim3FbmUq9AU?= =?utf-8?q?Y6feW5DxALA0?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3060b5d-09b7-474f-bd66-08db8d8cf4ec 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:14.8460 (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: fo6SFANs8pguOoX8V31eybIUYYyhIwjX4h78o2aIFOcFiQrXns2QvBRj9tloZQoQkgIRAqMHy0UuXS+MjYORpQ== 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: 1772454515939948642 X-GMAIL-MSGID: 1772454515939948642 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/sdhci-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver); From patchwork Wed Jul 26 03:59:51 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: 126095 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp181248vqo; Tue, 25 Jul 2023 22:06:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlEEbv9U6k/BBuSKrRMhorNk5AnRN7IbDHOUdoMK8stInZv1KBK/TZIzHH6QworW7PQNaMxD X-Received: by 2002:a17:90a:348b:b0:267:f1d7:ed68 with SMTP id p11-20020a17090a348b00b00267f1d7ed68mr1339114pjb.14.1690347989274; Tue, 25 Jul 2023 22:06:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347989; cv=pass; d=google.com; s=arc-20160816; b=IrFEInMCCqnv38OqkcdK9VpzztcVR+0GgOfTuwUQnaJTE1Sef4DnPevRFSjPVsaIVo GexSHiRSq2Bk2FBfZLKU//rOkWPwc4Xx7CZ9VFwA9zVcIei/zqmFzszVTE/ofx+ygh1v ynEdVxwfpS2boUPs5bfE2dtXmRrdRUi/4uYFuaj9fDiCOl8rrbi4GeoFr2sPj931GcTA pdAivV8UFfwb+hY0f2UVTTRfDMEg9t6p17MfWdKCoKV+yU7sL4Z7sVwyQwXi4j8M6WYn 4C5yR3izb8bPZlZLu3MQY3QgPrGEVaYN3gsLUjw9wu4icvgYgf+JU9XCGR/1COEWlIau 3qhQ== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; fh=lsBBgZtt9Zp64MNFIVDMQqe1hUqbGcY3umQCuckK8YY=; b=AcXJilFwaz4+h4VQVl27GOt4AoDrLkRthmls8BcW0V7s76u3xr6gR526Zjma9kY8Wi 7ZdyhwjpAdGzzjwiXtuOwQMZyzaE13ryFDlr4VJgPutvoHTt63grgMXZIFINnmWpPJJW /mrRmMp3FkuRIN24Gahw+ihpcO7nA+kKEaK+GNhDDlgoVgpi/LOfw60b1QyUj5E8PA4N UZkXXzmzw47e1+aIoOpSRYp0Dl9vMQwJTtAdOTOEDmYL7hkplycfOKbC+VUdH6ybNgJY nSdP829ROeSWlAzAFzcjdOfXQtIPl4WOOMXJA/Z4dy+hFRZaldZj/4pIteSezjDgtGUw xxhQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="Re1h/w6V"; 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 f23-20020a17090ace1700b00262fe4585f3si538438pju.150.2023.07.25.22.06.15; Tue, 25 Jul 2023 22:06: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="Re1h/w6V"; 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 S231526AbjGZEC0 (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbjGZEBY (ORCPT ); Wed, 26 Jul 2023 00:01:24 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 909B91BF2; Tue, 25 Jul 2023 21:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=emaD7xU43pIwn2+JlF6P9d4QPBlkwx68rAJXSJVnrZzBaVjWo+XLr7UJe+7z6JzgS/v6xwuqrF94j70be5YR/eT/g5DW0BD4qUscbhwxKTPoAxNYxQ33ihG3HXOmXoEDlK92bFQsZY0yxLgucRPcFqoF/0EH253bygkiBJ2nSef3Vrb3y9J4CWWZhEGzuAbOHyQyZ+3oWnCId0p60V/N3oke96tzRFpihiM9m6ge+CjcCWr3//3/j8xdbmXM+Y4n9XLEZPKjln5DgMJh6PU0a/tLDeyTehiSd/zL0rqPt3VP1WNvS8CAVMT/x/K9WUyEtHALOAxaolfnDTy5q+knTA== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=Jmzzn4oAvglzBUVChj2gvNcdPRy1JmYiqzQUAVmi9PtJGCD1Lz3x7EAnLCZDRJ5gLNk1UR0dc1t6NcfX3dPsCdOcWHcU6yczbNNAeSohdLGwQGPNB+s+lxFsiKxBJRNmkPxHGZR5qgtG8dImhKhfLl6xNbk3d/m9q/qCxayJwnRmo7cWJLAxKl3jLq2h3c3rF0Tzl5ir4feoYuPrWknHyyrrdyRyqa/OsAFnk2Mt7n7e+dJnnbQ5YB6jttCzm8YmQv/nrE49X87RapS6TlYqK9ABmBFjvLX8jZod0DzXIwsDLW9CLqvkI1lt4SZGbdi+s4tfMTVxaVNdtXDPySleRg== 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=mjvydvAOnf9fdqZRVZUVRLRXIIaoxUyvKCR2No+4ygk=; b=Re1h/w6VxQcwZ5ZGuwNZWeiYxlX9BmOkWMgMyl2NPvPHMtEaYEg8KO+6TaGm1A8wSNhNwlSxwoKOCzDeOvMHKI7WZG/4EHVI/WHjk5fdtFI6Ih3uabio7qOVtCkQIXPX7LfXuTbtPmmBb9Smtklr59EzidtGFt3RxT5aEoyF8ptk0kEd9ekU26WolaUje7rwNfbwy2robYdmqlklAlmPd/I/mRP8I6bHaW/YSU4ewd5qKZepQi1jiyghutDayZixyVf/X9fIGTBMme4sx0fcXZUfFFZTdrKJywlbg9UgbWFAJl5Pm7qYuNqoYtIA7uEn3kzDU9OVQdierbEifwq8tQ== 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:17 +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:16 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 11/61] mmc: omap_hsmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:51 +0800 Message-Id: <20230726040041.26267-11-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: d90d4c21-c888-4d6b-0b94-08db8d8cf5c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4OPzs28baHS6UGL5nLs0YguIXlTvr8xjlW0RwvZn3I3WFvOw7Qyn5JuTXrYgnAelA4ayzm001/PwbAEZqhy433Y2yDOt7RQKFpnTiCKmNkfGWpGbPIhY7n3YeolT2TnCcK+ARSZXXNhHPTisElxE2q78PVmaN1p1Z/HWZueb5v0ZhXHgUUM7sbWWeEBjNx8Xn3cHHn7EzhRE1awUMkjxAjkl1ynij0bWqzJZB6YpmhQ1qvYdyRIa/Ua2zyF1OOKPeH2UChb/Mv/GmvOY/qkJYXxKnK96qvybo04/do8rA3xpFh8F4zW5St5Dk+Yrrfwo7GbDeLe3fjdtBOZ/JdQ3hVSqoCZT+rRBk9+GDLaVXpvuvANWsrwiqQO2LtotcaLdLQRL79caYWzx/RTVP/pXdr5a7C1AYKzxtlaqopj+lSx3aUmnTkjgCEZo46REg4XoATXGtuCEL3zp0hY/Y4IRQIaLwdSqwhFUCjlaLk4KM0JHABXl+UVL+3I2jvD0nynRFoEEi/+W1zTINx54w1zvq7imXfMFl1B1riD8cpbpzAmMEiJvO4eujHNjmezKcipkUpaplvwV7C+JXKccs0TWcONesHHnga7Q8HOMTMnuEjOMbccDNhZr/9LF3XplIct5 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ChxdbENK+5FBbwRaus+OhvQ3cYGz?= =?utf-8?q?CYPrYI9xSL01wTNaN8h7UwAyCYWi/qNYEFXQ6WEI2YboraKOmTNIxj5VBQrAc97O8?= =?utf-8?q?bqqVnCYxaL3z9mZCohkRb7+iUjIgRP/ZYhIwg2xkuTfkxEcXxQBD6eqyxV9gwNX76?= =?utf-8?q?lvJ8NGyFyOMKl0iwbiOwSknLDR12rZq1DHTzTHbuXonwEH5Oe0mm0/HFxHiratNyh?= =?utf-8?q?hiQ/S+KaYDLLnYy0o7rqQPr0pZgk2qcTMeUgDPAnpN9w21Wigs1WVA4CVjg1hFf9w?= =?utf-8?q?BsxcCe+cgWYHz53Mu0T7ZHnQ1tPaM7SgHPtT/2gDmtpEinWDcVONq5J5Hvtri1OSb?= =?utf-8?q?QUbxjGUpaT+aMQXyLba/kx+IJ08Oybk2/aEjMyZ8WPYP5o2SokyfBivp+IYx1Mc6F?= =?utf-8?q?vKD54XJs8dOpqzXCRYG3svko75Ae+/O5kDmwCVwegThRNKp0VvIBpPhs8PDNXvNVB?=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1RsXudjpL/hV?= =?utf-8?q?0SByoSK00Os9J5pc2RqHzmCAUUfKFwJO/tGIncQ0XmF5uj9jUzIcW9Dox+6mpAfcz?= =?utf-8?q?4OJkbbJF8lmssNYkIBnvUc0z2eIUej07Ic69T5V+O7wy6nQDfmXqsaLVpHEmuV9hJ?= =?utf-8?q?Pic62IhJnw1JkXR++MV9I4ikNsq2FudYBaeXnNTjNbFRptQ6FYahDbFNcCO1psVNJ?= =?utf-8?q?5o2l83dMI2Fr?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d90d4c21-c888-4d6b-0b94-08db8d8cf5c8 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:16.3255 (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: jLXouBuCBTwR4mZrrJ5Of5m2rO2mU8Lmkwx5XB62PkQ201pEjqoVQU4sD+fdxbD6Pfkbe2/xme5tWIUUW7tMPQ== 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: 1772458333210097672 X-GMAIL-MSGID: 1772458333210097672 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/omap_hsmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 93de00a06aba..e120aeb869b8 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1979,7 +1979,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) return ret; } -static int omap_hsmmc_remove(struct platform_device *pdev) +static void omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); @@ -1997,8 +1997,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->dbclk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2123,7 +2121,7 @@ static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static struct platform_driver omap_hsmmc_driver = { .probe = omap_hsmmc_probe, - .remove = omap_hsmmc_remove, + .remove_new = omap_hsmmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:52 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: 126067 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp167939vqo; Tue, 25 Jul 2023 21:24:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJLZuxnFQG7pfPwAuPtm/4Y+p8ve4lJhr1TjBWs+UYW451kM/v+F0UqbSP+i/BOk3wU9v2 X-Received: by 2002:a05:6402:2022:b0:51e:309:2e12 with SMTP id ay2-20020a056402202200b0051e03092e12mr545033edb.28.1690345458951; Tue, 25 Jul 2023 21:24:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345458; cv=pass; d=google.com; s=arc-20160816; b=vp9zpVH0DlCbd7B/hKIN8MzPBxGkwYBRr+qZLU/VgNd9DvVYiwXcOiMJXcEwcsNKOD 48hNjbReUdszIFh+9cA67cMADeSJRPDHCH8NiQpvzQIz4icyMqMhrra3Yi707IuvLCez 7KSDykk+WWg9OOudb2kuIKdaH9D0aX9rm6tXGvzZYQVsE0WG4aS9haMfRW7KAbt0PVmd MxiVm2aBqtV54WCvyobdwOsp7GceKs8t6TTRpnEMXfzuQylhSVep3RRrw9/8YXLEM4uW ceAs6H3QLzw6fQpEbr0pAx4faHWLe+52CB8/uCxmxul8XN4N/ol3j1v7k5TLMS4/6ujg ijjQ== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; fh=fKMVcxEXyR448PAR0ORcEmkzL5SqNRft7iKHS6hwUKc=; b=nn19Xu3j71VdWvfomI4cAhxwK+OJSNSvDuO1m2FqrP0CKVVSI2eZgxsMdT+CqCZkz8 OrxhdASuAgBWWp1tjGJwcvQPvEk0wEV/om7NrPlOHRNbs1/nV8E5Jke3WXnTcWr3WaNE RP3VWJcq6BHRADWLwXVUgQQIRFgYVSIG4TrXoTWaeXRE8694PdEnWb6TxJXVH/1GQ75u rHEKqAzLWLdQBJsONyHUMrKAIZ3jZQvq7OTun9EOz1uqr173UAo1i7am7Jj3M2D/U/uS BjLcwreOKx+RaSYv7e0KlpfQtKazqH4felgPmCe0SyTk20RNlypP91gow/VhATRVmVHV aCnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=j56RiXgV; 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 x19-20020aa7d393000000b0051df7c30429si9338307edq.239.2023.07.25.21.23.55; Tue, 25 Jul 2023 21:24:18 -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=j56RiXgV; 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 S231510AbjGZECT (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjGZEBX (ORCPT ); Wed, 26 Jul 2023 00:01:23 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A1B11F; Tue, 25 Jul 2023 21:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UBUNuf0hDtZV2xsTwMuQDlIT6tjuiXFlztXl7xxmp2pKjGEVRX9nAcBWZBMT3Qlnu2/5oGe5zN6umgoPlZPhZPGORj/n1eoSJQnuZ3Z6tFnkZkaKsnf3oEXm9hDLdnHOajkMF7IDsRsTuChpk7JFD4n8CVm1y76qZLRDCtkY3MkHDb7G19Bjc9sYUJM2iuVSAErnsBDMAT9NIkVKupthiDvkI53NS3mIml8RpHmGt1ZYtKxkJ13bOUUkjCZEkHePVXqZu50RJyX98qRGJv1usCddJynjWgGJckTuLQy12NuMLtHJRXiaFTI3t7yZvaAe26BtVeHi0Cp59FUb0FIQqQ== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=YZXIUW8jqtLFfMmR9bbzBqAq+t2QjHJDl8YTV9ZPTjjk1PUd47zQ++j9AIIBdfKuE2ub0oquPXuz4IPbLfB/xLozBaTPQwmCnxRN2XzEr3Htivu0stPPcZh9cIpu+k7t5G6Php5bLt4zCwv28HcRtu4rLE0Mi1MhFYMw8Av19r9qMvHNUly0ho36r1ejZ9G2Wbbn9kpM7RC3mOTfTW79HEgSBPR6QyFHcW/XgvI541nB6PhUsG1Z/dEb2LWp4BFlk5gAT4nZdO8C1oEhm9Djh9urlKPECWA2n29I36ew54rC97L4D/TQwpBb2t/WtMi958BDC2J4m3aKebenc8lyaw== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=j56RiXgVdwAPpBaP65ZKvX4BnSRGMOlKIfRxQQeWvTWP7VazzfliHtLoGccGh7tYV6xsf4a+Q47cv/0G8NRVSq0ukTK2r8/12n19AnNgtALFIsBr4rC7nye847dyc3CewiqgI7mnEVoy0oIqtKgrIRvwS+13OjzMYsTYQKwYvcGJQdAEBC67qpWH+j+HZOOyAUjRW6esRm6HdKSOL0h2HRr84PyYcmnmeiib0uqDU6c+2rIKKO/9S92FJT3s3H+xsCpghk4A+PnosWN/bJGXOLowoMbSqrjK0+mtUXaCZEOo35skJkc0C+PPYVZEvfK+FDKYK8Adh11+xZ55CjAjVA== 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:18 +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:18 +0000 From: Yangtao Li To: Adrian Hunter , Eugen Hristev , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/61] mmc: sdhci-of-at91: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:52 +0800 Message-Id: <20230726040041.26267-12-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: 5e60ac90-e227-43de-159d-08db8d8cf705 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F3ICjyOkbkW4HIDlCry9+qm2jXZ6xXPm7hxvAaCrYncuQwMyngLp1+EQaUZnCY1KRNDPxULpTwcq01qp6Bu+faBaBcZns3Rd9un5KgGeVlRc62uA+kpoHGfGXxbU6Dfgnnh+I3Y01n8GO88whnDyFTzBpQq6mOKJJ5msx2+oIB0/oVUDMla7XlYIs+7UD4FnhwBMgu9imhB7hc+YL1G21ldHe9ZO7FJgC71McnzCFOLV2JPwz4X+9tzI/zeCjD6pgffmN6J76z1p/VEZHjXCPGgDgOywqL3m1Y0j+4SkxEUSSfbaf2sA/+U+/Gbz5fj3CxTXY7Db4tTbOkP1MNLQed0pZk3eenaKGf8p0bbTlCigb3xZh0uRFVxvFbuEDSBVpMH3T2rB4GIaUc6OoFo4rizAQjICsrPLFUbyE0sQoHhy0kyc7C3lEt/Q1TjK92L9TpxNf9/AjNImRbaKaydnTigHi2n9ZkWtI2PRNmdra6T4xqPUv68NzH0SNYOSB6prx++sqFTRmftYuIkXzXAKenmYEj+t4vGY9FeDq+5krYUG1EP8k6LFrWjspS7Nqs0Iyi3cV9zs8Y0NUPljoEPzJ7j215KIOystgqMT9rROvCMTY1MAfXO+Rx8oZS8yH+d4 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/xE4/Cc7Hn8aHt3T6DZoEB3yAMMM?= =?utf-8?q?o6v01nQpVVwn8YMqSIdofW8HdMW9b92/oZNdGqNJcMWJxc5zk/5XX76mi5vU1NJUN?= =?utf-8?q?40qs0HFpWX1wkQuaMu3BF2GW7dnKUmG8l7v/Ig6X6/Qlnu/2c9PFEPTvdg2p/CVZS?= =?utf-8?q?Il2v8mpaeofBjsDfC5SMhj6RhUkyKEJp4NjkGzcx3uKukEtG+wey6Z5qJzH8M1Owh?= =?utf-8?q?O1vfOtUgshQYy43UOUAtj4fZI65ktjnBgWE5uPylrQ1Y/FL+NOd2L15VlZ0Bp97yb?= =?utf-8?q?RHpMb2/I8QBu58oM8DawafRy4QFwYvBc2FscJ9xnY+MuwXB2/wuUHN7qPFEO5wGa1?= =?utf-8?q?cUMp3hcVcVtIm/veDQTa79Is+uCM++Uq8dBBfUju3TIPMgVd2Ej1IFv3wn65d8x+8?= =?utf-8?q?MIYzO16sixi5MFYXEDkgmISse/BeTkejz2U+KMNsX9bED1brBFFs2GAJBxCBH6END?= =?utf-8?q?w0e/g/9iZgrof80Ly4P3g7RqIB16k0v/BVJrLTEAgSfKwLiRyQoaevV35oh7do0Sy?= =?ut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q0jjZLVw9Tw5c1wGQqwMsNjXMjhICcPM9yB/uQzfelQC33XfzDpdTzApI/?= =?utf-8?q?1Wmay09CtByhNx79egZGlYlXUJjQZAd7xcW8M37YT8zNlhcDlX7NJ0unTRK2dpVC8?= =?utf-8?q?qKAQV26Bkt/F?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e60ac90-e227-43de-159d-08db8d8cf705 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:18.4981 (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: cLaD9b9FGSsZbuebRgS8yzFee6i+QJVRSezagWbtcktNHkHT/nK3oK79hHleV8gcEL05hA7316a/VM7H2tvMHA== 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: 1772455679801981091 X-GMAIL-MSGID: 1772455679801981091 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 Reviewed-by: Claudiu Beznea --- drivers/mmc/host/sdhci-of-at91.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index cd0134580a90..af5bc0caf29b 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) return ret; } -static int sdhci_at91_remove(struct platform_device *pdev) +static void sdhci_at91_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev) clk_disable_unprepare(gck); clk_disable_unprepare(hclock); clk_disable_unprepare(mainck); - - return 0; } static struct platform_driver sdhci_at91_driver = { @@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = { .pm = &sdhci_at91_dev_pm_ops, }, .probe = sdhci_at91_probe, - .remove = sdhci_at91_remove, + .remove_new = sdhci_at91_remove, }; module_platform_driver(sdhci_at91_driver); From patchwork Wed Jul 26 03:59:53 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: 126060 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163429vqo; Tue, 25 Jul 2023 21:09:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQnNE9hRXcZW+gzNk0Vdot0qtfV6HhRv6TOCn+5oC/KPxd/5VISxEPTGCZ4qvbgYQvg+uU X-Received: by 2002:a17:906:76c3:b0:98d:9655:3fac with SMTP id q3-20020a17090676c300b0098d96553facmr521368ejn.71.1690344587900; Tue, 25 Jul 2023 21:09:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344587; cv=pass; d=google.com; s=arc-20160816; b=fu+Byr5QVprzs6Zt0USuqKGYiwRkcIr/FlBRk2bu22UA49uXTPbBRiY5636nj1Rum1 aHSt6V0jzH/T8spaNE6t8lxWQO2w/On4kgV/D8HVo1L+KrapkPi3VhgNUi04Oia61mxC 8Isi1GwTd/CKUmgjfaTigK9xqOg3sd0anOAn7yOtDqnI+vl/1rUJMXGBQkduwEOUuwz9 u0+ZRN1QaiH+vJeEtdwAA0iNaqDgIhwKyWe0upKEOrT2UoI9pVFKL7JuprOqv1+SSNun TZEflSNotBjhMtSXK1dEjC5zcy627B5jtlkm/UKBtU9v6ILLYTIwMLPD3oRT4jVDbZs4 NZeg== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; fh=bRV3B52BlPCt3YSalSFThXK0OPnKZx7pv8IR77jUsGI=; b=Ar1WIk6WbxBtMloV4TWTy4gSQZlnyZjdEAQtF57ZkXBNCEfC7qHW7Wjk31CTGgpiL1 oqvQneGJ+oUPmAY3VYMcwMrnC+eWGH7utbCRrEKKFBf3/jMtEVf9hCJjgwWJhiaCoV5o M5MFuw1ZyB8GiYpZMSzrtQRXm4ClgzO3Y2vL7g1EPjNefiroj+bLhn/4210avmi5MGC6 3rjKC0f7qjHVZe7sf7V4eV/Z7cUD4JYHiqp/y+E0K/B2EbOI0+ykDNQ3SGir6wV53YOz jMDjjwJIgls30OMnjq/3sYFn0G0vqL3O9TvZkXXci7C0ZPdzsj9eGcuoPDLYB1M+ExNL 9d4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EgGE+KzC; 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 f20-20020a1709062c5400b00993211b85acsi9202988ejh.216.2023.07.25.21.09.24; Tue, 25 Jul 2023 21:09:47 -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=EgGE+KzC; 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 S231537AbjGZECc (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231340AbjGZEBa (ORCPT ); Wed, 26 Jul 2023 00:01:30 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D33269A; Tue, 25 Jul 2023 21:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9X6JJstVeMIx1NYbrC4WUzNYBgnH6G2ZuUz7oVfQO8VVUhW8GFUMsZlqz3EdopbP5IpvYgf68hABT+FNEcTOBsakh6tjxSQ878SQtChvqg9COlCQAD8CPjrE5Po22tiH1FwmPNYbEpcoIwsDrwuMTun8BhJsPn6eDPEAlDS2BoTrBGKvYW9aSn7/brBcvimQHh1eOydqTSXh+k2Aoz1rwU6/45JabFCqFydDCZjNWPUgaKM18NvBI3b6rKbaA8YJ8X7kXas+oyEjWMFYSayZdokKbm0ia+2VXOlZ/A3LK+aJkHZOjiiVJFsuPfGvtB1O3GqVipX9XPrYXJJYJkbGw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=iadOem73v7RXXT/6hi27s3h8fcc4guU74W62GRLpHjkuP17OCDWV1Sl9DxiugzTn4FDV+XjId8t2fkxfLqPn9n1IM71cCV7jaqAUMTzVS6PBH9hBGg39OcFNBjw7Y9NQziy51OWIU1uv3R3ZieLs4ofpPfFqcvmIteGHV4NAwPk24oXGA6Aja0jnqF3/WmaMMHKTIa+XiYZYSrpnJAxKAnLgyaoqudRB34l1wSCEetzamzm2jd+pwzRFgsWosgRP//f8Hb4J8a33cGqF9dn7xerf/f06cIFGbfzTgT40oiUyLVDkHsqOSLK3itakMZKKc5QNf2yvcpkXU2YqsJR9yA== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=EgGE+KzC+majlwTJi4W0ty+AboVwpEOkkZbYHUc+jjbXQ0cOJzIv03jjWzLeOc0tCxdVXWBzvFtbqA7Xcs61u5mr75nF/WOCDRTOgh1feZ6FTM71E3izPiHpn2NRT6okr+8XidqT07ZKf6FgM4r4nMI2F/8mPeTw3YNAf/sb+gc2t+q+dF7rAVvsxORCdGxf+yrdAjtnIiIJiSAQhv3P648p6jDjfa2QcFxdrmCKys/ojrZsKsx2ekJS6+wWUA/eK/JrVkRuEFJs2XTMXKYp55FUwIShAv4YXAg5ERX89oEAMnGJsQKQ7/GmWhiT/l5OrFijKcLCK0NhmB+7ZAzAgA== 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:20 +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:20 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 13/61] mmc: omap: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:53 +0800 Message-Id: <20230726040041.26267-13-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: 617605d1-6116-43cc-f12b-08db8d8cf808 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jW+iTGM+43YsHqyvCaCon6EC6NKdNIjHh+0GRQRWyLRMuYL9FZ1jJFAY5veImEP3Fzn9ELdytPrh+ucRAbyETUied3OblbXgFL04DURd+c4eYPF2s1/fxVz95ZgQku6y14B5Qr5Za+3WZ3yvV9Qp+aSB8pR4xqo2o+FP7htrFqqcNKq0VMC1RGm8FbgNpAAROHnxi0bQJjYuUuHTQ+1PoevCBtvd/UT62PRw9wCF2ckg16g6bCw9BtpmtfPzwmHD72adEOXLXvVVQUvQrjT2+VccPqppwCgNu245f5TcSafoOTRTCgz3EcK3+Q7LJh3AVfEqPC7QXdcMtxR89m0971ptG1Q+iqHuRY+L1VTx1mUCmnCc6RRt+UbUAjMfROEgxMdiX3cpeyV5QZvE5g958bzxK2IsG/7eVypHKF5b7sU+h6iAGwEW/6WaopMDPIwxTCZJvOd7nPmGwp5tu9tGvixyUAi82gQSbjUVNID8Baw4dIXChaXQb4BS42VEp8SwBzu/mrlgbodnJ2nrIjg7Rn5xyGcCvhtohpB8bQWdgJEyln1Z6Dfq2Yr0x9wv1QFvR+vKb78fHMU76wJMWnrjiocSfGl1jzh26h9sYzo52LxjgmEMV7fGWBjxfsaffbeY 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?42w4nS9HfqaVHlYW4LnBMqJ5EyJ8?= =?utf-8?q?0p7PMMbTQ1K85H5nGnlFlMVDhBvDRmqCJc4/HEbPqIH0HiMAywMjJ2EC+CH+vg/eZ?= =?utf-8?q?jHQsS07yi3zlTrBPCCMLqywZhC1EasRH7q7TGPLIDi+nH0kF/E0qKCfm3gI+rK0VW?= =?utf-8?q?yrV9I/gbdqX5Qj59rbYgJiOF1blOMx4j5xyr2MT9AhyacW5rvUDfuKDU8Rhd7q4bJ?= =?utf-8?q?7LPMlPzb+P6CXDOCrUEg/f0OV/XQ4f3W4svOJSwo5UUyzq7ENIXopOQBTERJuCZNa?= =?utf-8?q?g8FFv7T1lSn8soL4yqtzzn5D/0kpv1cTFdWIsLiyBLUhrFoQh56RKEGvVyGEgsPOy?= =?utf-8?q?nb0WQ3KuAxzmrvGAiTIMdCMRJSzOMf32Sms3TbZlcSXsE6958eg8ELtZmdq5+aH8w?= =?utf-8?q?XPsg8vo6d5offZxHSZXarDCC+CHNa0lXVjskpM3NN8uA6OEUVqiBViaBGsu/GollZ?= =?utf-8?q?FBCjOcSrFkn0LJk7xFPaSyismL3AY1tI8iaHpI3ye1TNjCBfj6yMJU7WKjAIA5jbJ?= =?utf-8?q?lfeoZE0tn0gPTOFBE2YVYSZF3rQwd/V+qDQgvSTkVPYlaDEpDVebQwbG7mu79kqSX?= =?utf-8?q?iQf8gAgel8aVK9IhrHLdDJyt5gd+ACei61uXb3JaOE6f3otGWpF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tx2xxTrvHRHLViexc/O?= =?utf-8?q?d2QINPfT8Y7X?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 617605d1-6116-43cc-f12b-08db8d8cf808 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:20.1025 (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: YpqvNS8WdZ/1FbfJR8LTNXfYiY9IQaddFbjszeo/fb+B2sF+TZynsdW5VIUEiYb48ZyX6ZzXg0OGWmvOTvfI0w== 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: 1772454766935358916 X-GMAIL-MSGID: 1772454766935358916 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/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6a259563690d..9fb8995b43a1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1506,7 +1506,7 @@ static int mmc_omap_probe(struct platform_device *pdev) return ret; } -static int mmc_omap_remove(struct platform_device *pdev) +static void mmc_omap_remove(struct platform_device *pdev) { struct mmc_omap_host *host = platform_get_drvdata(pdev); int i; @@ -1532,8 +1532,6 @@ static int mmc_omap_remove(struct platform_device *pdev) dma_release_channel(host->dma_rx); destroy_workqueue(host->mmc_omap_wq); - - return 0; } #if IS_BUILTIN(CONFIG_OF) @@ -1546,7 +1544,7 @@ MODULE_DEVICE_TABLE(of, mmc_omap_match); static struct platform_driver mmc_omap_driver = { .probe = mmc_omap_probe, - .remove = mmc_omap_remove, + .remove_new = mmc_omap_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:54 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: 126093 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp180503vqo; Tue, 25 Jul 2023 22:04:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHwuPqruyzI+T/JmxhBV4ePAFJ3i3UsMK3Ozm4pnNmZcFKfI+BkaZHoYU61E2G+v9uS14c7 X-Received: by 2002:aa7:dace:0:b0:522:55cb:ad7d with SMTP id x14-20020aa7dace000000b0052255cbad7dmr721419eds.16.1690347864496; Tue, 25 Jul 2023 22:04:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347864; cv=pass; d=google.com; s=arc-20160816; b=PNVXA4gE8hR0qlGs7TUa3wtOLLBbVi+J17m2wnUDMccCw5GCwEBkb00W66mS0r9AbO bLzzYTvgc8KuzjpDw3fbO4HgGom9WsTcK3P0wfmbKqC4eYe77mlwWfckwCNo6kwcIukE idrCsdw0qYZJ+pz4o9dZbqAPly6H2n6nK/fDxt4a6DAAmjpRERva+7ZzS8/9xOhWfb/o GQ18i6iASB5lh8/q2q2sZd1pgvRYABFbeF8+9iaFTBUU7nohNcKrfx7q1ojHQDoPep6v trSOQvRnwOIBIQrgU/+/L0qBqT06cC42gSh3swI1Y2e3BBpqolEqSetrduuUkIjFAo2X iLjw== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; fh=Fb6P30QbJmZZcgekLxd4O6Gwkug10RvmDkc4bghVWeM=; b=UEMudj9Nk8/F+8Ejo6r8RaDrmNKnP7kzcnToEKbqQzGnDuainrFS0hhykHHaI48+gT EvIfiRSzbuFoxFocz3wpRXoV025AzYxG1+4Fxl/zntwQhM/W2E41K3A4InM9p9jj2UwO fYEBWLQ+FWH68qJUEembIMZNjQz8TUlAr9C+59z3/m1Mb2WmhUraLVotYzCcBt2SeSrP UA7xjtkzggVJqW9zAq5zPHXoOBh//M8tycZpSBFSFuyoGM7/oKDC5EXRwf2mgCmOAUzb 53/laRGUwmsALlGJJBQ5Rmxap+PGCYccV9AFQO+1ZRqor+cWiMNs9O0mvt/mObVJcglb NsEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=SRBEHQla; 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 n7-20020aa7db47000000b00516a1feabc6si8618118edt.657.2023.07.25.22.04.00; Tue, 25 Jul 2023 22:04:24 -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=SRBEHQla; 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 S231579AbjGZECr (ORCPT + 99 others); Wed, 26 Jul 2023 00:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbjGZEBq (ORCPT ); Wed, 26 Jul 2023 00:01:46 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD3826BE; Tue, 25 Jul 2023 21:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DY057Tfhwgdy0BUfSC9gZwNAeHnb/t9YvFPpdjREDiaHiHeq1oE/F+0SRE/TJHUet9wcTRuEQPa+7I7Hk6W2p4TO25r7hM96jGigf6h9pJ72gOtIq2vm/CCh+1ikxn6ksjC02XewxonJKsGLMXkJCutHmEmHh9TW0joakaJOgdCq2EqJ0S0Fsulm+Z7/2MvebzCX+gQGNpuRMyRApFtKbkVKusA1gDmb+q33JC20IeRJXHrR/0BKavztccsOC1pjWcj6iMgm6p9aVZSLJRsnUezmUNTRqLwQJqwV0Tdr4nI+0lHNfNfEQxwx/hN3sK0ZHApcR98+HSbaumv7tuh+4Q== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=OqqFZ1+en6kCqadR+K9gqTU4KMnMEr0UhAUnsl/xopgKNKnonUqpAaWN0gFGy0SF8jRw0fDMaIY/O89DzfKmL90iomU4H640RWsrTF2yLUrBOL1DEj+dnX0yqapKa/0BOX+I5WnUrFBnH18N7asH+faKZZNk5Nd2byXnmM8XrgrKtMPd+thTvl1SssdpMO5/cuVLxkrBho4YH1A1aRg8M96upNLmBZWeokKW2YGxpkNB93Dc9H8ICP5KarGw796yahRSAm5hw9edpyEpr/Soj8GXJvWifGMmtdrOQ9zF2C8C76n0oLeMp82TGmpBTemYdLBD+LV1MVq2mvUTGLD33w== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=SRBEHQlamksChbKgSfHcY1AqxC/Ij6/BdidGTaxV+EQleUR8zhqQnd4dt0C6A4g6s+w5Gv7br71NSF3GVNu8v4zeqYLA5MQCJInlEsb+jVBOfWHcv73XYqXjmglbSDwwdOcNvxCUbMOY+yQq6BcNiikWCeIIoQSBEeQzGAw9Oq8h8WJ638NpBmNdzx0/yjkcCK2/ySsV7DXXsRz/9qxTi1mSHjH01YxR+DagpUskJv8eGA3Bt04cJfQpvxQw/gOhJtHEcp4jvcKnXijWC7G9/X5zhO8yXwKQb3SpO2SRPVC726ZT+Y0X2yzMIt6FfKfa7rtksCkOFQ7N/IA60IYGDA== 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:22 +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:22 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 14/61] mmc: dw_mmc: exynos: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:54 +0800 Message-Id: <20230726040041.26267-14-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: 90722416-c551-493f-8c1b-08db8d8cf981 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wX6EFvNIuIQd/649CJtu3yTHPnck52lzHQmccPYxKC14qYXI8SlBovs6aFAV/JT29q3doV5BnGud2fo9fgRze8yzbpeWydJXFHcoFby3sKppeQ1ckK/9J9oSmaDfqTQEO1ZhBOIXKP3ilHNqXfHdoEZpY+KZu6yWx32c3TtM9cCYvevGCGT+uloXnZeeVKnDC0zzOPghu3Zdm0yhK8Vhp08Bbo+9YWUoXADn4IX7BvUnquDKl61faitCFyIRvSOEyyS9DpM6bgB/PlmTXyI5z1u+5KAv0eO88rvTdtIq+ciKi1h0CJ6tLfWfWyjxB6zLyWW+vV4tPbD89oMae/fYR4okM3KbuBVdLMvKufQQyoFGzv6MncS8080PMF0r8KkQuaNMERQh6b7WDae85vVk7VZte/8wcYnv3EO1L6fWAnJEIwn/llPehqLrw7MDEQv9iKkl6NYDGRO7UA+VpqaDtpzgYQXu5yPKQI9s1RWTcrYSDzJnPHZTMhjch73DH7qamgu7MFk85SwvX30Sk8uDNBVHqGu63AwVXhQ4W9mzNRY0ctm/RqsqIIMORtADzdR/o1OFqQ56pwMAo/TUxvlwUhkIame3DDtc1gBH3mchbe6Phy+bvrrrdNClWfpBQrsf 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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PcDvSZW1fuIx3dK0Xz+HZOLQaxMQ?= =?utf-8?q?GmqRnCV3P3VSAGuax4BqHWY1TrSrIUFD9Pv1HqtMHhcrSZ8Wh681TmVGTEs+zndz5?= =?utf-8?q?CYs0NRP9v2s0J/Wcty2wnOdo6M2gtprYDhRk2PRR4slP5hDR6CG2w3qu28iPIXfRg?= =?utf-8?q?woMiPHxpYnNC0MOW16K7E6buwlPPgpXK/3i9B0siZ4xJ9x7kGFdtN0u4iJEdm5xr3?= =?utf-8?q?JGzayuxg2kLxVqbyxtXuIDZJvLmQ3Le1jNXtKhTALRUE4cbbWvMIWGMyO6GhShx2Y?= =?utf-8?q?SOjFA/d1GzVkBkOfbgG1a4/PQVxXZgQnPV1YeXRmGvvHxTYckm3kb5QInvcil+9eC?= =?utf-8?q?rxqT5eEyNqbjUhCj3NTk+HtBXZ56YchKKkAEn8jZ+Pv0CUTA7gE2husBAAWYQPmYk?= =?utf-8?q?fqjhhpyMf8DSVI34hwVanbZuxnXhIhcQTFj5apyg6DTsyBjtKtHeVY9MJyPVM0Prh?= =?utf-8?q?HLAD9j4yPx1s7HEMXDdlyStpWcbv2xXRScznyxVP/uGnctLrgt5WNUtXYtJ6aAYJ4?= =?utf-8?q?HawK1Jkp/Gljev1+M8fIwrlwzihgwMsfkQ6D+y5tRbjimR0NTd6Nhq4ch+Yvnkk/E?= =?utf-8?q?e1YpC68LVC2kFlET6h/k4WwnFkfhK4JRGHfK+druMAubvMI62WDPpUiScYXDdz76N?= =?utf-8?q?8VkDIlT1GrOubu0ZFkeeVuo4IioUnV/RXb/UAIGggzn8/oB3FpAc3oVacROSAo9kR?= =?utf-8?q?Lm9HYJPb5OdHT2BH7Cr/SttRuvWGXeXvQNpCQ2Kc3tRgg9Iv8n6KKjZSnFIAuiiAr?= =?utf-8?q?CzYDga93LoYKb9V8cdF0PIq4t/6dD9K1osVFk8i/hbrz10/fDQ/Q0x8qkrFYnBZQg?= =?utf-8?q?a4px85++mGu22A8ngo3Qm+mQZlJArUuckoaOO0q6V3pZqxQmnFvnhUPdds028INv0?= =?utf-8?q?iJBJ2Zkcz8RjZBCPqGO2PbwlqidcRDKvGzd59yXGblg70WtBB3Fwhp37EGBSXYPbp?= =?utf-8?q?XFrufyKCqB/3M61RAoiwx48DPBfpSTX9CznSz8QmEVYiXc+CSskahkxlYbq5DwBz5?= =?utf-8?q?UKpMwL9i85xFTGaSabeOcZyEtr4/32xCMIQWXFe/8Ad+LZCMq9NWeHdqJhM2IR2li?= =?utf-8?q?wzGTJ1YItGnU+CrhKT3S6tZlsQFdUzkDf9h2V5Da6GEGimloW+YGaXxeKRJ4jk2Nn?= =?utf-8?q?MBuA6+5vlH2GYnhoqrp7UZmGavZy+tPzJY7HlwgIHB7Sw88tFR05B5oRfeOAuKGk7?= =?utf-8?q?o1qI5iwdx3qAB3TfXBb0+hW5nxLp8jfR5wfr8Gzxjl/UcXBgWO5uCJpRtHJiJTLDq?= =?utf-8?q?wVJOdndb1llm2337BPCgNupKkayD5Bymd5eXB+/Ig08d99JIYPcY+CCylASN4OvdW?= =?utf-8?q?lYVAIE2VJNVcEyMDB2+JEew+KLJ07dMCnllNFDy63MfOGSWw7b4x9OHHxE4tgNKWi?= =?utf-8?q?qmeBXhKUBh5NTScOJ6BiaRz8Yc1lBTue2D13vXotedXSGyaU2zX2724HAQhw/P5sI?= =?utf-8?q?6wtVJ9Q9T+OV1PYgXE3LZNCyoaCbOczSSpVzY7S9b2taxgkqrPYwVatfueOpUGEEz?= =?utf-8?q?SNyr91UGCdRY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90722416-c551-493f-8c1b-08db8d8cf981 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:22.5419 (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: un1xXXYFNLo+qJhvyWWu9J/Vqx+QAWFJCNkKIO2pQRRnSdYZWCw1tJEMlY7TGD37GfxXfldPngq2OBpc3Ocnqg== 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: 1772458202203659654 X-GMAIL-MSGID: 1772458202203659654 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/dw_mmc-exynos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 9f20ac524c8b..698408e8bad0 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -664,15 +664,13 @@ static int dw_mci_exynos_probe(struct platform_device *pdev) return 0; } -static int dw_mci_exynos_remove(struct platform_device *pdev) +static void dw_mci_exynos_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_exynos_pmops = { @@ -685,7 +683,7 @@ static const struct dev_pm_ops dw_mci_exynos_pmops = { static struct platform_driver dw_mci_exynos_pltfm_driver = { .probe = dw_mci_exynos_probe, - .remove = dw_mci_exynos_remove, + .remove_new = dw_mci_exynos_remove, .driver = { .name = "dwmmc_exynos", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:55 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: 126078 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp173847vqo; Tue, 25 Jul 2023 21:43:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6+cLmn3JUfGrZncKjCiqZh5iiUuN5Ck6s0zB0fT9AV/orB61VyxwN29z3iCYXrbTl8iEQ X-Received: by 2002:a05:6402:3491:b0:522:5592:8f9f with SMTP id v17-20020a056402349100b0052255928f9fmr3885834edc.3.1690346610404; Tue, 25 Jul 2023 21:43:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346610; cv=pass; d=google.com; s=arc-20160816; b=fCuDPWcX1PlDCX0j0/BFovlv1DbTr42RINn8zovxH42MpNp90qDLCtLYC1g/ivEc17 zEiCpOryhf8MlS9qQrvOUr48S7d22nWiL+w4csPWEF3GqUKZeQggt0OndGUGFOjTRLPw VECs1uGLlETau0gN4l9RJvalqEskabHgyiteVfQFBz1CwWMmHqpUGeXkpWZ6jAgyV3ky IBNjDpvXOVtpJavOhTNa9bsv2Adol+bfHflAuzNfSk2x0GTE4xeTLf3la1H03ewz6dqH 9PfgzIWNojvcpqx7SHmZgyLaqxLCccszfiJsYfa0ZW+kJd/xHsFjnktOVLUNid2jihmt lX6A== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=T6Ovq0ZPoQ3+fJXgaddP2naWPoMmWS6mZM9Za8Q7XnI42oKVj4bqMSp1a0lS9DhuNA /JrOiP7vyDVfHhoracaD7w403GEiirN2XJOvyxf4i1sibw6v83Rcw1jpvoIkMz9PzKXu d/appc+fjD+yAQ1X+zKlX463TyetkP8uDpFxGRxisP/78RKkqit1Q7UrvLNY/aEblyxz e+YtfLxa0Xb0msqTaQpFZ3bKJBjhYuJ3FCb2YOMMdawX5OKaCF/quLQaTQLi7vFGDizG FvnP8hOE07MBz9PNK/tqbEKiDKswXPq0hZ1wzpb2TE+Pdw+dXT9ctRgP2pNy+9T2zwvm oGzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bgBDVDlc; 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 b4-20020aa7c904000000b0051e0bcda174si9221897edt.308.2023.07.25.21.43.03; Tue, 25 Jul 2023 21:43:30 -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=bgBDVDlc; 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 S231290AbjGZEDR (ORCPT + 99 others); Wed, 26 Jul 2023 00:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbjGZECn (ORCPT ); Wed, 26 Jul 2023 00:02:43 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FA182719; Tue, 25 Jul 2023 21:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CR3q1J7BoVdICTxRTKDaEIRhIVwVo/J/5cdYx5iDmH4evnxqoVzMscQUMC7fXZRcxUWpKACF69uJH3USqoCbhsB1zWEyjtW2u8Tia2TxexxtuR3rtzlsCRvpwjFAZDR9cv1PKODxmqSVSjyVS6c4m+kwVWKf1QKNgCzDjvgdPcrwCbQqz9KYCXm8OhttKsMhoYTvmcXmF74q63P03DbxCUxYgPvkDh1sqvEx6wTuZONA21FLjn23ktPDt7xOESrMwJNlalrXiQuw067iDynE47ibqWBi2/UUqpYcZhIFjJIGY4xdQsHweKWzHWXmAvQ1V3ttirjC8EvdbES6BLViUw== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=oQrFTfTk+LAsp9wtCF4pCELw09SN665BeVjrW6w0WF0flptt8EKl+vHVqFlwJLlRyRXcvH5R9DmMtGdPQ9QFQPto1Hw3uZ5ZDbAwR5bwzB8D1DGXebE2/8WfsOAOcD3h+eN2K2oMjhB0o4mC91vy4pNaoSOEzxR8EOKMCkOiCJqWbKIJVaf/IpQNcdYjBjoXKXHO242UrUbRFW1mNBZAAb+4b5olBj5voINV3TVVTi+s2t6kL/X5SzDf3j2b2XMyEgHsHcpDz6pd9OeaNaBxBXjufmSG58dwbjl6UnNFlEWxhdPpaku1HY1PKZOx7nFXjazTMosinrXgsj9gOGI0nQ== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=bgBDVDlcbjUPFcfeoFWiCp9OJ2FF74mnalr78lGf0aHOAVJaFJYAAMnAyNhb+uqyzPKOYTgdj8zX6C9TLfA6IGE0U3jYKcksQHhuvUu9hHEecJbd8IphPjBDv/lX/K9l9Py7bcf5hEf+bYumvB1YbqN1iB0Wb2b15N3mGA4a1Vu+d5W29VyNGZaoTcY5TvRmXNaZGlJKVYjHh1Mj9jsNyOdjlfHPywonHzEkCeyIFq6/Uw36857D6Blf2uFNmTXX/cSFXEfK8K5FxS+yMxDQajMOzX8QKrYHRD4omM/1c+slwVpS+9+N/XaNGlJBEWR+0ztt/yz96fhopH7nVDS+Sg== 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:24 +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:24 +0000 From: Yangtao Li To: Adrian Hunter , 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 15/61] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:55 +0800 Message-Id: <20230726040041.26267-15-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: a52f104f-1c10-4f4b-39b2-08db8d8cfa7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UgOTw8bJHF5jZL+K+DfohbK2LsDR2ptEun/lt4i+QOm2aEJJz5qkAhiCp/mEkkI/apQ6lnk805+3B9C9BzyIFlWJpf108c6flSmhhUriMUSq2Oiw1vO5DCMELEcGpSNVPbt3dOno6SWGzo+CSbrwsyKKNZtwP2Rhr8Pa7+H2PrWTICDkCC58LpFSfbM2c9suXrLk62sJiW0IxoAgRx4x0zWQxvjJs8gKuz41/lZJzxpSa/PQfDwg+ORTWT1hm/VcNjzuZDZwrUzvzxdKOu7785wA7H04EPCSo7h5pl2F0zeKLhw4FEnu5BR8TRTvN7h4VppesIftYzqWynDga5hlm/PF3b4IBzzn8dVs5HaH7uRHbtbAR8pei3z3L/21L/U4Tlw0clKh/nBkTW8b/xewF8q2tPRR/2D3OKMmqMZ6sKBktdzwA4d4eSueyr2XLIXEf7hvjQoLFMuyumL6Dp/fT5tu1CGkQilUCkI+VhwqH/qjSQCgDET4y+/M7jXV8xm1MdE2+WEX0vE1EiITmnJCiCU8OHEcUUiVu/evlJZbaP2mIteW7XJAahpAAO0K6agLtU3c+UwXMvMqPsK38tTU7nvwoKVdd2blXxqbqR1O4kRVAdNJIaxoosX/mjOUarqq 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VUJTyKKHOWz9jlkbOgbV6Q0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w?= =?utf-8?q?qw3490gkALDss1s9eqjLwHI2H01loKNxKiwmKpywy1PslalgX4ZV0BGywI6h1NHqF?= =?utf-8?q?+3uhMnz4bJGwzzNXQlz2mirncb6voZNMxH0MDLQ8yVn2CbbSvY3E4nMCliKaQEj4Q?= =?utf-8?q?I72Co3UiM36kkr/ub+RBeL905goKfcPkET8YLxCNfbOeLezl6RRYjxgeMC8YtPWdh?= =?utf-8?q?RgfxhT+OG1S8EzWpLvkGf356kEFW0A+tXge6Mg6SmuFeV/Y++u5tpxta0pgMzOxwb?= =?utf-8?q?pp1dBL1rNYRLys2Ok/IfsGjzMz7hHLVY9EoZSTokx/YD4O6kQ9yjuH/rbPepVNb1d?= =?utf-8?q?0PRQwnfJctEzuSe9Wy9wuvPdEKTjteO1OHXyWkApOr5tu1wZJR2laibcT5jwhagqB?= =?utf-8?q?J1sFqEEkNGg8S4WCguOg3n2Mou7EpAIOjDvbqzSikxg6A9DNByzt5mwggvSJAh+sy?= =?utf-8?q?ajIez0Trj+boOKvC8UZmV+bjJYDtB2Mm0uT4DV7/Xzzb0ODO2nHycioc8zlAlydhm?= =?utf-8?q?fkOZkH3skrauqbecfQphipDPVG0K9LGnCCNm8Kj5oJKorLkAxpM9iNAUN7+lqhzE3?= =?utf-8?q?xU604d9jCpVI7Y7K2tb2zTvsDAER8qj6SrLf9eRUsZMUHI8cttwgacJEH3vtPFPvO?= =?utf-8?q?DJxH9wVT0fIn?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a52f104f-1c10-4f4b-39b2-08db8d8cfa7e 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:24.1947 (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: a1rG/6MweAQylJnsvFvM4cES7Z7UgqpYRe232Z+5q6vYlvvRQ1/dc1fWUAWZ6jpMXWSYFbFsKG6LEoifhd7jDw== 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: 1772456887423145501 X-GMAIL-MSGID: 1772456887423145501 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/sdhci-pxav3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver); From patchwork Wed Jul 26 03:59:56 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: 126063 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163616vqo; Tue, 25 Jul 2023 21:10:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGyUnW/w1WhSCeqIYCpVW5V2k4UBGhCivhOibfOEDByVnCc/UhS74SmxjgKncR5UFBHW87o X-Received: by 2002:a17:907:2cc1:b0:991:e458:d16 with SMTP id hg1-20020a1709072cc100b00991e4580d16mr492389ejc.72.1690344614572; Tue, 25 Jul 2023 21:10:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344614; cv=pass; d=google.com; s=arc-20160816; b=DDoBNXCPECslytHqFksjruYlE7JsjzYNR6z2t7iAJd3vil/ONYYdfVTEfqmRtRE+78 /q3MZviZlRq2leUWDOy5cmxHr1zQlihY4WcVy4QYgjckRZtlxNG4EK2Pg5tGe0UrXYYM KTjM9zjWJpQ9qh2NFp+8v5cj6yVHsEknRpov6cvTYP82ExSj6gjnTu6Hv1pMqtpeCLE2 g83/n91Szy63yO3GnUfQ8VQhNqG2xmvd3KQFECqIj3z97NbysNY6dJPX7dcm3+2uYj1z zP7AFAufFqAOAogIMVn0A+dkQYBG2W1DPvhyf6qAgqmN2nHNBOYbggdQ+8ffvpduTKzu pm5A== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=dZwQyi8CrMa53E/RMKKlH15grNG/SyRpjDSS8gSXiZPE0ZqM2AGHd9KUAsTKQIw6qP SHccAFVS+fMSkLg6nMhr3LoI8uWaihEU1Pa1m/nfh/ZWlgR9zIuNOCnRnuwce0/ttRJb Kdj8rBr2odSaYJr4qAdOCH0Ra+5Zsbl1Es1AgV6Wr0x+VLmZokUwUCDEXGOR6SNTohTV 9yqAa2YL3cSHPz6xZevUp7UWp+4XhPQEkhXOGiXXjp16P1gzKD1+D+frn38BE67byG3E kazQvA4GkJlVK+c+pf8CSUkgb2LgLtmGGx3JaGAzAtV1CmNe7UICh5uTOfMoTvBNx9jo EXsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KIO620I0; 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 xa19-20020a170907b9d300b00996e0a8a2dfsi9201398ejc.78.2023.07.25.21.09.50; Tue, 25 Jul 2023 21:10:14 -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=KIO620I0; 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 S231540AbjGZEDW (ORCPT + 99 others); Wed, 26 Jul 2023 00:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjGZECy (ORCPT ); Wed, 26 Jul 2023 00:02:54 -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 AB96230F0; Tue, 25 Jul 2023 21:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CY5dvD8eVSKw7kSxj+2HqZ5jDL3Xk7YNZWQOSN2Dr+9comgsFcPJKn5kRp4LaMgjk0kz6zF10qpmlmL0u/3Lutd1JvZq1+/hHKD6ht4pzNB4Y+25MoQRFvm5l6OfVT3Ipt2H+/XswCg1w3sRxXcFQVQ3u/aWiOzbeFDZU1q68rLgDN2BOvAt9ahy9bs0zn4qp4ZKwgJehvEfJjw1I4iJUMk9YkQFUAodBUIaVf0JhD1wDupBlbNOpVu7UVMVf0s8WOWecTXy3aVcZLPLivLXVD79AMWBo7bx6DjAHHG1GrlCJZ4DDGqJjHCgoxw2oxulejZv0qIQklRX/hGrZ/nPHw== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; b=X1nXqh3lCJsTxOZPJ2F+UhZGmHqZNL3MyH9n1aBv5/o41rCdKhFR6WFVoCqui3ixIS9l1itrHTYqN5ldtljo3sfHhcjafwo9g+USllbJijUfW7cnn1kY4swiJT9GmbTnhEVAsH6sqVW92GX0vHC1V9F/GCAevGNaoXG5Q3dIuEPDfqkj9X3AtSkkS8S4n/nVBMe5A6EKMG84wjaTpM9xKLFDfZ1P4xioer13f/Mj2sTsPejUN98sBRO8eyQH6Ab9/sRgCHaaNP8zJtFBP4Ekw3j+sk1e5BUovo0FCxsoYKCxWqkum372hquUhopRHlQjM3OQErtOCOaN4ktx9ZdWJQ== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; b=KIO620I07EL6bFgsh8kkO95r5crbvKCyu5PaCh8p2IzOddxSYxhuGYpFWxil0aaiaDaA5cZUDQWKAQlxbqjpFfEspePqwCRrnyIzZ5lVtK6SmfBFiRrpw34cwU0onfeoMzcB0l/XRLoIjbBJpvTMre+U7B/b7Vgz/1NSke2P0BdihHNMLHRclmsAX/xQh+XvZZ/1c9Orz8ueweKbp6N7EmwaxAq4mU1d5GPQvS9E3QJxfdhARl8Gh4X8Z1xSF4noMibRegxSHN5PZL8nu5g3kZSTbMejA6c/WsBwSX/9tG6x66QF1wnVRj6pmrpOTD+tgaZlVFlooRnyVtHs2L1yrw== 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:26 +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:26 +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 16/61] mmc: rtsx_pci: Drop if block with always false condition Date: Wed, 26 Jul 2023 11:59:56 +0800 Message-Id: <20230726040041.26267-16-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: 5202d598-0408-45b3-31d0-08db8d8cfba8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B819JqcATNe9qM9hYXgmqPD14CD7WPFd2PkoGBHfTIOLFCtTI+91dslpyna1fWYezQVloahUj1HgcWzCiVK4jGHVg6FkZW/0nFi9mnbAg6UexVnnz9pZIM6LJzb28PYe+BdM/A5sV5EB+coiDXXQk7uJ8SspO5NTidAqZ9i6UGiedYUwEsG2GaVS/nC+N0W4Or9qGnqPOasjbXk8TpJcPfegGCxEifMI7kZof+uraaM+5eRzgb2yubrjBhD7XZtyNBuJ8Z29zIpTMEMYs8Vjm1T66Bokuh6ehqkZYdJSCDk9lD+AzQAtvz7EG0sBhCqojtQZvft/UCQA18VdHBoOYjNHC3SXqiOkdJg2lId6u1uQPL/tQbp25r+rp+CqtMIwiFh9FIk4gba1NKzY8ud2SKN7jj/7atq5j/UYRNIjTf+aaEDRd1vAjmGM25mNSgdt3PLSzstC1L8tmMFk4mSnaDi8b6O/vXnRy9ccHyP78gVUzmvOjqLYVa1wnxp8kxTExgCgMfUrszsfwHnNdu+/0yzK3/2l3TiL55oBqKsJEnHez1hl+HgPYEdVLHq09mxFnq5xZXOx/9imYKQk893GFyqagWJgQOsNT9o1bhF59d6F3dIun5jPiMjMiLD9y5bO 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0Bnrjyvggw5lDFB8+h9QmDSvHPrt?= =?utf-8?q?S48JquE49MFgJtRhzv0FVkPkXMfELjZl0WQltb25jPvjjUkDPaN3zzDVYAj6jKL0C?= =?utf-8?q?5jzcxb4xj1POz7Cv78o6tUTtpysP5pLtm6UZVqXUsxgYuqyc6d4qye+Je5l00wXgX?= =?utf-8?q?tZfF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yAe7rfs1LhH46LiWIPEKeD9Bpnjv1oJvX5mMN2swd8razXob6XKtELiezcjnS?= =?utf-8?q?3XjAmfppflwdyLkNG3Cbr5naw0J6CP/S+OXb/kBoNSdS+X0vRCEJ5ELYr8/q8/k8p?= =?utf-8?q?/k0qrxhwBzDcADg6dMFxRTW5vhU0e3rvaZvaIdkHeAmyW+8SOMLaYzDym7Rqiv2p6?= =?utf-8?q?+IRMBy9tMXHBFcZQEag7ZBAOhgYG3dVu3+lUk1/hIiY4nZsI6+3wUUGoo1JKUmRiS?= =?utf-8?q?6drVr5MYBBVV7InCEgBQYysvQbz6IraLzw9o3Gssia0rd1ivk8wRYh5tXQdg4itGF?= =?utf-8?q?KVFFfbk666juEPdnp7XyrsxExgZMaQa/uRJUrA17Bj1QLxkhmT9TZnOlW9YSb69Vc?= =?utf-8?q?M+n7mmv50DRnLnnsvabsOEKED8rYqipIukULRa1l7IMtdygewUzqhlinzPWzIaUmr?= =?utf-8?q?ki0MqemskHRe+dh4gWl51ZfXjr9zdGKD9oFYLlMFE0q2d0q/0Elkl7TagmVxs+jMX?= =?utf-8?q?tovZPTbG/O5q?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5202d598-0408-45b3-31d0-08db8d8cfba8 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:26.2065 (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: TKsUSwmPsYn3/wYiMVBsT1h9qk+Xa53U4r5rSrPgJfKH0PqUVCDmhqUebC7jTPa7aSB7uZZ11x7ntT6y4rJ3kg== 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: 1772454794503031654 X-GMAIL-MSGID: 1772454794503031654 rtsx_pci_sdmmc_drv_remove() is only called for a device after rtsx_pci_sdmmc_drv_probe() returned 0. In that case platform_set_drvdata() was called with a non-NULL value and so platform_get_drvdata() won't return NULL. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König --- drivers/mmc/host/rtsx_pci_sdmmc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 8098726dcc0b..062d07c2ae5e 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1529,9 +1529,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) struct rtsx_pcr *pcr; struct mmc_host *mmc; - if (!host) - return 0; - pcr = host->pcr; pcr->slots[RTSX_SD_CARD].p_dev = NULL; pcr->slots[RTSX_SD_CARD].card_event = NULL; From patchwork Wed Jul 26 03:59:57 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: 126076 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp169717vqo; Tue, 25 Jul 2023 21:30:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHx+vzqlERh07AJvd+Lu4wOiASZFwylXxlajqiTgFEJ6E2en9cIOVBZ6ijxnbB4nRL5E1pd X-Received: by 2002:a17:906:53c3:b0:994:1eb4:6896 with SMTP id p3-20020a17090653c300b009941eb46896mr1205957ejo.25.1690345823866; Tue, 25 Jul 2023 21:30:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345823; cv=pass; d=google.com; s=arc-20160816; b=EMsCs5bWzT4aiixQd9+OBULtm1pTk1lfUGvufwtQmx+kvXZG1vZzGwyZYxcSe9Pmgx GPvveOJff/rvF/n4jBdjgH+WrEKxjc7vytvL7n3a4z1ZJugvkb3j891oIphWcuxvcGAU Da88ANX5l+BPQOpSsBcZ0tXOiyfUDrWNuv7aPv5AkOpWEznpEmTzyIRjV2/s6vdso8lN eWhCrsNFE1c5S857kE9x6R3Ntl8E/c6tCMjc7A8msZfo9lctKmb3VrM/O6E7VrY7vQco hYnpPIPqMqsgG/ZJIB9QXb31t+fjw7ps79eEdtfr+6n73lgLt8VsiFws/dBhJT0KD+XD dmOg== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=HCrbi44cxBKf0yRCA0KMmiE++C8VBBZ5e6yiT+MOmpXnnAcHu9i5XWcpc1SxjPhpSL w9cM/g1S2Ju8bTqieInLRQL1N0Q7x4joygGt8R8+sSSgirFZDCAjQGwwAq3/xD1OS73U KJ3lkRTfOc6yygmpxdICS6iqys2gH5w/d2RJ2VJU6ltFY4lfqtlVlQt1zFPgN7hls+HB nXOeG7+rIIGyGNQSEUgT93WSYBNtvP09mHEpcBhRW0tyIqJaYt6TTvGThIw8ByEHT2Lu xa2eor8DWkFztD53vmU8NbJBYtvpf2LOtjKox0mFt6bSrl/4yfG/EZFZwYHi3q6TAkIV 455g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=l8dvFSZZ; 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 gt25-20020a170906f21900b0099363826e3fsi8381078ejb.177.2023.07.25.21.30.00; Tue, 25 Jul 2023 21:30:23 -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=l8dvFSZZ; 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 S231631AbjGZEDm (ORCPT + 99 others); Wed, 26 Jul 2023 00:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbjGZEC4 (ORCPT ); Wed, 26 Jul 2023 00:02:56 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B755F358D; Tue, 25 Jul 2023 21:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kZtutulDGuLLf69uId51baRhx4/cFhIvtzCp1kyCf9NaCbnirBhqFZS5Vh+mIrpGN2gD6S1BVwRTR6OqLnF2U4eD4oA4j0NnHvftWYEl914mxiu8M2tcnmT4Y4smge+MWHGUUI+mvQk6uw0lcE8n7ek60iXmok28KNYoHDEpzCTizpzOuaxU3omz3XfRLERvFkHOo05CZi2PK1v5M2pB8qb3J73MTiEffeuw8VPNpHMK6vNqSFjMXL5hjUAvC4p6dzLMXedw5pP+i6cIKHw5iKpyLdjYzE8kFkdQJiICmH1o+YxF8LfN8HnvyNdTOAMF/paHNiQ6C1xptZrRC1H+dw== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; b=kaaaq+/oP20zEviEOkA1SAxN/Tmb3xSBSh+Q/G9Fh+SNHeqMq48PZOWsXwF6JbSuEScshe2vhp081O3QCR+v6PLGCfgpKFE6Cw0OFuBlMTs+hp+WQXOSos6J81EGbDok3bzFwkGIBdLgyQkxm40VBrJ/QUqALEkPARVkfejY53tQqAbcIquk1KydLR9hOI9Z1Jz2qv/BmFn14x4poAcRmJpD5dG86mU8k3YbQDjuhh5nSs51/iNU0hm/Xs4PwnAnWg0jab9nPfjT6f4bRTgHoVlNfAV7Tq09vvxtkwizzyY+yNGKx0awR0RN9SoSxIar0qKiuzBuULvNeaZNdtUWew== 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=LsBYm0syPr7thxBEbMPEsbcgZPueQUhwrbcvN2FuDVM=; b=l8dvFSZZnZ9ZdlJ2PiAVafeuUix1I/btUOTkgBzPAWv5aUJZTq5lHTgqGGWlZUA0yOE04n1Eu7a/6v8qlJCgKytIqWqeWeHbYf+FBTcVvAmEXOTpQ2cmIUrnp++irQeuWGIRulinRQ6t/zXFwCR/gwOARAt3b21le3J+mNVPc2ZNKlc9tX/a61KOmQRvUjavA5R8ku4AM0PkG6kHRw800uY201f34yTuxiPEc9XiUbwbp/c2GyglTudvdSTMb3FqiTLH3r9P908ubGtslLeve7g9A43uAInIvZ5jzkNUTN9OnNG2ahAzcPfaDFGUbU8gDPI5lf9X+uxUKaELSg2Tpg== 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:27 +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:27 +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 17/61] mmc: rtsx_pci: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:57 +0800 Message-Id: <20230726040041.26267-17-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: 661b1735-919d-41ea-7d6c-08db8d8cfca2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3pFqj13hlJ9dfLWIB3CJL3jSD4EbPnHZ4mjGNYg7NFEIUgNN+YwwBzXz1DOr5R3gpraHqmSTZ4HqsQ7XAqagGUnJt43seQmF8olYJKPLMU2W2BAyX2kpwqSgoeGSqbiqyuR5M8V8ZYjIw9tvLpLqbNFrlXOzohlUSYuQjr/ueOIOs4bQNq+txXUOxfYFYVkFPdI9GKNW+H/BHm8717X804FHgsVyN79QA//A5RTXKcmNWum6muliudwo9+Pw8uCjMK/35v5mfkSLjnWFmNmQAKBlvPx3RfPoULkzrSFJ6C7R0OZfvcooPRNyJ9JUfWPnA+LeSuH5G4HID3mXHL6zwym2iebGQwwgotFN/RKXrnXxUhnby/0gR3HI4CNtwzxbp+fb7wHCbaCLmRTLpIzRG0OD2e9KW1TQ6O8JiMBpR9aaArBAjngtG3Mof/SrgHCKbWcEeeUG1G7mcR2MT5H+JlS9jQBxY1dOjksb/V5hTXV/NWktMP+v9/sPgh3o7mhw9oOAD/VGsfdl7PGMfTpBlwczighX/mhvAnwJZ0ldxqIYK5nWjJG3xuBU3pvqKS2BDJCZK2rVbRw3g5FbIbsP3Wjd6K2rpsDUG2IzBXOD4k3ex7m9GgvnAtCWojQAwzNo 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5TB06sF07k2X6zK7rdgOy8GZphVC?= =?utf-8?q?fcurE8fk5pegt0Li6AfSyOa9WrVv7vGmYhMUzcPWP1Ef+Rk21OkYkXNPTRje6HES2?= =?utf-8?q?bkSNgT1kepUpd32nj1WSjbZV7qc6pPmD+3D+D0PFWUmwjf9t783pwwA8+GC3mBBXR?= =?utf-8?q?raeRbtc31nT2CBuHp5bbjhVtPwVBguLn+IoPNa88R5dT/4p/emZvt/FlIufbn/Tc4?= =?utf-8?q?W5RYnPxz2GfL6OV68nRM3Mi3WNmx+1uDOI/oleW2P4hShu1eJHvbFKJunCmxIzU1h?= =?utf-8?q?CHQnDNb+U4rjvdxFDw8o0wZO49zZR1Yss4egRd8GzgLTrBHHCMlhfa5eKaWCibc28?= =?utf-8?q?MxIhisBRiBrzVxbPjOd4r+7OAOUtLvxOC+58kSe4/fAdZdDXFoGBrObBxaKVXLMM9?= =?utf-8?q?HgAc7Bp0/Q+n46JSUr95GW6cV9gDjTYiYjpHerOE/RHEKLnw4ZX68r6KCwhTlw18c?= =?utf-8?q?6RV2bvwS/dRpcwqn0zNo5nrxxZml7XRVC+2YmIoN8C6+92tWl8YNP2lgiw7rfSAPF?= =?utf-8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6WhM3y5pKroY5eCRaSQGnaqRKHTIbAzJ4OP6B+fqziYpCwcvWFGrWTUnu?= =?utf-8?q?3ESksLO+wNHccwEgdCnOR8iHR0zChGCmoXR/LFzzwHuhJX4RUB7chbjeYywur/QK+?= =?utf-8?q?lLXi0B9KQAaq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 661b1735-919d-41ea-7d6c-08db8d8cfca2 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:27.7989 (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: YW3Aq8sJjoIyuuWPP0k97BYEGpq5QHulhCEHgo9YJLP7TrF58Zt+OlAYNH81hy22TbQM1jFEI1u2yimPL/99Sw== 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: 1772456062567163813 X-GMAIL-MSGID: 1772456062567163813 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/rtsx_pci_sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 062d07c2ae5e..87d78432a1e0 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1523,7 +1523,7 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev); struct rtsx_pcr *pcr; @@ -1563,8 +1563,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek PCI-E SDMMC controller has been removed\n"); - - return 0; } static const struct platform_device_id rtsx_pci_sdmmc_ids[] = { @@ -1578,7 +1576,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_pci_sdmmc_ids); static struct platform_driver rtsx_pci_sdmmc_driver = { .probe = rtsx_pci_sdmmc_drv_probe, - .remove = rtsx_pci_sdmmc_drv_remove, + .remove_new = rtsx_pci_sdmmc_drv_remove, .id_table = rtsx_pci_sdmmc_ids, .driver = { .name = DRV_NAME_RTSX_PCI_SDMMC, From patchwork Wed Jul 26 03:59:58 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: 126099 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp183947vqo; Tue, 25 Jul 2023 22:14:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwtBNSCloxcXM6F9ZgwMEQ8RLZ+QTfl1yLcAjAd9tNd7cM+KwsYv87Mt8RH8KRfindO8yV X-Received: by 2002:a05:6358:7e12:b0:134:e59a:2ffe with SMTP id o18-20020a0563587e1200b00134e59a2ffemr896950rwm.11.1690348490366; Tue, 25 Jul 2023 22:14:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348490; cv=pass; d=google.com; s=arc-20160816; b=AAgE6ofSnRXgrbqbLnG0VYRGrntWChAAoGH+edAiZDM6/mPFZhR1b0Nf/RtiIXsxy9 f0WVCofAZ4z0rQyiTZkvcvdNjxj6PiUPLDOuIdDeH8RuwD7rNUwBb1vWxkUmdhxdn0Q7 XxzVCEh7oMni3PTzk+xeFNmIV23/MOawt82/KBD4fkeh7qkMYvr93RhbThEpe8di5lX9 9dLgJm/aF3NPJ3B1pkzTcWQ7BQzkpWnfvpHbhh6jWgLJolmKICojwh1Rv2028yEVg3vl Jt+AaXAxqWvkNpVnKZledJQnWN4KlqpPurVhruOGMOFG8ojYiPsoyRYPlXxeiZfyzkaD RQVA== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=hW1RgQF/nv5JyaEenzScNG0mpD9Tqhz2EO1br9cnXu5i31UFR4UsMJP14WeLPickxd KUByy/dxobi9nZ2Z4o7R7xcJvpvVwR0tDAYQv+E6RB3UYbbHDzRf1175Z9Fc+8yAr3jC 7stA20NQFwRG8D4ZRQ2Aa5yU27lRdEbH2H45xqdZVCCRCA0LIWR8JukKgQinz5BJA60B 9xqrqmvAMr/ijDwtel072g/nTW4dx6U0qvmE3T610rFfJvsBGJfojiGEiu7j8kM5Gru+ aGA936NXChbKCKdRTilCWTnRINF2p20HbE2fZxdVcSQ7Bc6sc4vUYEp71XQEw7JxUzxA 5vcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HeVOa974; 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 i190-20020a6387c7000000b0055c4c9cc016si12322842pge.598.2023.07.25.22.14.37; Tue, 25 Jul 2023 22:14:50 -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=HeVOa974; 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 S231751AbjGZEEM (ORCPT + 99 others); Wed, 26 Jul 2023 00:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbjGZEDU (ORCPT ); Wed, 26 Jul 2023 00:03:20 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908C23C34; Tue, 25 Jul 2023 21:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOuGWEIf4z7ANQc6Ww1CBYhujHy6sB2JTOgV2MjXo7YEhN6EEFzw/o/bfxra6yv6bPVK8KpL00C91tVlg++tJ2Bh5BSfxUip+zHzihaJfif9oar+se3KdHoce/l6N4WMVWxCK3lYPmOpHDz+8KBNtuuHstlHV1XSFzalnr9562CMQ6Pbk21uv5HIIfp3QgPMRvANiiTIP++wbEcRJM4enSvcj5G9UI19BgqFBf/jOH6mRgVE2Z43dCD4c+NaWMMqHCXOTg85JgYMGkshVtGdRbvH/44SoEMPoVYgBVDXviHvSko3BUetXv+aYtRzsvIMCBXdJYgm6gpt3Srx33erJQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=J7vD7Vp4I8SdWjlY5+/f++Y3kXqtv8pRSHTy3B2GSqQ13jBDDvBb2vCg6a9MQf3069UXYR83iiICaKbIQUdC0RVaSJjDmDR/GxCeyyYiEAcVXxAp/hYZ/3TLXDdu2884cHaTLC/14D4l+6ah+QLbd8g6w1JjdT0byENme19O8xWqIzq3zde2JrktVDhhR7vpTv1TQyZhRzNXIuQ0Rbd/N6IOR7NqWIKxWhvpG7Dp3zACSl5jgtFda5LxVzk4FJFaSFFwZ0fCtqZoSuc7M3UZj0xFRgKCw2lZo9pQWDQKtd02GnslEo3/SCs7hWdTNXYhbnXDHDm4zgFiEnIIxoadzw== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=HeVOa974vcZRLKI/Ih4j+/45gLspk7xMVl6nAEvmcKOQbe+VRYzU8pWKql/YBvlxi5VHL3HtMHRPBEkP4e3W0743/CWQkBB/TfxRSuKkMLzzJciTmdkuXuSmDi8UoCsnlKU/ZUCdvDC8NHuSlmVG6Tz5Dz9sJB5rLk/9gqez1wFxQO9tGOB63IbCg5ATVXt+pd54dFj2rkxRKmqXJ+5OR99qNZrFhab1NDeU6PF7bUyCjXlcAFfbFN1CaYUhtfEiY+k/3bV4GIpXVk5Ku0y+fsXxX1KAyVPNwi7V3+8l2u2MYC6OdOObhE9J9zzEm6xbaY2ZxtStK4t9MyVqlutGCQ== 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:29 +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:29 +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 18/61] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:58 +0800 Message-Id: <20230726040041.26267-18-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: 5866640d-67e3-438f-1b9f-08db8d8cfd6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L/8K3AEWZVJUKb/Zz68mpWSQSMDGAlYgqjWFrcyXp8FLeAcXYyg3GxsXiAN/pfEay7EXEl9wqS/pN6w6mqmhnykprlGucXjjIChDZA7UDMEt3BgG51fm+1art3HzYYpJJazj5otejxYCsFCCgWZVwZkZRb8vhOLGT2exhTJ5wuhC3hDsMvOWOXLfp3/OYXlfLi0f2ZblbsujMRq8ulEfnoPEY51RyM0XpbmoslurBN8KUKnr8guRHmZ4U4exPScPYQnCA8rpaWBPGDfQ/BtsKSS4RCPf+eqGn2+PLDsNgyDoee4sbUCRLujtc+WJMnLp3Iae21LKGWZL3VuCRUhv9/cicZ5474ED0IM6mH+twEoWZZSm0zO+0KGMblYxWPZFPvC/hUSARJELr92ZdzcObmZa1usoVHf2zCjB1EN3iYci7m0fkw+obQrZ/DTDNUMDyN0Hf0LefB3nTFRjWORfUs1L6G4hB6tnqVPCi9osH9nbuVREgTe3NaeCQPsqsMuqxlxY73Sqww+Y8NWIGGSYGvNu6JaxsadqmcNMqvEHfJhjsZyMjnqayve6wdUzbr2B1KXGWo04XRA3ojEGpqXAZAK4ICKDUtgsFeUg8XEvQS0eQmdwOpVdOyPhApBdQsl+ 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?oaCLQHzh4066rqd7j7F8QsPns4Cj?= =?utf-8?q?u1J3Coug4l8uUVKEyUAUHf0qLAsnUVP9rk1Z7fw7T0Bpj6b2xXfoOtdNg0PF9hI7s?= =?utf-8?q?pLAPxEu1g2ctR6Qf/aqOnAvugPwmLKOY6Aq9Ie5uaaeNuvQ3poVz3Rlma6Zt3SpA4?= =?utf-8?q?TG+6psFPfy50mom8924v+Obv2P5FI/jr6hkS+9RzSigE0qChFzEcE4Bm2TRitB4Vi?= =?utf-8?q?/GdDlnUxcAJIuYjwAcgkbwdBAnPaBxyPgtYDPvLnRBu1CZfknvJgPllUQOnqcbGtm?= =?utf-8?q?Wg/oVDi+qe3PHymaJf4X1ZBruRtjS4GtlbVviOKrl05IB27qtnVxB0IMA+yr79bI6?= =?utf-8?q?xa0w9rks8HaXEyX99jqUlWa31Ni6RUThfyMzoPDb9ooStbqqNKX/RvSRWitURDVt7?= =?utf-8?q?SYRIVaCJWz2Ec9Oob2msDol6+DnAQfd771m5f0Fkq+d63Mg65sScXzOVK7Wx7CvXJ?= =?utf-8?q?RmIDFMNAdKIkAsfYuJNFBHtOCDsnA1vqz2ckMZBjHij7oP5u2GlrPtGbydKeo+Csj?= =?utf-8?q?bEnIrGq1IAHZeCdCWXaLT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pmXg8VH5xKT6iQlD2Gs9DS5EdW0WcjBaPA/mopm?= =?utf-8?q?YuSfP9v6Lr8pe9OooJgRxzR/3TwrBjJe7mUmk8iNAQ5bCbejJjnT1t5N/yyuLL5sF?= =?utf-8?q?6mUif1Wb4BXb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5866640d-67e3-438f-1b9f-08db8d8cfd6d 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:29.1309 (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: IunwaduPF2ElWdgq+y8oB6lXUjS6FL4QIhtVrhCKxEvZgDoNM2A+E+fJ5jHTA7/V0i8vXhnTh90cxSaDsiv/MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: 1772458858537024492 X-GMAIL-MSGID: 1772458858537024492 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/sh_mmcif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5cf53348372a..1066e0c2831b 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1509,7 +1509,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) return ret; } -static int sh_mmcif_remove(struct platform_device *pdev) +static void sh_mmcif_remove(struct platform_device *pdev) { struct sh_mmcif_host *host = platform_get_drvdata(pdev); @@ -1533,8 +1533,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1561,7 +1559,7 @@ static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { static struct platform_driver sh_mmcif_driver = { .probe = sh_mmcif_probe, - .remove = sh_mmcif_remove, + .remove_new = sh_mmcif_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 03:59:59 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: 126064 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163919vqo; Tue, 25 Jul 2023 21:11:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGpn5d9el9y+FH0EEWBnsY78SlimyLDfnRpWjBKPQ0F+EhN3aHwZWHm5DS7pBmjnwM7Hb/i X-Received: by 2002:a17:906:9be1:b0:99b:49ac:318c with SMTP id de33-20020a1709069be100b0099b49ac318cmr651443ejc.70.1690344667108; Tue, 25 Jul 2023 21:11:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344667; cv=pass; d=google.com; s=arc-20160816; b=0owAPfHNDUAgXudfh64yMt9Z6doI6VTk6vPn87UXEkSUBiY6W26DVotGlrAueZ3k0e puTOHVkyQzaXIpPJuLIkWHYYU5R4liMGF9mTocNWseLlSsBDVwGDXCeynx79z7cIDxe0 rppJZppfffZtQLazgrp9ngtINOMJK6kZySIpJglCqNY7S9rut8cyvrCzMbxnLDDpXXQU z88LXNPgpIZ+g3gMoxeJbgZKDDkoT2TcIaPirF29H8HbhNvIz+Bc9WWnG5oWa8EqG4V0 IBNoAJE3Wpt6ssaXr2uBKrR0f3+I5FMGe19ntF4FrK/7L+OFyj1dJ8aXG/a9DI2iIjV0 Ovdw== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=ocazOEl168md3fKmnE+ByX18CMvKt2bGMpu4ORckiOIN3x+vaaMfF0mLIORVybn8jn nLap0lBHSrPzefg72A1pEHmNym/dNVO5OrwYsphGEDcpedGAaC6BJ7Mmnt4asdMWV4+x /RBCeYX8+haRgXVPxmsBRb2i6yqYzqmgVRVash/BLYedo1uzJR0/jUWEywaWwpTh/ikt mE3TQLuHJZ9XgxDv7rVzJU+XF5St7B1NW+TFaPoL/oMzwLhe4MdzUmgq7hsWyn6/4rvN ohnNjlt4jp/TkUKYP+aMVBUSnHdSSaxdcyI+2v5b1sJASS2fYfIyi0yhjg7iRPBT96LX y2hA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="fFKKS/Gh"; 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 ks27-20020a170906f85b00b00992e90ca00dsi8965693ejb.16.2023.07.25.21.10.42; Tue, 25 Jul 2023 21:11: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="fFKKS/Gh"; 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 S231577AbjGZEES (ORCPT + 99 others); Wed, 26 Jul 2023 00:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbjGZEDi (ORCPT ); Wed, 26 Jul 2023 00:03:38 -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 A7E684209; Tue, 25 Jul 2023 21:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbXHsr2SfrsSqt8WFFzVsKTLmWka5EbQGRRdyTUbYdKLAmMJygsII/haJobW2eqAzW0X/pVApqgS/TAK2BLBcvabdDAz7uhecmkFUtiIDQj1mF31lhc9DXKNVEjDtvRWqxCDdDMBrZQszmjw011dfcLH+LvlXAn3k4hc2NRiyXMAu83fWTNzqQGtOR7oK20KB/tvRMEDgC4w64MwNFzePDEF1q2rP/bhuUFvOzGUXiRvdj77g9mH4hsPt5BU8fRXm/Lcz5TM7fdZatBaePJO+wZu/3sZs3F/auzuhVeK1+wDGZPuz89L8E2zJo4tNhNjNq4r3VE7FaCM42C5UjnShA== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=MjTZu5C1PBdfXLvYrzWVmO3hnIjkGj3YPmW4f7q/kU1ZE0VNDajI78TSXoRwcYHeQLjqyoZccJrsX4DkHgtH83mBbDbyqYkmm6+5OQr3QkRgjH8F4O4YYrqXjap1KemVlIp1tdD86rqoQnnvKISc8JkBpjFPNoKmcD8PwMKurUrQKUYwmslS8EQg8oFlcpOUo8JSYYp7I5rnFd56j98o7v8hfr74gaBWOpeg4mz6qK4+cNefifVzrPdd//f3JC4O1+VxFpMJUi/0QD7ElHxk+SX/qvt6QYaAqRnZzQzck9Aqp28BZlCSJCbVuyP3Pt1K3xYRafALwn4328oytaS/7w== 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=bTCEmJzZRC/a6SHh4C2nbpGEXcRFJ6SVNGbm/AwkaN0=; b=fFKKS/Gh5hmWJVZfF9P+zbvtcMDVZJvAxjqBdHxyoUGsIL2ib0PXmILaZiDYGwLPhgjvz1HxEOqa63vr8Kh6895HT9dxB676mllcCWKcSwh9uuSCZV02k2z5YaKeCIfKk3NPqvwE5aHSa6NVSqo1s3/rJOe1CZyxAXFITWI1MRt+bsuqNy+nXCLEhFosfDY7ZLuWixLZ6UoMqDeNCjOlB70yUkYhuXcjLK8RFmCuxzACmy4Mz/MPZF9WKRLxx1f+DfjNFigFB3tvUm1dhfArUDsZOd1IzULSLlJ96543kbZg29ocwVVKB+tiWwV3cZjRNedrWwWww6+JPDXpGh3WbQ== 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:31 +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:31 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 19/61] mmc: meson-gx: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:59 +0800 Message-Id: <20230726040041.26267-19-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: 113f54cf-6a28-4450-3a96-08db8d8cfe9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4i+GW4ZCuJ2TzDRzX/d6lVv9THQuNO3JKJaFjG9KKdh9iVRdWC8ryrT0P4Wkw1KyRjaQatkpZu7yM68LPtwyMqqeaftczL4EorImd+H3VxVbrYhWb11qBzZkHOfe1l44udzik1jJ/TIWT7BisLDZ0oERWWuXDcA+1uDcEdntYVL94CB+ySSyGLymfGe+yXwWzdl1FqE68nny7yy2m97XkoTsrQW8zARTOG4x+CEAhesrq7Qs932fRRQPI3zcAC7oj/E1IKkh/7N5gZAmbXbLtM3c8MsIUyEB80F03F9eypJCnJN+AEB8TI1cotVmocE8l3dgynX9EvNw7NxPp6MciUU2ErBHXoQKFbgm1Prs/lYAdkPwAh6kO7dFvY4EPKJSLSJSSGVRXa56hRRsP4NpXVglTqULCeRCumFo6OC7Ru0wO2eTIYv7p6wx97h6/WTQMlmaUmeXRfwRT0X5DpYo7AG995i0D7Py0OaTlrwvKTOkZCmWi/nd9xcF0mzwbjRqT6BIaZfHOjQZBLw/z7DKzP99ceV/qPOQjI/i4nAcmxuPCGo/jyAngXekGap7V8+JqqdKN9Hgyn/vj+lWU0YVHub1Nz4t5CS6oNuLdamHU8wbwnTBiWIoKZpDGo5NdGCq 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gp9rmYgaeJKRorq1/jCgpSLaEr4A?= =?utf-8?q?AunfkGuL5hiHNkgTciHcXGNMpOdDCGANTrpaQ+vx2UkyR9issu1TttBRUEZcZ26Y3?= =?utf-8?q?lq5uxDOA9CGZRa5ywIcq+0LqaQG2ie/dQ/gNeLkuCuGqaueu26TArC3mNCPnNAhiL?= =?utf-8?q?cGe45uE2ADLQSqV9eWrKysMkulVWPjUsycRhIr0/W1k49eMYCX3k53rmpXQRkLH0D?= =?utf-8?q?Sidr/Nqzvjp8brj8HZFHXpssjgv9SMhddbfPcRrIPPvyf3RcE2b8ztob4fo/5tcgY?= =?utf-8?q?1eQi2uHS01ppoNGEOMEIyl3ZXWliZ0U7CuNj5l6Ho/9MSueAys4+hmEHR4A2B1mH9?= =?utf-8?q?GJivQfCvl1TxjvzdKvOpnVBTl/zn5rQmhatilji7xe0G1QmKNR/frVVfhnQ7oxF0k?= =?utf-8?q?zPb9/KcxzxiUPMRFDbii25uEOhoG2BgXK2djqpYdrFueG0IZqxqLvut46Di/L/UG8?= =?utf-8?q?+pf8QrOpjZMdnbYwXl7BFLIlF5tkJJBY2orCi2Pv5AcfXsEUr/3NoMkpPziZIiuKW?= =?utf-8?q?oLxbg00PwwFbBxX9RF2XIqtWHYegT6829khYyX79cfHZCOTVBk0So/5lc/9BT/re6?= =?utf-8?q?5pnB5W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ub/+7BT+Ekoe7vFcaLaDT3tiEOt2nKsxRe5N8B1siItjHkjMM5BH?= =?utf-8?q?b/3taQ/J6qBZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 113f54cf-6a28-4450-3a96-08db8d8cfe9e 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:31.1017 (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: xuyG4YWJ2HTz7FBNxSzQWRqJxmPCStqp2IqjNbn0kK+npngC7Q3nxtfvLEnZMp7EjUUKH+0xDwE+6VuI2FbvHA== 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: 1772454849322380574 X-GMAIL-MSGID: 1772454849322380574 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/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index d652374f37b2..a2601d0ece71 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1294,7 +1294,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1305,8 +1305,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1337,7 +1335,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:00 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: 126077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp171002vqo; Tue, 25 Jul 2023 21:34:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlFgLjx2EB80dRUyw694QfvbgepHedsUNRdLRyDgXtskVnDdfasgmE6qpmmhCPkigZzMyfqO X-Received: by 2002:a17:907:2721:b0:993:d7fe:7f1d with SMTP id d1-20020a170907272100b00993d7fe7f1dmr623325ejl.28.1690346042765; Tue, 25 Jul 2023 21:34:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346042; cv=pass; d=google.com; s=arc-20160816; b=vW9LVOwcN+yQI4f6oW/B1kxHF6oD/Kmiu7pTCiC/3Hh4cEJrcXCjdYV6jH34nTVP1l cEU2GNblSYgI9IaEMAzA/J0zSrDWNW6xLwQnrelIiS2hs6F2Jb06hlU/iL6ZFNqpohK3 wLeQlkFZUP2bHnIgqp6rl6QOyNrPQSEOStEQoeP589YmJQFyreGmXgxjsWc25kSzImx+ Ga1wut38zBpIgH3fWRtNAbeZOzaY0IWVNNQQYBD6p4/fj9fBH7y+6YEY8J1VfjYjmjNr 2Nb5GTKq6+9KKAnQeayXQ6vSNQdqsp5HRysoGoWqoClPrG1jTsgmuJFYW+gNrqkM0/YQ CVwg== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; fh=wNELzKjtDW/UkCeI0vRNNM7WIjF/XKmykMZmmqUnxC4=; b=uuZPNzzzjIH5uNCEiGn59BWpeRTrA15Fi9kh53671wbenrvyNeo1rB1/B59wymYCZB I8+h1oDww/XMGzV/3B0Vg2ANnF3RhJ8kSaRea4K6Prdl4WrPZKiO5mFSz5lHrSXvwxc2 HSByf9oihW1AeR1/aILsZZOzn1eXu1Q6qYYwzS3yDdXfRAPQC2XnIC9e5Aj01fzjRZQf jlGtWkn36/dcRTIv0PPcrBSZteg2Q2SmkF4svZS1DuEWnvctB1JkoIqwfCOWZZla8m5u s8U0tjN1gV/urWjPdfEa08no4WPBS2zY//tcRamRnb5NQbf8lqvWVNyNJUv++w94pToy yixw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="EtHqE/pc"; 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 pj27-20020a170906d79b00b00992acfe04b8si9054301ejb.150.2023.07.25.21.33.38; Tue, 25 Jul 2023 21:34:02 -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="EtHqE/pc"; 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 S231642AbjGZEEa (ORCPT + 99 others); Wed, 26 Jul 2023 00:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231656AbjGZEDx (ORCPT ); Wed, 26 Jul 2023 00:03:53 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B744E421A; Tue, 25 Jul 2023 21:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DTXJD69KgUZTj2u6GKGwFlL79BlJ05p+Gv5e8ng0W4TNTxMspEVKjaSkb7o0nAHpwlkr01UhKxjhq4OXx+Lorrm0Q4WGfyNwBdAAZorg9pjH/AV3X0dy99K3GJoQ4Lfd5IUtAKrICLv3jd8wZnEVk6cx7d7Y31xAzEeTJ615NtrANuPO+LbNzxogb02N8S4dXP/aQ1YGZpeqD7AnBmSfCa4XLbEsik+qUsfuMm421UEVdDDHCT13Vg7a4QwdF2wPqrw6UqNrmaCRYHhny4gamtGNrx3vvZj44kARQrgcr1EFSZJSXPQVW695iV0dWhrcX/VMm7Sj9fLHziizCppY1A== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=UZUokC+k8+odT7uAU1cqE0wG42trolnTN66wiKHPsU3aP6rLwrg6S6kQ4NANoZxbpSCt/6JLbYbC8LWM/dyYDU9aYC/5OFod+kyjKputqr++aL8grzCKC2iGu7PyhofoDJZjRCGaEmAI1oeRHuSU2c/fFF92eijvVPdjYvIriHDU801ae1LwpUJ0XMiWXzQxlUxcfLOjLvdOPL+W1z/9xolE597Nrb1bGp6QgkbbqvDEEXu6OiG2NNj4imDG6j9I4TJJNyOnjUxnoB2t9MSZPoiPM0jnHzVj3Ogv8C3fmYMwVmbsUZcsjBgJ+xCBRJ1Si2xYa42ESmLLue+NX7aQpw== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=EtHqE/pcLApsjrI1sGAcpsDHBbDnRAlsQ1DsYZPSHkIYOQVqYfAbA+qnmqDzN/0VDjYZXxAmgxHetsoW3dhppzkR/RhaG3Fh4+sfM7IGBkLJ71YW2x2sYCOHVfc8isKa5UTLePA6c7tuM7eysUJAO3E337nfkbe4/5fgf2Wk8PfDjpgmkk51Im/qoc7y0j1RFJEguVfXqAPORzrY+tNpML5Q9YeAew0ORSl3hpXLI53KhPD5Y7a6y07DCAT8DyGFz7sfZgihEVu/eNmifFYWIwRbi1wr4qk9ieQ+Z41TG1UWxf7aoXURJ0wf+95yET+z48QALatT9BKyg561BUPyuw== 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:33 +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:33 +0000 From: Yangtao Li To: Adrian Hunter , Hu Ziji , 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 20/61] mmc: xenon: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:00 +0800 Message-Id: <20230726040041.26267-20-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: 9195fc04-7526-4576-f174-08db8d8d000a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EOLPvLgUmj/KlX4kWOaC1X1eFDvFeAph+ZBKZzDfUESQ+c7ua940Ec403ODv0SsAc37LVONQi8topJRQGJCHLS5hA1y6uRBa3wzaQ0eUZMKVRbuVhxxDSkp0o/nPkTL4GPfV1qz5K5rL7fOqCpFGXY9zGx14npc99QBMxRp6On6+ArsIMXXDO+ZlF9hAdwk6AUKZN/rXQH3BEn46PEoqnQ+7cKy6Hs3zpxyj8T5wW+xsBnLpyGWk97vcpIWACNqOWzovCathyhK3MsR+Np1rqp4/qAX8JvgqucYb9/S7pxHzAcwMcLQvM/CNEAzA6G35xOn9ZU0xHNss+EcOe+4ehoxKESAlQRA+iVfHXhM5IxvnWUud6X3G3wmQwlak4qlDkDgXJ2Rro0Kjy3CqIQfvRNnVo5RMGFy033eRLlti60Cgih1QLjfoKXkvHGDociUia0DfK7p9gqFzypt4NClz0jZNFJZIordDpUP8Xt46ej7WRQmX88ZIowBwBMaJVQ5ZyGLQ5kwlk8k0hPoVfFSrH1ApMa+BnmG/Nv+yjTs2V+mk5JzNArnqkwvwKtcuWyJ62pk2J6fcJ4BioftyEd+K3/80g+lwoIuqcmytnrN9wjtkVPu5WFcLJ1cfl5/Y3gpo 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7pK3tX23mkDul6AwFHEgo1ysEP8O?= =?utf-8?q?kuNUATT4Rw26KgvRSJCn1c+zvCq0RLNgpVLCoeIWVNVY+JXI2ON34XYzAR24wo8qq?= =?utf-8?q?LFNjrrPyZJiUcSXKPuER3qDDhH7RJct+jMR2wd4G+AReVL7kXNw4Xbq3xzCYStPpE?= =?utf-8?q?5fHe5eDNBDvbXtjSIJg2WHvCHK2VfMUH6PIkT/Tw9A1yX95j99C//+g95rR6jvjA/?= =?utf-8?q?NqxYzlU2bOhPjmuqI/3olpGqPv0Em14PvcxBRQMysCbPgi6Q5KSq8O1LiJ2wdMytt?= =?utf-8?q?KWyMKBzjc/c2/6RRVc7QtqCbfxeTVyCvTgVWk/d44ku2EPqEqCC42dV6PDpa3OoRj?= =?utf-8?q?9aIs5B4CjnHLFrlAcdHHvchGaovIwG6FHv8UbIvd+ptN5znehQVwr+nyqO05Dk94e?= =?utf-8?q?4KCnooUyClV6c6KaMPmUZxoJC/7KV3sBuKrQ916II9ty4VAkBxaVl1C/H1ntiZMcq?= =?utf-8?q?Sea4+GnNury0HvPY3Kuq++abzc4PsRoqjqD8w+/kvbMcy3aIyipaXk2vL6xG4TP0c?= =?utf-8?q?QsWMpg+7HVlnQm+0Y80wAsuN04Ypwk9+HMh6/XPC2n/tHakeyzqKgK9p9S9w+fW1P?= =?utf-8?q?AklnT9ltsOVnckJXk3IXirutcBHIw2M12o9qVJqWizHoD75HTPY/op0hiT2GbXqX1?= =?utf-8?q?HVIfGld3+tB5fW2+9Fj+7kHCcxTTcrMj8qIDHbMWzMdwyksoeIDh5SIkY523KGNy3?= =?utf-8?q?OjuXSbdszs1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08db8d8d000a 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:33.4898 (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: R508bRrtVvNwVFdspoPTKOLOPDFnwShiuxJqMPiped+jd2sV2Z36uZo7RQ1aCaDHJnwlcEKT1O2xoKGoRLRXkw== 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: 1772456292016759652 X-GMAIL-MSGID: 1772456292016759652 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/sdhci-xenon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver); From patchwork Wed Jul 26 04:00:01 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: 126113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp192282vqo; Tue, 25 Jul 2023 22:42:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHA+VjNIKl4PIhy6RRw4Eq3fR2GcqHZVi2C24rTRLFrfNNo5QdLDZxllaYzokpyi2s6s/62 X-Received: by 2002:a17:902:ec81:b0:1b2:676d:1143 with SMTP id x1-20020a170902ec8100b001b2676d1143mr1463428plg.15.1690350121206; Tue, 25 Jul 2023 22:42:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350121; cv=pass; d=google.com; s=arc-20160816; b=hIBus2MVxmA4d2sXg1sRJ6QKlxm/BcBKGUfrwoUQ7EJ7xL/O2mn/sKGxMFW6Kq6fRc rOteI8VvrA7/nVMZVfZtcjBXlCuz55nxarLuSm8Ow4TUu0vrVANy/l0JOz2bw1DgZZuy uFso2iTb6gJQvxRoiQzRmG8EGzmFa1EaGzZ2bzxNN6Yjfxipih1OVDimHGSHmINYOybW UnmTDWw/t7YMRekCL92USpqEdfZBJyeS6Bp1Jm+xE6V7knP53l7iUEjl/PIGY/l13aGh OEnswCI2GIsvHVsIEP956o36eQ1CEovVMw5gPvyVjnOrBPfCsByNO9c2/sSloXcUTBTJ vJlQ== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; fh=HI3mf3qn5urF3Qqt8rhdLClhA376IKrKE3n9wsAV9H8=; b=rGZqqZgz0nHnIKOxJtgr2keFVSQhT1UI2A0TUb4beKScEWdpb0O+XUzk00IHBKXTyD BedFeBea0/JP56wRU4raiiCefvNQxuBtky3RobmNEw2f26fSsxdTTIcxn5puZdEYSYPs c9Vs7AD27oA7DurzReNSkRnSu/yDTtIw0wayudcYGgDQoAHpPC4bXPme67gtZelyM0Pj evHO3hwN2wQh0jTzwZ/8d8y74LJiS8x0UC/ywnlzu4PaZxQZk2Q/+pFX+JgaxAAUAjm7 7ib8n+0HEqiEhQoUkAbYHxtsXCMfZmHl8aquvT3w2FQriUOkKWBi0v/BCi/tqWG4KJbU KDTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Yv+0WnfC; 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-20020a170903230100b001bb0fb5e06csi13378487plh.483.2023.07.25.22.41.47; Tue, 25 Jul 2023 22:42:01 -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=Yv+0WnfC; 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 S231225AbjGZEFS (ORCPT + 99 others); Wed, 26 Jul 2023 00:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231214AbjGZEEQ (ORCPT ); Wed, 26 Jul 2023 00:04:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A4CD44A7; Tue, 25 Jul 2023 21:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OGIENbdYjRbiGW0YhVP0b07eMC5DMUN5orG8xs24xgp5PF62Empy0NE9UEgPCp9Y8/xUgeR7h+vTU9QJRuHgRNVA4gYFpnV+OR/f6SDBF8XWv0lghdTzglTWgeGCIO9uP+KZwgsbB2BSenCDHw6S4InRKGHH6NlsQ5Vh1FgoxLfVaCukZJnkLnjjNuEUWnPJWaP11AJSMHz370WlDUw5BBP7KyFaTdBkg88FzpWOxPrupuuOuaBn5YoByp2HITIL4x13hGA3wboRe+D8mCpVV72IIwfjq+DXxD5qdG8nAWcTn2HTQCUaBLmtnNAIi2TMz0lBP7ZutLR1fOu90v+KbA== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=KkakbZmMxcK4WMzOpqPm4Z3atFYKKg38f1ef3u5KurRK/ZY+i8qtYpv+fammfuJToEr5Wsd9dmDKL9hVVHTr2Yyy4nT1EbMYghtNMsgiDS8qirg4WQDpdIt04IU+kqcmrq7YktIFs7XhVAYgbeJdSUS4xsMiWX3R2DpkYKkQgwolPzmQFObA/NDwkazZXaX5ZO1Ekwgm0MX45qxzJQCQ7qoAaNlsarABPIuTHbaVmE+FgDS5mV4FD0AHfJUW9b3d5bWvBIUFUApPxdeDhavAMQrTcWcvymmpALTfSi22f1r3AJyCYKjGZ2raiv2FCGynUXBbNnc/5EM4TaTc1V076g== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=Yv+0WnfCRU7UzwqiIqY6jAU30ernzXVcfJT4DzxlD4KxWJbS4l5RHGJ/mkeumE9vHeolS+v0EhSS0GKfRXEUD/SatGoIs9iBcgQamgX3YcKtLty2Lw4FHfU+q9IIVOyAtLQD58GAbA5iG8myi/d0z7Raw/tsAlHVnn6+PMJJ0eaYzcVBys0TpNm15TynLilVx5B4LUFiTKmkPKmFo8SHSsMuTfSGKRPZ2WIXTlYIU1uC9NGniZoHCBTqW5iq1UY9ZGbCrDp6rOWeguJ9cWk0510XItSyRSy7hOtOkLM+FSuT7OtPNW9/gisUtRLEQ8CK9zA0t8Uw5z0zqokOAXFMOA== 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:35 +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:35 +0000 From: Yangtao Li To: Adrian Hunter , Ben Dooks , Jaehoon Chung , 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 21/61] mmc: sdhci-s3c: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:01 +0800 Message-Id: <20230726040041.26267-21-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: 39a1a542-a6ec-44a6-9ee9-08db8d8d0107 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9VMWCiDM1IY6H+4vXU5+gmSA3r0RwIMTJrjfWCMK+Q5stOfyQVrKohh+K50fXRiK06epvKuCE+Dn9qXASN0VZCPAM7E7SAh6SeLBWwpxh6ibyJDjcgnRrHQoSSZpU8Cv5uxLzxEroJuvxTGUho71b0VDQWaHpzIy2fJMo/iS7XChTcHiSBCI24spww7MFQlY0qS3B4mbAtSZHlUaJeZ7taSXmDUSFms2woRj5SMCVXiVvbzk5x881vC9/9nYCF66rpmsYBCKu+BmaDF4NsygUzwPdcj9fRdVvfIcN4Z+R3UGparCSM8vhEKOB8arJYsSNZPdQHZOe5uJuH9Bgvrg0JMk8LVm6LNOjelNLc4R7icyzS9F9zhufEBI36VGCUm5ZX05r5yGewEvYlppDWOTKi9YiS2YwvASf9FX4GsaXGZ2I6jxk5Ob9GQeCmlGcp42hxhjqBmGTHw/NXP2xsQHjXcTmr12RRR4a66sTwvweyG6/jtJ035i1YROwfA66N1HgQLhCocQQWdsCxMil0/15Pi3tWVDmK69ZySQHVCI7xS8E8LSWy7QwuZVN7hBTghXlQ1fWP91UYpeHMhHOYnFNQ1j9ATD4y1sdUOo5LEFCNbQnXOtwwNlLFKZwGm53jx+ 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange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GY94iraErgg4ppZolDGpfx3pjB1yZbGsQ8CPcl8xDxa?= =?utf-8?q?AJSC6saXM6Tp1jw3cOW1MhWAuQAslf902LXX3+b1iHgHOYgksaRs9ufQck3E89FcQ?= =?utf-8?q?veE4CClkTA4EssjCvpYsqnBP+9n/0Hx+jlgkV0cFgA+Bm5n4xWx4fRkXJ3lP5COv1?= =?utf-8?q?zKNqNamwQEEeXkbibMmRVQ5v7Xc+bq9DTXnBjpOeoFi/TN4mp3AO3FFmL3lNkWkL9?= =?utf-8?q?2+fL8lqP5fyE28O7toQUPvzzbeacxPT/Zaxp9ZxcX7H3ua5+ueCKqjIlmlYX/b8Ra?= =?utf-8?q?K9qtS5//XHmih/NKdCF99FYn1tZTS+WGwtwZQQ8m3LhT3Rt1VXcCRHquSJvxrMXlO?= =?utf-8?q?KEIsmVogHMKcFD2wblLMYGawiGUu8FQuhS6FVjL7fI7nxd2u3dbdt8oXkd48ugUd2?= =?utf-8?q?rr3DzBy0CIdLj8HNbXh1ZNKarXglM13fOBcL351jNAjqmFEg5lMOrn0SvpmgOQcJU?= =?utf-8?q?7zrn6LiBKgSQ9mR9hZ4XqPVqPo+ZRXXzeIIrUUlXq9il63rL6IE93tu3N3+CDv1sE?= =?utf-8?q?s2kD2fJJrP6YWs022L5vyDUZrq2z1Eq1uAtodYPuRpe06z0CIgsExMuCUDq4kYL+q?= =?utf-8?q?77LsmmPjm6ZwTnnL2/5mGyc7rHMQ1wls4OWGohkOK6ApjZz6q8WHvxT8DMwkres2X?= =?utf-8?q?ofLEd9JIxbsA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39a1a542-a6ec-44a6-9ee9-08db8d8d0107 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:35.1508 (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: XgsziMUJnyKkrDRiYuAlX/GatOzSfry+HMJtTdSRasSp8qJjJo0YT291pHMScVMKgvVocAyIT9wFBWCOr5ybbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: 1772460568888345338 X-GMAIL-MSGID: 1772460568888345338 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 Reviewed-by: Andi Shyti --- drivers/mmc/host/sdhci-s3c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 504015e84308..b61f12d328e0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -668,7 +668,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) return ret; } -static int sdhci_s3c_remove(struct platform_device *pdev) +static void sdhci_s3c_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_s3c *sc = sdhci_priv(host); @@ -688,8 +688,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev) clk_disable_unprepare(sc->clk_io); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -776,7 +774,7 @@ MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match); static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, - .remove = sdhci_s3c_remove, + .remove_new = sdhci_s3c_remove, .id_table = sdhci_s3c_driver_ids, .driver = { .name = "s3c-sdhci", From patchwork Wed Jul 26 04:00:02 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: 126066 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp166423vqo; Tue, 25 Jul 2023 21:19:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlH9lutDjQB0geHozmUuXiHwWU+ouS08su/a9dAFbvTB5K9E7TzG/FnQ6qAgrBFbadxH3+qu X-Received: by 2002:a05:622a:14e:b0:403:ea66:80f8 with SMTP id v14-20020a05622a014e00b00403ea6680f8mr1329769qtw.15.1690345157546; Tue, 25 Jul 2023 21:19:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345157; cv=pass; d=google.com; s=arc-20160816; b=Dz9XEBnF0aNSkzsm9RuUk0dIkVjMwU0HT36uqPlAjTkwr+sed5rbaGLWij2ZXI9pX+ ZA3pQ3pa1V23fLA3cN41sVEfO9JQF/tqmNST9G6iL0S9OwkvNT254OMN5JDoZPtodEii 9RFpznvo1OWeT7/CTeBHlYTlt5fS2ikVPmyNwQz2s1nfbD9Pk5XWMEfWMebW6I42YDMw 0E95VwHB3mFwLaeL+N0a5+Hrn2Kltjx1dO6iQQYtAdaM+tMwbQ32DCT96BhMzmWOzOYw W08VA+e0Cz7/daSBIABrKnmOOeIZEXNkiwYuqsbzMqcZgpxR5q0g5VBcQaUTljK4hD+t LUBg== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=dBo/4mRdoO878doCmCYb9aroXtioUnRZJ4XkstPs11pilMSFHxHcYynNk91I6hzncP JEBI11rTrVE8ZG3k0DNKROt/I7vT1ELyNKnay9/RMe0m3NKrTmnzKJ4AtKHMzdnmowL/ mqpbQGWcor/Imld8Jl0QbqkhsoW8opP99W5Q4uuuGbIXaVDY3LbOEQyDCdU6SBiBdrO2 N+Kwytq8GMC9YcG1Ip1LOyAQGXWQLYOwO6UjMNE4jrf6gNOjVYgKRvs64pwFjomRxuDQ SPLIDIhipf9SZnN535E8GqqfjxDXhl9heDDFThV7p/wqfzlzMivbwmRBkiKWJbr5IdPz /XrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JQwIM4Gq; 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 mt20-20020a17090b231400b002680f4e8969si498354pjb.95.2023.07.25.21.19.02; Tue, 25 Jul 2023 21:19:17 -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=JQwIM4Gq; 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 S231741AbjGZEFW (ORCPT + 99 others); Wed, 26 Jul 2023 00:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231611AbjGZEE1 (ORCPT ); Wed, 26 Jul 2023 00:04:27 -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 6046844BD; Tue, 25 Jul 2023 21:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDi44R6Md9yq3qOWSMrz6qhSuchzdVKpi2j2QJmVK5Hch2p+vgCrQqMTPo+txgvUoNsjRe6HIoNXp/Ayi6500ROkb+CRhhafDUBpemKHHOqib4zu3yKEGtV60C6NqlEncj2F7jVJYARTMDLau2d9JgjjLkjmxmw3M9646nFFIgdN3M8o7oZWPd7RNNsUkfK0UEW2gjrP7/WT4ZktPKckr0xou1mgcZp4dHgGsBV6pXSGvUigBlDjT0Il/WcpoEoszbdawRSpdSGmE99mrE+Qpia1REU5PZ61112t40Q7R+oZ+XXe2LqetxUZfD4j4tYwz0NqqvQoGuAEGjFdO6P8Kw== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=Wdi9oykchzSYOHzFakbeSpINkVgKy+QTw5Q5GrYzXQO+311YkJdUIde5EyBvtYmHbFODMe8YCaO5FT2mMDH/RutSzRaByL4O4zLwU/qhvuYnxB3l0BTbiX+dZkRUeiHK9EOsbSB4ciKCPVvzGAVKrUvij/q6fV2GmeLmMhrrY4/967wv+iyfOkYjDYmM22buAAZV3finv6OpMpHEVtrJ+3qsnS8yHalgdtdUdKlIJquZsGluJ2iMyMJG9mu8VpeLy4BMuTtkjTHZ1S7JFtTcttCEHBFCOeYUVRri25X4IA2rvJM7SrvkdjuTcP1DBBV/a4/gKYOusuJIrDnThzI+gA== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=JQwIM4Gq0O6mme9RE1jswUqf6RS9Szf75iyXc4rFsf1GN598M8FWYshlwrSAk7iIs/8Q9jdtnGhdxh0lfnCBD/IW3MvKsQ6ZEpWKl92Zv6brRuzOHs97X046PJmVydWVKUGaKGuWm8KZZd9CNTr7kx4ofhQCALvFq5ITmS+0QhSSQqX51et0WwVW4BkAH/T72IAy8kdfaH2JiQ/cxLGz/QYFqc38fk1nt+CEvpynkg+nhPbneapL6kOb156wxOSg0/5R4ov6qwW944oZBPVC6NkrT2PorR5nC+FoFmkVcUROxWgpAikskf40AiNzC4zmuVHJMjTLIuKcA2GKvWm5zw== 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:37 +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:37 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 22/61] mmc: meson-mx-sdhc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:02 +0800 Message-Id: <20230726040041.26267-22-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: 6a4784e7-2cf4-4011-9701-08db8d8d0231 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v1qcFDg4jJKOW6mioWJDixaMChjEwPeXpm+RJCxZaz9gpykywkHSggCpOGZqtWASx3iVPhkLfB9sFW9L5zttE3QcUWSSXy182mbpT3lDgz0G+Xm4SVsvp7+zIA72fs3+q8Gy3tX+uqgPwyWvLnq0IwkxTjhOsFYfwXaFSk6mOcgSxm6sSppcpW04hcm0QGIoxk0wiPgCL4fMdwABI61sf/YpShMKdDjVLzcx7OPAjuJAbxy+hQ9TbPtza5ANqnVkspjUYplDB6YbSBUHkSu+Hqq5VFuMrp0BDJJuo83SgDpkrsA6AU4dkB/lR+U4cFY1zSBgHFSgdqyB+94aopS6u1EptVzStgIehkDXXIMn6615SIyRsS7zxeXks3bKlqG/cNco3m3qEYl7pGDConyoOz4/klbYXcOdHn++OO4iuVTD/+IWUEzSBU9YQtXehD7rZAfpR+8mB6+FhJBIjakBzhvH0IdG2lci8FPSj3yQfyyvb52MuKwXNWnQ4iPMIqWsMlZtswOO6lznJu+wSIg1fitz2KpHmQ7z+886afI8cgp/a/NF1CYD9T8QIM9qHYgxiKtR8gilJ4Bm2Qtigcs+InDjeRU/blZe9qi2MtKBAsW/3rgMdFtRTXcZa7lXC0Gx 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?u+/o+m6kTUNt6UxLMyO3aLhQ/NM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-8?q?8G29L5eiAzQq3IQ99lcK08Bff9dxfhYvgwFIp+4Ai8wYoiT4Flaz/AuTymYBBvK/+?= =?utf-8?q?j0zv2hFFq+7wiavWXzIZP8st4bDODGEuyq2kUOYHoic6bMn7CvW6WDOcznUKdKEnB?= =?utf-8?q?wpYgcGlEhQwcMiW+ooDKOLjXt4Un+hyy4irlHlKqa7QfGds0Nc3tzCdrd6/cJx2zZ?= =?utf-8?q?UUW4PxHom89uUWSFtontaWYA4KYuULWg3XaBx7dDKVvRm7OWJF2hElqmeZjBRTwjT?= =?utf-8?q?cB+o9yezV5JDmYrTsU5MbAQNJDGKg3VuY7pFe9ZXU1Or1vT1ICH8Odti1POcC8yp4?= =?utf-8?q?uInyCl7vxDsP4G+SrPgdbISj/qNq5mLhpd1fFeb49gsWgDUczeUxadjNNY98/arv0?= =?utf-8?q?pb2xRAuCn2fqkvAgR0aMBB5aZzCjT6EHgv5S3bQ4ehvG1W3aArZ7q/gthFOq1Wfpt?= =?utf-8?q?7qsuY0Kbv/m0xYDt55yu4Z+KKGUHzZWuk+9BeM59q0AmC5K2vjMQsKg+DtoRVftui?= =?utf-8?q?fPPZkwbMIZQ5/hhkic0dEoiUJMuvjKDliWToK2xAit3wmWUBCv0hTHbdGwKtEKt91?= =?utf-8?q?yxrV3YtR1Lwy2HpDGkRJ6qq2Orgec5/VvJfZ9bo/fHuP4zvaEIJfjNz948tyFN2YR?= =?utf-8?q?LfvIcBX3bfz3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a4784e7-2cf4-4011-9701-08db8d8d0231 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:37.1039 (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: +9W3+n35eQ3N8Ur8wrxX6ggzqLhKuGP3SpdFsoFfkefJyLzixS55vNNXwmcOWg1W/mb/KM3iq2g4g1bs6YBtdQ== 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: 1772455363746569525 X-GMAIL-MSGID: 1772455363746569525 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/meson-mx-sdhc-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c index 97168cdfa8e9..528ec8166e7c 100644 --- a/drivers/mmc/host/meson-mx-sdhc-mmc.c +++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c @@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_sdhc_remove(struct platform_device *pdev) +static void meson_mx_sdhc_remove(struct platform_device *pdev) { struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev); @@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev) meson_mx_sdhc_disable_clks(host->mmc); clk_disable_unprepare(host->pclk); - - return 0; } static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = { @@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match); static struct platform_driver meson_mx_sdhc_driver = { .probe = meson_mx_sdhc_probe, - .remove = meson_mx_sdhc_remove, + .remove_new = meson_mx_sdhc_remove, .driver = { .name = "meson-mx-sdhc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:03 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: 126070 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp168921vqo; Tue, 25 Jul 2023 21:27:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlErBgjzkcAYZrOysw3MGe1TU4HiqRykaPtG0gU10fCDTCVlx3Dm/+KlQWV0VGoq3aW1yaQC X-Received: by 2002:aa7:cd65:0:b0:51d:9ddf:f0f6 with SMTP id ca5-20020aa7cd65000000b0051d9ddff0f6mr575262edb.36.1690345671907; Tue, 25 Jul 2023 21:27:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345671; cv=pass; d=google.com; s=arc-20160816; b=Y2WAnrfTp/lhLrEGh05ZIlsTSpaKIIGvtnK9GtEqMJAAAtiR91/59Y8AzAaxLtbVeO xHuc8XKw8AQS085M+ENQ4q3vSLnmFvTIK8dqM4h/+DUKaCYYP9ozSO89CXg4JZ/WbqwJ EYZK/ViVvx3eYrXCjGMhnMtzUCIdzv+bVRk9+EmJwS0E53wxzkB35rp08Bch8r+JFI+b D8xOjaFajYxPq5LzreLdYzupW09Hj4GB0ToPMWOdJkhZz/8uYUOOG4dJTPOXIRTDoIfi zRUNqcFAFzxy5R87VicnKP+sDsytr/FVtTQFvzL8Gwec/NcXYbXtZ+VFGVkc5m8qjcW+ 7g+w== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=hbCrxMc2aSD5u8l9TK9JeZfUn5icXU092OGwlVJcUjNoGhioouE3Hqvwugj/NnK0eE jaqdDAsI8XpzrGg2b+rKYuMLAyFb4K/w4R4ri+qEcUXFfcVh4hXJV+NhWQDgrX8BhrXa PrjAdf7zIhfRSbaWCmz+yCQsgNLVqxGgZk/wSZ3mCasFTCIiwzBA6LO+NTis4P2h7jpW 6PgexKAMKu+W1ilrFfHcHa8CDDiV8z30z9z1eX3eeAHRGGqvyz11cEiNTrDO2E6Dni68 MkLhhQPawb1D/YSUXUWtupVLOfoWx3TP7nTDOlGnLc0C5hLbnUqEM7daWGCOCPOEAwEm wGNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q845ViZ1; 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 v10-20020a056402184a00b005217c38a4d1si9140246edy.169.2023.07.25.21.27.27; Tue, 25 Jul 2023 21:27:51 -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=Q845ViZ1; 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 S231756AbjGZEFe (ORCPT + 99 others); Wed, 26 Jul 2023 00:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjGZEEn (ORCPT ); Wed, 26 Jul 2023 00:04:43 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2101D469C; Tue, 25 Jul 2023 21:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fLfu9+Qs/BNPffXQB/Dp3MMPWkVYDSDbojNbyWJqyS/ajwWlLXsTD9NDINuNH3raoPTkuOePmUoHeciG2UWeCGWQ7cmLjMwXN0//9TzOSpQoNGza1ppozw0RZzQj+TRMlaHRuxzoIX2J56Nh6+S+eonPTTM362+iyAaRQkF7lRgH4F8FwDWxj6qic2Y694XCZF3mxWTvizHCweJWIeDpZ3sD4ICVzZy76gNT2yViKQQ84MfUk0wl1tSa4LWIzvHORkm1SIpR2VEt/+1kOuZWD/hIcJrN4Ccpv09N/wzClh02LxwqqnOMkOFJ0jdaELrCBqNwTBBGYPhm321xTb7FHg== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=PkH+X9z7iwL26R28YXdG16DtJ1d5+jzCrK44jy9TjvIpq3GRDXzkfiAiNw8Xj8ike+RZgq7Dk1RdpFc4I/ZGIQzP4fVDPYWQVlA4mTRiNBbjsPkObKPr9FcZ6wvC+MDW60ws+1VIMFD4zvXm0Y9zH2RsY+0QnvyIl5oVmWDVzfOK1VdkuLg9CcHAKy8VkVqN1gda2kug1bSWMLMIffk/oweOA1JzNl79Q55FdN04BMHGH1vJhL2rSIlX3REtp2j6yH4IiEMNr/WIyUpUnuTHEIc4t+1is2rd+VupH6bBiA/OFkqm4vQnBt5K/iZ9l2BkyyrGZ1umTN/2tnKLCTceQw== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=Q845ViZ17YoLnlQCaht+nsTaVOyqWtnXWG1VPVtYYTcRFUrTk1TafAic3gxXvibninb/Z6p1bVhCh81laf/DpmqOwJMcvRprvZFm7pdD78nwUMyZe51YVCUhGEr26nm1ZgO715Ietd5gCGOx8ERqiVBIOn9RpCub5WHPhii2vIrhbg4zSYmT9HYLRzm4N7Cf/nylsK3n/t+SyQ8sgOygYnSKJRMqIr/BKzppAKmNvyzH26GtO5TOWChB+hkK2bIhGBH5FaHnV0fOB4pN510rP1aLdlFzoZnF7MIJe8+U1Ssc/C1+QgI1I+4puv/Vxe5ZSx9J1uU+caRIG6Cje7LwLw== 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:38 +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:38 +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 23/61] mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:03 +0800 Message-Id: <20230726040041.26267-23-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: 5d669155-5e32-4496-70fc-08db8d8d02f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lk6DxO98cHo1SC4UIUtEU8zZsAxOxN6uVxkAlf+rnZgNmWmVA9D9j2CsL8crFDIMTTZIbJDI4hbyy7ipkJBlnj5piTC0rAjnwCPEFSHupv5YoRGgKBVOHPUNud5oC3Rkjvr7/KlikXyu1EbZ/vqyJ5Eydnbrj+JrdL/y1ljAa/WnLCiMRy+oNxiX+wogZb60R9SqYAUyq++o6PODLs+jKG4wBkRCdS/4k05Z4vZmq/lA2I1xAWzJYqYEZhBk2vZVZB00Ak6wvqR8F36Tm1UTzoDfW5MJ9vBYyZd3rBLEKvdUUrEcxv7epjPcktyIZd3mOpGVQFlqdl6hWvPYc80reUhkhR/V0tfDY6GdOF3m3jhkBmWUbu+KY4lQM4D2vLqLw8g9r4My9gRVLVddvuCzWkQPEolwjYb9+m38/viqOpOV0cZJl8Nhlerv2psf6S3HA28sypBmuGyYYJg7ZcfSU/Z585rhDd/6cnw2r3OeLTijrpk4loqRaUcF56KueGQwYdI56+dI8LlIcUXDjZa2G7F0e9TO0rvPDQmCfkaS4ebcKeFMqnKH9VTptpPW+JLr1oSe3tlgvI6MRn6eXCzywoSO34SBGEwgx5xiMzY5oG58J7YtJyOd1EXv/wgNMwcR 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)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nQL3cZ7BTevQUaJxpAp8VGHg5+ns?= =?utf-8?q?nXYKsQjSGep9sztQwsowlQ5pebxJ51XKcxfqR1370aelVBJE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4F7c3GkVVr8y/3UyTqI4SrUawutBSeD2?= =?utf-8?q?dDtn/qwCD4jvvMNYQv1BUkwDJDF43kRgerJQLercrBFaCPIpCc8jt8OB5oTkbcHW7?= =?utf-8?q?EBlE2YoK0FQgLNNYJcAAqGTNUssmZAJcZoh3+uwOUQPM3lX+fc4rILfVIcVnUHcuB?= =?utf-8?q?wVwa1qroFrczNsO2H/2CoNy437crHnvbMsM+KefRXFUyMnORAfkaJFmiOGsmtayaI?= =?utf-8?q?fkVvcNTwSzTvX+D5SJnHzPhmbTlhyKSKWgz0yeTchhnvUpYTR6yjq+KBnWWRvPWr3?= =?utf-8?q?e2ZJrY34CkyuqAglTtgaluqdoyT5C9hl1ZN2uleE1WroNl4dujRKCGrGWkGy4sdwJ?= =?utf-8?q?MXEyjQ26MAdxhrass2u0b+phUcNKulrVtmwfoMg1Kzy2xWHUDY0ibkrLwmMeQw1Ph?= =?utf-8?q?fi3WDgWUqZ2CFyapLq+09vGG2WFai+lvfV3K3tppy2dqWr8APH79kbK90WI5JkqBO?= =?utf-8?q?NqjiWb27A48g2co2AN6WwP9njwR5sLQJE8ZZ2bL+gd14C9/13RvQH4eklo5M1lwv7?= =?utf-8?q?xiFVeGkPjOqwJI518ExC1PfcZGIb73lu7wx86H4NUysr9+htgjwBdjlcOwAoyJ9cu?= =?utf-8?q?snX0BiLMtGAJ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d669155-5e32-4496-70fc-08db8d8d02f7 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:38.4419 (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: 651XlgwWR74ma3d+owc5ldBzFPf9etPZI4iC4e0qSDNJ9HwD+RVQoaV68nEZRpCUZEOmG3cTpuIfiRjS/bIaig== 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: 1772455903050783909 X-GMAIL-MSGID: 1772455903050783909 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/rtsx_usb_sdmmc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 2c650cd58693..ded9b6849e35 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1379,13 +1379,13 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) { struct rtsx_usb_sdmmc *host = platform_get_drvdata(pdev); struct mmc_host *mmc; if (!host) - return 0; + return; mmc = host->mmc; host->host_removal = true; @@ -1415,8 +1415,6 @@ static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek USB SD/MMC module has been removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -1455,7 +1453,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_usb_sdmmc_ids); static struct platform_driver rtsx_usb_sdmmc_driver = { .probe = rtsx_usb_sdmmc_drv_probe, - .remove = rtsx_usb_sdmmc_drv_remove, + .remove_new = rtsx_usb_sdmmc_drv_remove, .id_table = rtsx_usb_sdmmc_ids, .driver = { .name = "rtsx_usb_sdmmc", From patchwork Wed Jul 26 04:00:04 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: 126127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp216804vqo; Tue, 25 Jul 2023 23:49:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlEjJs6GwJjalVqgHgUXUtQVgYwQL8zuk1Yh7i9v7RRQZpz4ZNUSp6KXyedHiPUqPPgZWCFb X-Received: by 2002:a17:902:a710:b0:1bb:a882:c3c9 with SMTP id w16-20020a170902a71000b001bba882c3c9mr787061plq.65.1690354177060; Tue, 25 Jul 2023 23:49:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690354177; cv=pass; d=google.com; s=arc-20160816; b=LjtD4ZR6jPE90tWMGErJWjTTUiLu1iTdNZFqr4C5+oDeQMKaZwZLLQsNRo+k5YZMsm ojzpNqOGpUMlBZGrjyukoZfM8x+Q3Rcg10ERNXxT6v6OD4PUhsFL2olE7koy9QZPoVn2 q0bHWQNScVRmPPLuGrEOutEwFJ9MFMsNhKJfBcpCiniz8aGGU8sCU6/o6j5i7suA45om uBEuXn/qzz8qZ36o8FR2p7S+PVcLny+ShLcCjVepmSzhDnjhq+HEFfFURNkHuJNBSO/v W/QFlVFDwfddrsJTvAhPfiDLXlPdOn+yo01830ieJPk/NkqHUEKAxrVfzcPc0OkGDx6Y TS3Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=oVzpXJFmj1Wyea+kG80okv/PLdvzEPb8/XwyS4s9lUQs19SSHXa17fy9lvj1uYkz6S WCBpryS4bFisIcTfPcQGeGB2KqyLFs6/egNoQZ9h56JKw8YE9w0tEAHMj7ZI+fDGA4L/ lYQUu+JOvVkwli4QB/LYPfvncW/D8/3AeIkr3IoWOQb1iKpLACgJOCPotUwe88wG7Wkl kjQUra5f1oKQ3cCbu1XIHTkrswVDi/6685y2tuhURY2tOV4hfXeZ2CTHhGnu8VybUmVo TwuY2J+0znRNNO1yDhEvJ8mRh2BFmNqPOY+YV/bvfHjR7ZpNpIWgNnVpDACHbNIcB8By rvpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="j9R/JW1z"; 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 x1-20020a170902a38100b001b8a70d11e4si7499740pla.529.2023.07.25.23.49.23; Tue, 25 Jul 2023 23:49:37 -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="j9R/JW1z"; 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 S231689AbjGZEGR (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjGZEFX (ORCPT ); Wed, 26 Jul 2023 00:05:23 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4507273E; Tue, 25 Jul 2023 21:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M13qXiC/LcyMkfESAVlG6XWOnbjryIziGoQy9Gd2tsBnVwz/k4dO0GAmXGGciM+Swb0Vgp5jRgBJUgOIlj1s1ZpQ8PX+xQVYYuK8WaHe2lClL7qdSDsC2hg5tZOc+tTxuviSnWVYQ1i5EKIVnEp165pQQyDDsQ3Np9lVsZVyeNK+G6HHDHiXemgRkLoxw6Ikf/bJFO16fmlbSZ53+VV4UwtDNlhtkkJjTgiqM+J7gCEi4xMWFI5xEx8P2g8Ao9vBhc4ifVFkII5MJVXIhEkhgH5KmIPzFRCZnqT9DFpcvhvBkEzEZsBkfagGXLmWDbxR152TQDZcKiDx5Ogb2FZlTQ== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=QuQg7+w8iA8dWJKMcg4pY01yd5Rbu7OqEH/wUQgECK1pqOjsJt3yY1573LHAZsHsRSObW20u+Vq1uSrvJdtBItCci6upOMMLBda4uvwQKxZm4cRI1dl/pMClgC/pX0oVKMhwW/ofOmEOqnUfAYaeCUemVXVKKC8Xq+PPvb0ayfvBCetuRf5IxBPOQRlBPbKoml2MU/r8tEkaJ+5JIGLM80dd2s/61gHPUZm6sPFuB6VW/qTNE6ybwaqiAKaORPugJ1f8pSVSQSHQt0Kf+nC/4bWh/PjbSz2/crbREMK2NGTJ8mBDjZRr/czKxqoi42sYn2j7XT8YdouiKexf0Kbg/Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=j9R/JW1zeTFlPWC1RXn0XiBjKmHlarat2SF5An6UGNPX+BLzuVCkMkz+earYOtaqPu5qQDVoYQWLCiYnxlPcYiYzmR0XrBO1CTxJlPh3UROqX5Xo3qywFopoZgaf3jfvsUtPP3x4BseHMXUocKzKP53rnotJWjn1wNCB89ud3UaHJV/0mag47vzpZl2fMmFLkjn9P8Rz4UfeI3WqrovpR/Qcx/h+GE6d+sbDTJ8N7UGS+D9NWGwu54tQFF07OUejUZWnigIrQIzGu5WsBpOzjF6eNppJGwP7XjFrkKuTRsGdi4l3EBndvhbWXinBLh4S0SdDsNZCfxPqThxBnDjZYQ== 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:40 +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:40 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 24/61] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:04 +0800 Message-Id: <20230726040041.26267-24-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: b78077ad-7320-4ac1-f21d-08db8d8d042a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CcT4S8uAF4USK9v2vG56eRvFfmJOToOdOUxUT21ak9rBVKKXbBrRLfD/y5GFqUYYqUPylbzMsGmRUGgsMkUZz0/MrBQ9yOhN9JaUXsw8T7Al3hYCv1ZlSf4Bj5L7qg1n6xQ4EymioE5ee2751j0xZC3WMBiRGd+r5fAhvDwFUZ1ps0dVZ6yglZ8pbpk0XbEormY//zgfzKosknd7ZqU4VubQgtEPsbD0PX9PDEJDtA4CrMcllVhjE/08L+ggmCcQGe+KqX0GCF2XKkJOy4Jz3TovoHTsxD+oTgLe5a+nf6mbp0mZhfyBw99jj+0nnSnL1pGY+laiJqEoM2Wjr3gox4VFg/Y5sI4w628xlnH5Qj39vQqSV+7K7ULLxbzhLmtXXKfVl5KhWyE+HARY3iBwRtUzZDyNDYHE61XZbbPFFtvb22EyrXV5ioySrcQ53KNyEgcegYm0roOYSDCmZw33aDT0BYbLXqo93Wuc2rIiyzlefTZSjebCm4/FJEE3S1KBVD0AieGe7AaM/CZIGMnKlV2eE4rVCTxLRg9QhLG85GgLpxHBCOmMcDgO6NzX5N3qp1R0ufKv3g0LrvsjVRN13WtZd+abNo+7rfg9YMG965h3nT1e+AV9EDPW3QenkXSD 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)(7416002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?tsbp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7ekC/?= =?utf-8?q?V/x4pbiZy46uMub/5VZdZzQjXNYaf8RER2HaMQv4fozT6vx3jihYiQwFDVavHYs0X?= =?utf-8?q?P8+VAkQaeetgpOmdwKzuaRbKhBSE0Z8fe9OATlrISopfY594ZpyamfnFCyb6RjXlm?= =?utf-8?q?5nYi84xi8X0spSWEUdLXvQBOiUDD1st3vNJvDRLtSetNM4AzMStJKmQW5oq2ZvMTw?= =?utf-8?q?iI3jP2HsmbgnnQv0aFgd3+erciGBhrPzMYAnoRqpbo5raaRBdBl1h94qQGx2AS3u4?= =?utf-8?q?TmzLGT/ytpDp0BCJw6pa8qKKv0HeFL8nrnb+xoPhhC3H/pr4ayJf9oebsCt9v3Hjp?= =?utf-8?q?YqOAe3EV02x8vBJ8xLxW15FzCAaZp26Zr5bSCeTMxEuceEvMcCgbOIJyymK5mM58Z?= =?utf-8?q?DP7hxMXlG6dx0VLtAE/iVlMYnar4eUbwvJS/yZYHa4kL6K3r2slh2HsGpnvVhBKMc?= =?utf-8?q?/3Ti8KW2G/f2R7KTYH+4AxP2kRTg/bLOEyRZw1QdlcKNJnnXwdvx2hVez/42x7unG?= =?utf-8?q?TwxwwppjiqSQFRBtLDaDG2hONiI1nD4+t2vAISX/7PLDDV+Vj1Wf5Mnfzl00xlqhN?= =?utf-8?q?m5R4OKlZAU75sXa6a6JL6G6dNIFxb/VQQfKj+TsVPGn93IyK3FeAlDgNIbhHkvMS3?= =?utf-8?q?Hl3rx3HG9AnB?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b78077ad-7320-4ac1-f21d-08db8d8d042a 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:40.4205 (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: Hp379q+pZabz9riJk6/T+/h2FM0Dzxl04AWv0xYDgFVkj6qTFv94wwhfx4Qe2P3tVeDiiaTO1EvcchYRNUZInw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: 1772464821680004952 X-GMAIL-MSGID: 1772464821680004952 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/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:05 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: 126082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175870vqo; Tue, 25 Jul 2023 21:49:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHaPJuV5nou2PZNDGHLMv/+iFs1TjiBurZ7vzsPzu+qllThObp/zMpb9+eqJUWUtMyQ09A9 X-Received: by 2002:a05:6402:756:b0:521:d770:4753 with SMTP id p22-20020a056402075600b00521d7704753mr540917edy.13.1690346997414; Tue, 25 Jul 2023 21:49:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346997; cv=pass; d=google.com; s=arc-20160816; b=fFZ+MIe/5xu/q3z0YP8B4aaif3ho58em3RIIgl8T7X+Xf6RpX+cqowvjL84oYAoNVc Sc3X82eRSuzWQFOpmyUN6CM892wZrLfyaceHCiwBijmOhS/JnOZA6ChLy6Pu+d89rfsP bN3zEVdR2o+zivRpJeIaGv749mXZ6jkiVNnFbLEAOZoXoC1Tyspivhtpi94e3wSPDdt4 kjR1r8r0umsT09fyO/gV9rmHvEe4fZ/sjbwtaw38LkMTZ0BHNnG2q7lIlIzoYtY+IZzY ocxcK4SIH5AM2OtfWEMTvrhCes/+20+flak54w1fv/HLukkZLKQCcdx9QDj711vovDwy 5KiQ== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=bwgcrL/QOxeTo+ZtUqnVRwPGeoUKEZXPfKuM7mW+K3vy+GbqGMJFdWoADZi9uDgzJA D3RWbkIJSml/DDgyS01GESM5qUKpG/1hVUSyVvvVPoUxvUs7lOAGy2Tt0oxX0+ZJKQeK JyflDrNWk/CnzdXq8TBefUneIek1aaVxtX6EcgLrrF820+PC+pPjd447GXqNuP2Amm94 TPhJdOvVZC0gUarcQ6t7/zcnjmjQal0LjolAAyNPDRyTZGp1+oMGNwbvWpzsYTPbrJjF OHPS+f8qGrwHoAzaX1eTgSchFNQhi+EKAe40M1KLerfdwabbo0j7hXQj/TlpAe52lhjd nnzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nzKuqcDS; 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 r20-20020aa7cfd4000000b005219e374aaesi9059680edy.119.2023.07.25.21.49.33; Tue, 25 Jul 2023 21:49:57 -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=nzKuqcDS; 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 S231668AbjGZEGW (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbjGZEFa (ORCPT ); Wed, 26 Jul 2023 00:05:30 -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 B0B8744B2; Tue, 25 Jul 2023 21:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8sQ6w9gfdCxpqz0OClo+a5WFJUcgJNGHuugP9N4FpwwvSAjVtECYu64kbGqajFjTiEEjvHkOs30phSHse8Xz4lEdbUjRz4d2heaxySiekGDuWgHGZMX+IMsAIzhOmKuga20Owkd43e5R9MtjgvjqRPZT3KbQeWawX8D832oMWdOmtR55bIgjLU4wEE+ZBfbR/IEJwPB1Zt0y8d/m4HQY/4xRuHxleIPE40vZKSKnBlHFoEftq5TCIZKAObvRMCQX1fUac/OXO4Ind/BOJAI51E8fC1mgj1GvRmtziqMgIaIt9ts3hp2NUd9wQZoOmF3SXPdQt0AHy/y4S1z48webw== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; b=dn3yjxBb0pf3F2RiZQrHw8S0q4HFffAiU8r213aYAxAyYzFyH+PTUcw7D8Y+Az9KzdMJ2QvnA1aiRL3RxcZFat5ZbFgqhkgN7Kx3KK2reM6FP7IM9dEOC+AFdNoZzpZTAiQd4fqxBF4agBReuOOjUiuXOGoNEP9CXhOJ69SQtCxbtjZoo96csV5PuXBtTSSwihnm9jVD1nxOiQP6XyeHXfIco5ddg6FIDwjUO+6YQfRnNl5PTJi6O3tYqApIFD+/Dw6MGmP5hIZ3p65B2BeFcLF+JLBCUAo3AfJt0zP4MKOvhzc4q9E7JKobnQaisUT5vpTvQSNJqvOiWK7bPM13Fw== 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=nhm7E5b0BhQaVKkDpkGl0RYRyNYlwsawA1ZXX7nIng8=; b=nzKuqcDSlGq86Kvd0xyiF2LpkGKaPcvoR+8wJCgi9nDPBuavvsutmz4f60ZBh09jWeUfUin7N8kgISYeuqleKoSHxoOcoWWSgW2vGPBTXuSRXXBVoYE+JtbuVp2cebOqMy25SaEQDyocGI6E8wlbuP+2eiQNoWRDsdVru3XQvtMOfpX/mdlzE8+ilhlgttPupjQlB26qZuSgwF0+vCRsO2EkgKT7ftHz22jGcmPxKqJlDSgZKnMWYDdFMaPNbZAaPBbiFfOiU3ak14l796VFDlsTmyn0Kuz/VVWEZu7WHFVyD05LF5VLuUMRj0w41NS2W+5KBfCHwqMJ0nxeddNE9A== 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:42 +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:41 +0000 From: Yangtao Li To: Adrian Hunter , 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 25/61] mmc: f-sdh30: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:05 +0800 Message-Id: <20230726040041.26267-25-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: 63a1632a-d276-4db4-de02-08db8d8d0503 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0iLf6+/ENwXJ9+ap24z1s666yHwt0FRaCMjX0iAfaYQHLTLoc4UTy0pQ1bvHtgHH2XtHALvsgB5HNVJnbplUikUTuNtDq9gTD8EW8V1iDWfVDudt/Smh+oJ3B0EsQ3SKuMSoDTX7Yt0PwYZPiRP0Cm6BjnBDKsv5FpKwbVhQpOG0Wh6NWwBq5JyEup51QrSI/gvn/qkLFWPRh5cO92TcYcl/HVc+sVS2K2e097/1vPohaM8H8JxWfT9WMA9ZkE5l8n4/5Ruhuyp8Ko9WZAp/TLg97aCK/HfdxlrmX0YD+k+wK+VxuKLE9WBkRNvSZOP+tXjIR8ylDxR+kpc5PZJiCWgzs9FEYVRE5RZ9F9RBKD+ahRiquIZpJaTh/vpvgn2Ep++p082Tw6paZaIx7uGGvU1ps2gXmDr7TgWYURB6i9zcxZyjltAQ6SRLLO5VVtL4rVjEefNBcROLFSWDVg3iWQ9UdqDFRHvwjyB2KtrjHtLZvR1Vyik5n0xWH6a8dKE1mKuYJFxKQ0lu8H7aatjttDJyAqkd/nwMuuUMb+bMdAD+c4d4UNzbNnv378ZY3WK+HkATlj7iGt3omLAaRiTnsqo+HHsIw97V8oPF39siVSf+BXlSjCcwZjxzdpcS+3W8 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xBm3eEZX2RLGoF9oMmt5hRNjgkyU?= =?utf-8?q?LAkOCceC0PpN5sqo436eEju2MwjWoyJ+rITjDts8/P9eUEfgNPNn2ex0wdkxOrzG9?= =?utf-8?q?U0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8?q?8cEpI6AYHmKWxuhQRPU3yUWu2RRctVo770bFeqfI8tjCI+PxPFg6XIIYpezf9Szrj?= =?utf-8?q?o+IG2VOzaNuIGDen49e4UtVvyEO4gHYg7+lI78Y6c9FhG4XWMgHGIUP6RzmmZvAPO?= =?utf-8?q?7bVpWDrXPZQJsWDO8iitSc6RZWdcu/1X/E7vT8lxim1vJD8SC2wEq4Ug15KnXmD8Q?= =?utf-8?q?cTkprnAfMQ9K+0/1LFCmPUsjccs3YgPDhPGMCqTxull0J1omYTZcBY9HtTd8RrmdY?= =?utf-8?q?f+I3JLGX0OpC0ukGj6PufEnpFirMu23m3xxDuib78x1jgfAn8phiuz5ck/KPBblUX?= =?utf-8?q?mrvaOFjo0ALWwSX4v2RAWEozWwnUpBeVwX8qUluOx5/mAFlIYTA5ujEcGGcW+vK5y?= =?utf-8?q?8yNNdW8JDLP2akJ8sPHqwiHbVAbsa+IW2mC6QXwbqJmnFpoxfPkKk1YQNnPedub0g?= =?utf-8?q?KxkBavwAXVHjL02Rg09n5wxyhONFHDj0eT+/EaGaosryfxd2G8DheHQ9thrUpiUQt?= =?utf-8?q?qRIRsxPrcVNfFEVDr8Hd9pmq9uObMYqKyYTXzrxdKenVpDfXwBp9Z6e69B2TVF8zd?= =?utf-8?q?qQCNTrlGJ5d8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63a1632a-d276-4db4-de02-08db8d8d0503 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:41.8442 (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: a/PKT+6xr4DtI9tLkg4rpkIXD0hwzrEITmXGXv1wHUcR37/Woz8+YKV5s3K4QaiIebvtYZYMfLkTIl1jdHmGIw== 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: 1772457293207530770 X-GMAIL-MSGID: 1772457293207530770 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 Acked-by: Uwe Kleine-König Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci_f_sdh30.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index b01ffb4d0973..840084ee72e6 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -206,7 +206,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) return ret; } -static int sdhci_f_sdh30_remove(struct platform_device *pdev) +static void sdhci_f_sdh30_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host); @@ -216,8 +216,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk_iface); sdhci_pltfm_unregister(pdev); - - return 0; } #ifdef CONFIG_OF @@ -245,8 +243,8 @@ static struct platform_driver sdhci_f_sdh30_driver = { .acpi_match_table = ACPI_PTR(f_sdh30_acpi_ids), .pm = &sdhci_pltfm_pmops, }, - .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .probe = sdhci_f_sdh30_probe, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver); From patchwork Wed Jul 26 04:00:06 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: 126079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175044vqo; Tue, 25 Jul 2023 21:47:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0mZqiu4pkiBtqWdb+BoJjNv7gev0Fuus20EAgupZ+7W5PQtD59IY9ZSFseA4hjgBhjtLT X-Received: by 2002:aa7:d80f:0:b0:51d:fa7c:c330 with SMTP id v15-20020aa7d80f000000b0051dfa7cc330mr520206edq.26.1690346836774; Tue, 25 Jul 2023 21:47:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346836; cv=pass; d=google.com; s=arc-20160816; b=lo3hJtvPKjdx/IT6a2l0P15TLFucKuSa2+nSZf1wa2JHbUsXz2CjOWFh8+N/2V9ArY d4MHkLriV2QVw2YN3EUR77OyixIX1sxUwjSPrxIKaDYTt4RFgpd+l2NVEr90hzuQnVjo +Y235Uql+M9ZiZUnZl9hPXagzm1URj8eXb23v/pMBQ6syuecaQnIc/qAEegb3C+yocp2 OmLLcr6UkiHyAqxjreBjUl2SMexgssW3M5NFwAO+w1iNRX/nmiGHx6PZXsubyBl55bO/ MWSBC7YTMC/vcCYz/mgMIbkqwwoHb/kB33iq+du1kJRYiAUm4JEqpQNFFCV5YgrDuGnD h+2g== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; fh=fJxaKjF8cU9IytLxrOxyH+3aSDZVOkoQMtMD4mCap3A=; b=D/fEYXAkw04pVxBmxLSkOOcpQfs8Laq+Hj5ck5jYF5Sxw6qxkOGP//xvd6FlrJbr+d 6COVmXAIVynAHwisEVoriGV8FZFYM2175bjDutQSyYBrD2bJy3ji2OLMWLdseBxMY9zd I2y1mxHXqqiyUzAKnVFBX2BNb5hfAlL1D0enT3GIezPkzPGsb9/W/LkznvQ+7hROVtkk JFMHO5Kux0HWqZLNTi66Nl8QnJhUjVKHf9sB1uo03v2vIu++67AqLNW43m4Ftp2E5SCb bt/Gk8vC82x2UvCq5SyaKhPVjtmO4Lx8B089ESgP/UqPODNZ7GgouBwXiSunmPtH5Kqu 440A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZA6RIM9g; 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 c7-20020aa7d607000000b005222709bc35si5045625edr.197.2023.07.25.21.46.52; Tue, 25 Jul 2023 21:47:16 -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=ZA6RIM9g; 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 S230095AbjGZEGf (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:35 -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 S231690AbjGZEFh (ORCPT ); Wed, 26 Jul 2023 00:05:37 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8FBB2D65; Tue, 25 Jul 2023 21:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gqcVB9J5OazVS1JxNg4p/2D90npr7aEIf9dh3+jYMeO+dpYQ734jkizbk11nWVkUijMo2zKzh2iqDMDvsduXEMvWUcsVieynRKP3azrvzaplyTlh6roQGAFY9kAGmvBWRHogpN6ETXywgRHWuczZp8SB+fe/uk23u2PdsjXMUHs1d9YlVpae/ydlscwb6FNOIrKFqXUue6DpE0T9Gme8J8hvDcL5CCzwc7fr2V9xg9zqEDQIMSCRmfNpmVd92r1uzvTkCFPPwCMhtUqilDFg/zlcYCn8tgiMxkVIYpd9P/hsuVttMtrebYPpZ74IxyyrwPcstLK07F7JGSBqNe2puw== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=bgktIhcQ6oWFp/nYRYI1n9IiBb03nut410hIWSg+jyAYIjrRlBj5EbJBMizKH+M5MTbQiz/KPGH4q2L6x2bIPrhlurdJnGt3N1VOn72RQfXnDXS9kmg/RunJ6T0xkuIqL0070TqtGhsmu7A1aMfdSpSjgxeqkiokrghYvPUzp5ESs3GpkQCltjL2qYh+gt5DXDggtqv1kCicuh3RqMNmVp0omgH1IeMUfjKMBmomqy9sv0Sg4/uccWbSfyTOOdtfJnkXE10vBq5JTRX3QyCqcJxNIxzLGUDKgvRpxq43TiLjW322kKuHK7qrjtgCtRQxo+N553pjbxS9/HBFgvUPeQ== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=ZA6RIM9gZAV4BxvQKco5IcZRSi1L90XfA8A0+c3H3sa9tf+sLExfEt8trYRTx4ccKhONKvxD+q/Pg9BXzRto+Fn9q2citbeFK42obDIhBCs/tc2Gn7ypbctcp1mlW93ViDzWSNKLIy+BrcDBMuUwwrn4TznwDzEzeICPKh8GdupMdwHX1iP58GUKG/OsFpABx+n3wEW8GRma7Bq8ZdJdR2E2GyIKxFNnTVIr0KZhC5qUYytgbGerLK/o6XxSTL9jby4RsQlzTGFj8yAgXktj/wzIbjSbd9iwq3Kuly7y6FlhN5eiyG3obILs/cPAW6iTEPSKKRBELBJEijvup/ZmNA== 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:43 +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:43 +0000 From: Yangtao Li To: Adrian Hunter , Michal Simek , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 26/61] mmc: sdhci-of-arasan: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:06 +0800 Message-Id: <20230726040041.26267-26-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: 5219fafe-634a-4528-c71c-08db8d8d05fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gtZwPbC0uOD9dXWAZmeSy4Io4fuFx9JvI8qgxlF9eEGH3PFTLv96gS/OjXKA5yY+hzz3KArhgzGyLPzlemC6pLdHmyp8OxOJL8t2bbKZYODENw8bAVlQytmlpywJxw8lWnHun9MwY0GWnqeEH5DMXddOWLaP4jRYHGd4KzMK8lGYQJA9uxKO/fzZgG/bigXZB8u4mzHVt5n2Lp8/R9tR4NuuuWGFbw9lvCX5C7cgSrpvQMUWcOMAG7hc9Ulhgg9fNeHfycrMqGXIFX8uwo0CJmkEuy5XhDNmL8+c57+hbd5WyAJT2XhtSg4qyU8+5wdJ0yuQWeFHkVuZwIAWvVcMiti1aIWn2v/SPFToanHhSabztKyBRmcuWkhNLLkxyA8mIyyajvaHllJE+/IuFfkPICI9bgq/Qt2XM61iPF3FPUvKUWzNfCRYrSfw40WYpbvvqKxrEeV/SFum6T0oG45HoRoDUCCjFdm7fNd833/alGgoLSbKuaN20MFoTTMvc8VF69p9AzOEJZwTNa+9M7XAU1decS4GNoQw5XJRjlJu8jebIycYKS/1vFUuIoA13c4Oy5n53W+OuN9pNoN8FEVho38CvUBL13ohnW8ACYhhp199SWpgtw5ZyICjYlFjrNYR 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nDJrmOoZus4XvIa+2Gu9u6tN8i87?= =?utf-8?q?Yp9ynhUg0fpQLVXhwrdTgiFDZ2h9iQBJBWcYu8IkBRUiP4XdCAOyQw3IIJ/DLKHaI?= =?utf-8?q?c+yi+N3WAWMgHXZ66i39+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ZKs3zhx/UHz7UIs88RAwVXnenC7lEALR?= =?utf-8?q?nqtYYgI9NSVxDtkpo9fInLSak38GlIZTkJX7xJg3yCaTP71Yxl59rxB3J+Vjydhes?= =?utf-8?q?uwAOpAtaQ0ueHaCs16XtcHEZ4KR7xjjIgLZDzInZTFs9FsjNldp7AfP7845huWXsE?= =?utf-8?q?cgNyQynjfbEMvUy307kWz/h248d6P/pmWx3pgRIRoE96c7IcBwq/UEbdlcoKtiGSl?= =?utf-8?q?xP2Mk4BnyA11uDfJXD4xqg+QZjRnKkNs32/Zfg8KTVRw2KjZ/eoWuIyHjGajRZHSy?= =?utf-8?q?pJdkaVFQ73QA2c6sZQF1zTuTFrTGbBd8RSZ/9WhK/TjAotB0lkbuIwWYenVD8R3iU?= =?utf-8?q?WFt5HgIaFX/rQF/R7KYtSReLL+F47ZQf52Q554Rzwfg2IgFvs8xE5/W8zQKPxaRqz?= =?utf-8?q?BryJUe3oXwRvHgCIOwZ12B9zxtpodkr2Jexy+pS5Gfnna1EIA5cbxGlY9F3TjmY0G?= =?utf-8?q?ejI25+G5UJdvs9S6QpRLVY1IihlqBQBLcS4kRN/JTSeLvKhe7FDXjT3qDIT4vJpVy?= =?utf-8?q?LqBQJn4lmV4b?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5219fafe-634a-4528-c71c-08db8d8d05fb 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:43.4530 (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: FWsJ7rjL4jYgswUzvuPBRUxBqcMVlqz5IdBlw9pEDZpsM8Rlou93jzNG4u0ogAZQsGcoZR8WBJ2eg9U30YdbxA== 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: 1772457124441891141 X-GMAIL-MSGID: 1772457124441891141 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 Acked-by: Michal Simek --- drivers/mmc/host/sdhci-of-arasan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 294dd605fd2b..160bab0c437c 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) return ret; } -static int sdhci_arasan_remove(struct platform_device *pdev) +static void sdhci_arasan_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_pltfm_unregister(pdev); clk_disable_unprepare(clk_ahb); - - return 0; } static struct platform_driver sdhci_arasan_driver = { @@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = { .pm = &sdhci_arasan_dev_pm_ops, }, .probe = sdhci_arasan_probe, - .remove = sdhci_arasan_remove, + .remove_new = sdhci_arasan_remove, }; module_platform_driver(sdhci_arasan_driver); From patchwork Wed Jul 26 04:00:07 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: 126065 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp164458vqo; Tue, 25 Jul 2023 21:12:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlE2egqvNF0qOautk0XgdfBNIAYDIJ/+kiHMkfRtQoAWp5H0egfayndkchjZNfDIOg5dHN6L X-Received: by 2002:a17:906:7a1d:b0:99b:4926:b72f with SMTP id d29-20020a1709067a1d00b0099b4926b72fmr657098ejo.36.1690344773466; Tue, 25 Jul 2023 21:12:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344773; cv=pass; d=google.com; s=arc-20160816; b=RoP1pIj9SEUxe0LrFYaf75rfPms4NMTGF5+u+ADVO0pedi05VSz26mFAofkrRXAWgM Ru1zMjgyDbA5ViWEQiZ0i4RozjIxcN7L20341+GsFFZhlzKUprLu+tIzyh4J0xiTPrCO t0N5lD06gml/KGmJJ39Q5krX1WisrouMUy/33eEcLfc9CJAzJtkTgwXJNHHv3PJfYsTl 2xdTqYaXDmLZ9Lw5Y3hJd42iLBAwr/Sh9bCP4JRVwd0bgaPoHVxedlGUfktCk4MAy1Rw 1U4Rh6fYtjEjKBrR32UTVlWX9tDiMZDAoZam42g3zPs0rih8ER2yQkcxTdf8aUrojEwH GGxA== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=d9ePjhobokf3OMx63hhoVLMhKuE/3kRMIerqa9Dm/JXTmXOTip8CR6fC2wm9qDqqtK CfL5IOX5C10wxz3xhnlXUonROhZCE2sSpMsJOAaoIU2hkQ2waFd6AeKG0NlqXtPq8QQ7 GchAVKaP4x83C0j5OPRhB8LaBBBka8gkk5G8j2mEVGjX9WMCrJ16cSabOdsd5yNXiZhi cgeesebQsApTi1AZ7Kbkx06PhMvbIdGC9rOyCZcJtasK07ZbpUONeMOriya+UjQHIA0M NfxGsWAmxlqdJVpIMDSES1L5G9+NgRaoX6Z7sGdaB6ZlAI3GbcivMgSPip8eoFRNYZsH 0ZJA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Kcs9Hb2E; 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 rn24-20020a170906d93800b00992feae3848si8673546ejb.38.2023.07.25.21.12.29; Tue, 25 Jul 2023 21:12:53 -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=Kcs9Hb2E; 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 S231649AbjGZEHD (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjGZEGU (ORCPT ); Wed, 26 Jul 2023 00:06:20 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB1849F6; Tue, 25 Jul 2023 21:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bWoaSlAVcgObvVTnCHlYciWuFsyftkiaMdMgPrNZx+yJGi2l6D5jAi3PrMl6oAcMhVsphPoc7s/GbTY/Dg5o0jZQXz3GcZAoZW8cbz6WNndXiAzEDXspQHLg4HF/BdSp/pHbe/QdofW6DtWHB6gjwkni8wqMwN6TFNXkSWFDm7ctmarQO2+mfqOduxrqbWJiZnfIaU056F8etBc1Hqrr8OxnrPBgDvIgw0z+pcJP9VgYp8vLc7TuyBu1I1CcMXvkGoanVbgEkTgi+lvYHWaMjNjLOa6ZTDdPHTwJClMMu8Gi68Yk93lNSVnp6cUTFowIA7eRbfWIO/j7+6KYuXj1dg== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=Zm+IluGQ8gmKJ7fkjXNQV8KQPbm5YHis121TbIgOcC33qNkbru3f9HXcNNN2d73cEm9VQ7uOHs/6Sa5NJpdKqVMveb0ifS7h6reJNeSFl81I/15TFfLpr9e4AjpNe9rJWJVt8YHfmIXV86N1GoH2N8eyQeVrAVnIXnmxtcA+nZ5kckUTeiFoiQef5029o0LhyF+JSNTuVXJyqvkSnI/guXeEK1ejcshzTr4b7N1w7/MinP6OOK+ho1NQRCalZrYFc0Vu82d7PzUB+DMHRZsEqXST6YebR+L0NRGhXEw0cij8AXbxPy1Ax0SPmr9najdvsEg78QdiGyml4SyjqMPL4Q== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=Kcs9Hb2E9wiiiyQK0VrVF+Z+XTMWUtEQRP5CdaiFmvm4v5cK1WkAgX0lZ8zfN4uHDxJWd47OlniWWdTTMlnCxAPeYMM6DuwiNkmLI822LdKvAOLOPSFXnxQWlOaNopne+kuAGz7X9NSxtwEKosBLH9CDuzTFgPXiyz4E68344s/Vo29LM5xEbOLg7ooapOYMfJujfpv8f74p85+t1WkZ7rNNV/GPmw1zoAuQkd664ZJ/cH+LequSYTMYxojk//1mLBJrlyY4+6TmjH8zSL2H5jtxU7TVLgFPNUr57yImGbh4lw9PuCfzZOS0Uuy1o8xN6CnDAmqBqw1NJuDG8GhMfQ== 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:44 +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:44 +0000 From: Yangtao Li To: Adrian Hunter , 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 27/61] mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:07 +0800 Message-Id: <20230726040041.26267-27-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: 0de16ae8-35d6-446e-ee79-08db8d8d06cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: awX8Ert1yVo77p9waaq10jzd1wLV5XCgt1mN2JWBJ5fj/QxS6HtvOF7VM+gYqlYSV1yDENGFc+5dntp+xNqg7T6doWz4l1h+0kR+ucIn4eqWkXGBo4tNn/1Wz2O7HCNnIzvIxoGBoEJ9U5NVXIaz3Vf6qEwLKmx4dOSINMcR+l3Uz0iv0FCCiaE1QBb8AyAoZn8j0tKz+fb/MRI0dXCnFdW17O8j3V8AIXmZAqdaQOHaHMQKA1je6PUHTFOn5aQQqJNNTZJKprvsP7KRCxRw2dApPqdV/jb/HYwPCiJuZr59NgqSfD4C1Kmsn3JbkiNWQhiTcFgL6RYefYEp3ztPIKfo+EHt8Y1LghYgRU4mhxdiuYiqbal4qYegWNOkNuiLkWDOHMSov8jVH/jPpH6RBG/x1DKcjzTRZGscfYMQgQnxnGoo5nfxO100HB4rtQrWYLUgXO282xAYuCGoQvvU2KcA2xkupCRqTFzSPt66HIogz/0UK+ft7i4aJuQkmELzmkHEu4yb0DWo+LKyWd3jzr3l9duHJfHKmvDmFyWfyCf0AGZa7bxPpIduq10Q1iZr7OOHjXDUHE9gATCwhgJ2dtrxLBrOGw575NSGt9a7WuIfK6ymsmO3OsC0Nn1RLz3/o7Vs6+tygFN1lcrxItq07Q== 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)(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)(133343001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4YLERURMgPletYkVUbvxqO+AWTOP?= =?utf-8?q?RO9pzvJFR+9efqAphojv+dsZ6yiSAnvDfmmAk/Iap/iefgvw/9LZ0Wj56QjnXe7h0?= =?utf-8?q?cy/4LvxWjUDMosU54m7K58bNovJA4SVoHTegNVvvMWqkXSD1IgU/olabSx1OYVuqB?= =?utf-8?q?9Rg6g9EL+WwBYNbV3j0ff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q87BnRWl65ffj7U2cr7uHNIbsWDW2ptIu50wr?= =?utf-8?q?Y5ChtsK0dR9/aRlgVu7eLyqpuB3gFvXsxMQIOO0P6aKfWN+psguhLHJYcWCCfYk7L?= =?utf-8?q?LejiXGJZfrMq28okGbU9o/PLm2KsPUt69LiRHkbjg+lWApTy7PyCrw4a3Sk7tguDP?= =?utf-8?q?0q280PMVPGDXP4Z/Pm0hAJqN7MBwf+GxPTriD6004V5CKX0lYXdBT627Koy6wcoer?= =?utf-8?q?5fA1YLBSHb2pPegHVQlWfzqqKfyPLMEc+EIS0avVbAIV84H6VFMPrICmpdqLOM4LA?= =?utf-8?q?XYCvAL112kbOp+735lIMX/Q+9sPdFu13A6xAguUK2NCz0CCo0xWGVt5YEz43G2iwD?= =?utf-8?q?badz2hjk4NwZa2oZYMS3OOoZccnLItcvOcoIox4xVZj+I8N83e04KHtvqQBgaz6jF?= =?utf-8?q?mxA8+Ad7fCsKzdACp7PCpnchLbCNsslGYNAVk3r9Uhdy9QaT/NXi41fXYecWa2QqJ?= =?utf-8?q?D1v3GPIfPJD9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0de16ae8-35d6-446e-ee79-08db8d8d06cf 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:44.8783 (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: vdcvNDIJbxBNL9icY999IUoxSkg+nEoD9jGlQyjhZgoNesTKHxcfEorTapCfon9pknBhzNHhGB4BX9NPMIvDlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: 1772454960955625464 X-GMAIL-MSGID: 1772454960955625464 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/sdhci-of-dwcmshc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index e68cd87998c8..5cfd24cd33fc 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -574,7 +574,7 @@ static int dwcmshc_probe(struct platform_device *pdev) return err; } -static int dwcmshc_remove(struct platform_device *pdev) +static void dwcmshc_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -589,8 +589,6 @@ static int dwcmshc_remove(struct platform_device *pdev) clk_bulk_disable_unprepare(RK35xx_MAX_CLKS, rk_priv->rockchip_clks); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -657,7 +655,7 @@ static struct platform_driver sdhci_dwcmshc_driver = { .pm = &dwcmshc_pmops, }, .probe = dwcmshc_probe, - .remove = dwcmshc_remove, + .remove_new = dwcmshc_remove, }; module_platform_driver(sdhci_dwcmshc_driver); 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?m0Ja6tjUsGYDPrcSRY9S9i8g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8n4muKwqfk0Aia7uYLJkKbLw/7Q2jWfiHVlr9utq1g?= =?utf-8?q?qAho+PTYRW8z2J5LqS+mpRmOkayyfJkMc/7Sj++ryOCurPgpJClvlKPAWh8SraOqZ?= =?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 = { From patchwork Wed Jul 26 04:00:09 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: 126112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp191981vqo; Tue, 25 Jul 2023 22:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlECVLaXULmVN0cwixUHB2U/HrsbHsCEj1MGOakQAIibfx/9+2WRykurMkOEEUKCQl37BTXc X-Received: by 2002:a17:902:da87:b0:1bb:a941:d940 with SMTP id j7-20020a170902da8700b001bba941d940mr1011544plx.15.1690350056158; Tue, 25 Jul 2023 22:40:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350056; cv=pass; d=google.com; s=arc-20160816; b=fHpf89hpRUxAHYfdKx6nDKKbvJZYp2gB6rs5J3M9etHcnHXSWjZcNfYGQSN1IoXY5y Y+EMAMtXUQEgEZdHxFui1q2px/2uE0y+bVJvGafhvUAFKk8JuUxErkUfW/IoTWQGXby5 BubZ2Wb7RNPR2E5wZa6NpFTX04psu0hWS1iU6HThHeurQu5wuh599sEB0boRWedUdxDY gDWAz0YuYIELk+DzqFZ9ppfDDg6LWsLJFYlorN891WGXxdsHTEYDTj9FRL0dYd+bTRne OlFlVw1HWNxabXiw8SW2potzcWuqBulWQzS6dR28cK2Zb9CQfdg4+YYeAN7xfKKfbFac e1aw== 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=LIKuHN7yzw2FsGsekxD0RHlfh2AlczQ0njJnGy0TV/jrzaE5/ZU5i86afbjjolY8zA AHOD9yXYLlkfkZD2b5O8Sc678FKLYKP9htR1uPxcZZii5X/yqjUW1+KrND3qas5Rts9f OggI8xpG3Y3rac/n5bgr41hiBQ11xrh5ZQQQPpY7FvRnaaaBFe+lMG2IYg6kBh3zDLq3 AS4YGKebBOucMDBjwQK4UVg18r509RsKDL3OQjDA41lEmvqLwoNi8hdIwJmIRL8pVtje 9e0qRVBzRHO4cEawkH5oCMGr/xtuDldeb92tQnvAbdQd2J5Iql/PrGDbuqvcfNXO2KwF n9qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mt80DIyy; 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 h17-20020a170902f55100b001bba894ac4asi5511205plf.274.2023.07.25.22.40.42; Tue, 25 Jul 2023 22:40:56 -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=mt80DIyy; 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 S231341AbjGZEH3 (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbjGZEGi (ORCPT ); Wed, 26 Jul 2023 00:06:38 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D5D35AC; Tue, 25 Jul 2023 21:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMJCCLHIUxX/P9pwZSRiiiRcehnRO/aA6BdO6hdBArv9dSP26j7DO1KFGA52lVvg7p74VvJRQ17X9ZCofyEaWZ8KW0ZCYB4Ox/XqM8MPTHfT8a7XOEVyx33T7vIamcfRIam4bnfZDd0vjWilpOm17KjakKT/0+WFmfKsFF+uY4EzWx+6LvUMgjm6kM+aiI5YoBHkgfhLm1RbEtF1LScChH+YfUTMUhi0JZsmUrro/iWqBXTd52mWJGOpued437gxQUo4PsK4OFE8Qv97lzezd3jFBpl3VC80Onv7rKKlxf+BIVO+BDRgzbUoWEB6HnRn3FKn7rpdtexAMUMFiwpBcA== 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=VoCUTV9disEx0vj9y6Ifj0+saVZCsf2W6jI6FPT9XGaoNMwOQVm/uMylEj+NEdaYyU1zoluXNtvJPvnNzhxz0MFtBiaa/h1q8sBxxcV1c3DQMK51z6ZwbP2Ts2MCp8HLuc1Kz4aj0ESNk3T4kAgNfA3aOoVhIRXXyW6xrgYCf1L7zELUZtitqUyU2hSuvY707j5fqLFuq5UizHWyYghioRcOzO/h7NB0lLyiA1FX0iTj07pVurM6bv7dG8rsBz5nkyQ1hX0yCVIUZbc359zcfAlikb97Boqgdy0aEXep/N42fTv6stl7TuKTce+HnL1wAWpumZSJEHsdEK4txJ3bFQ== 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=mt80DIyyjCEnTeGX13DfV4Zmh5Y4mJu+xam9z3acOMppNAh3K1F2DNHwI5VFD8eeEnylG4roATSnTl9oIJ2FEPB2ue8IM/CpcEjDynUlrpjutCRxzcAdGgSorUHD6SRVEehN0qe2Nv4OJeEtePSzaNSPZZo38ekFU+/P7HU+te3GPaZ0fM0md0ZVEfTqW6AxNqwjzT7v4/BflKymveDR4hb7A3O1YzTU/l7UAqOTobSX32Fvz9PTJ12d/VmvwSqnJsEMtCkADGKXpbQAPSV2lPpp+njOPtf3IuS9cfI3EHH0e76IvCdShtGiiZO1hKLkZ3XpiXIYbA8bTZC3rfw+xw== 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:48 +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:48 +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 v2 29/61] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:09 +0800 Message-Id: <20230726040041.26267-29-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: 54fd2186-051c-485a-0b18-08db8d8d08ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gn6dE3PGSdLd1nq5MrzZDyvJ1H1YLjL2kkOA3xSb8c+lxQS2olF2dIuKzYvgn+Qo65j81vairkZWKeROH7HNwI134Ync1oTMg9Z8FwLkb0jZpBIdhvFDNVZ85yfMhhFSjIXIyfkfslHl7Lb7la+XEnKJgQ6EpTSv+oyzxGoN5k/IsGBsNfR7x/OrCF2Kf95Y0ERPITS1B9aVdzquPYtAK7xSJ16u6dO8DvJefUwvjwMmTukFRdsHIfHL9enkv3TSfQGk49BD/zKHu3Kc9ovu1AAMxat951M93CJ1mTla48kAqZGcVOBt4pQRFuCJR2KPfZxTiokC+xe5fZR98EBNguB8xhnlcYlhXLhNzky0qRL8NzH8nb4QheEI7T56AvDMod5U7L0qeEXJpUkEhhslK8rUskZ+OdnI1v+FHTUuoMrwYokTjoUD24aoNGGK0oErFqJZ5BqGIqPBQZJ1BgRqA1953ctays8I58lEvXd4Ra1EoMHorN1eZbR7QzLsSmBAFl+4yQzHiV6cgMTwefe0jE8hsikf+Ub1NU1co8UQc+W6N04oH8DBeAZdyJQ9DaFRBGtCGKC+F0bYUSUW1n5ZciLIG5UtgY0F+Jju9ARZSEYymnKyIAQlPSysmzzNFjSz 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)(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);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kba8ShVZWwMS7txCdT9X74oMohZE?= =?utf-8?q?zOj+F8bMNTuipatqQCf9n5G7Lzxu6/HrQhYFsFHBKsUhHFuga2YxacC8sgs2hWnks?= =?utf-8?q?/oSug2Zo8Hg08cA9HThFKOSVeCJWCnMrmQoZBQL75QlR63N7BHsev6o5pb0eb3w6P?= =?utf-8?q?EK6OWw7se4bSqwuj5v3ciBesIQMWzrNSWaPYxZodt4frNPK8byCsW7r8cMzcGeffp?= =?utf-8?q?9KP5gDLYe85A/kO6IZPUKWWycsbQm3KZpsBDwIswhFaR4Eo81PZD6SZ1kej7IZq2J?= =?utf-8?q?2Q8iX3lUV+jN58c2OkLk/rtkb0cGK57oQrbTR/AvOFPja/6g6/phD68VthUetrPAx?= =?utf-8?q?7QuZgB9a5EzXhS3T9SVTP2ELinS9+IkyuB7w1N70mJscb8djgX7Taw4FErS0pUeBK?= =?utf-8?q?vqi8bVgSBaqHMoaqEUjtdFWGRwPEv9cv4P/0JHNV2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cjjF0B4OnlqC3ZD14B+E?= =?utf-8?q?89bEU9fXiY+u9pp2eVrVydo9xKEfTR0VrjDPthV6Vpmy5D/HKijneDVJo4lcrG6rm?= =?utf-8?q?FIKQDEbD5js2VSDUiLbEQmAuntOP4ff6opRZQ03K9Ir7qtF8QJekFlhl6ApOIyC5D?= =?utf-8?q?ljOc5ekM/lGgsH6yCw8nXull9HsEZ71RRUpRkieAVIQYWaUBeOUt9Uzz6JBZArh3b?= =?utf-8?q?98mQZ6l0w4hQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54fd2186-051c-485a-0b18-08db8d8d08ed 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:48.4276 (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: r10X96zQI50bckvCV/62xAPExYVFpqRdSeL98EIJfWdM/uD1xQmqEG0U/IznoqkbhiDt4cIwJ8F90sb9D8qNRQ== 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: 1772460500639508308 X-GMAIL-MSGID: 1772460500639508308 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, 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?VhlSmdJOQoR6VnaZiqJOLYck7c0jurbYuC2oYg9lePGUSrcQSTBDEXhMVpoXvHcDe?= =?utf-8?q?77SXkiufCG8z3Hobg46QBRmOOnA4kU+33to3xXcFXqM088fEch5FDc48FSTKvjqeB?= =?utf-8?q?DUv7jCmhy2lf/NUx5ZHAXEQBnQYEGAzVnqMBej8lcQG2QkLniUMMgttcOjqfUunBZ?= =?utf-8?q?P/hJ3qGdy0FCf2dEztgwDZxZL/z3PE1Y/YMqwvrvFa/WUSuE3V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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, From patchwork Wed Jul 26 04:00:11 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: 126087 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp177686vqo; Tue, 25 Jul 2023 21:56:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlG6N1Lo+yc4YOAKW14syZgtLsWIcubdkakzbSJtXtxxGGgtP9PkvdcF65hg1x6ikttO0yNB X-Received: by 2002:a17:906:7946:b0:98d:ebb7:a8b0 with SMTP id l6-20020a170906794600b0098debb7a8b0mr4608917ejo.14.1690347396644; Tue, 25 Jul 2023 21:56:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347396; cv=pass; d=google.com; s=arc-20160816; b=jIFyPsNdR2AgtGd2EtbCTrodjloG0CyfE/WI4uztNDgKcMMUc7M1SAHl7ROsZ8H7Gy poXkUgWsuuqg+jKhURDjZ+RRZncZFN9bqh2HLSK4lDji3+BmZddJpiTqoiJUHUy2lHDA hJW4z0LSejm3MM9W6rDn48B/62avsxD/+4ymE/eh5Tj2gaFgHjd5fPYFMtuBbMhm42RZ U3NB7Rw+otqHczYu2ldJnJJSnXPzsrozYi8ZBoaOc4EVBSQadZuwGZvYs0/n2jVY3iXu BM7qVnZycFWYinOKm4SCUv8TXTbP1hqvmUTyMbqnDMLsQdYM36FUqRwfIIg+KoxBt52t k+3g== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=HHvOlta6eK1AA2sR5bvIgkaMscRkrn34qo9PN1F6QlW8f5te2r52oWVm4xRHf7Ingc u5t/zggUrs8mTNNOgk+3qqb9hB3VnI0N6wlgkXbjVM6ka2HvdRKdor0ncpCK3xbJT2E2 /IUnt8dsjPysTND00qSXPMH5QnYET6cSKDWKpL9skgPm84+UshkKkYoX2bsViKcPb8iq P8jbzUlJQzqvZrMS9gdnGqi4jlWUhkKvYl1rcAFxN3v8ge7sg7HqD7OZ53MLHvu/4U// hbnt21ZrkE984tNRLJlpP3Ym3pLG9tryAZqzrXxp28Tz+ZC9pruNcpB1cGvJHbcyJiIp vcQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=CS+WVAIC; 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 b11-20020aa7cd0b000000b00521d2800f15si9297373edw.519.2023.07.25.21.56.12; Tue, 25 Jul 2023 21:56:36 -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=CS+WVAIC; 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 S231669AbjGZEMw (ORCPT + 99 others); Wed, 26 Jul 2023 00:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbjGZEMK (ORCPT ); Wed, 26 Jul 2023 00:12:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::726]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C3E5B8A; Tue, 25 Jul 2023 21:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CEsEATXi4vJvSjKOTpFlyhFvLEKuvvHYmpk4IfoNCVeyPQ0nRdWqqgd814Ph9/Gf/7dnx3v0uQGjx9ksDAR+IXbZAMkko8Zr0CMIEmR5D/nwQmIEladfttrTBZVta4NRBMhmcqCx1Omdq/lL2VSWi+A7k/3S5PuzyTNuYNMHz1xPvVDYUjSTt7oIUhFWWC4bYIdRmkjqALCtR1aLSAxd94QUmVMhmSCjqxbGGa2vw3Rqo5nJsR0m5Ptc+RnYSkph86/RzyeQkfarSrv/uge5Edc5SoWJFSPDdee2pbKIePDJhbC8OL3WzuKvldmpvoDKBedXHvVjsEGnA3ewmwQNQg== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=GxBT+Hhcy4USKvZTP7Xs1bLKSbldIxbTf0WbxfCH/AuJJ0/mIEjwMKdn8UE/7BUqi52fOWkd52Vq4zjFyLlwTZHJ5Vcu2IIoYgMouxuQtmatkU0528N4OpmjfzY3sPcYto+K3AWpu0qM76NrHRL+82M+iLiXHNrOIg1TPi8lkBNpt3uTYzu/1BBng7QrTgrFxgMTF9G89A8WG8rA/s2+qxGeDgaQITQ8rixop3fqaV7HDLylo4sYPKWWoaYDgEwguOzAeiOIV3heIPhIh3Z/1fKskz3Og4GuJUsPXdXo777Sq+mWSSuIZ/FkGqdfojTGNpjS7ThXiYz16c1gbraCHQ== 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=H2uAnlw9We4maa9XEpusc3P6C5nlTy+13sm4GqQjPDA=; b=CS+WVAICRZ3m4k0Lyt1WPTUfk+Tc/204IPYE+GPOGZdIpITCixBvpEQ5hV6k+qK0YHCDE7Szu7XbGxpJjJouzzbeSwjDgE4eN7H0n6mFxGkhVYQSiQqAy4juOIymbM3rg0wWeaTCy4DeDvYrld8wcPqu3w/51RhPez+UnUFi74j/IX9KWWG610aIST3DmLBMqpikvn8C46pdKVftbify8Rr7k4VylEKBw2ahb2Wz/9TCf99ApPFf025si7TO0X9wyw4/hkCxXtH15mHG/PiKH2s654Xvuo1k+xurFYHYkh/f+w2GMEKIdnm7gGOwPRQKs26M5TEa/RV1PGWwl1qoqg== 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:02:21 +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:02:21 +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 31/61] mmc: moxart: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:11 +0800 Message-Id: <20230726040041.26267-31-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: 6e44c484-c5b5-4c1a-4802-08db8d8d0a82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U1EmfHqAPmtreogvysOGN3BAkOnMsG/cTeCFjlIC2G5saSYjc96p9h7snxRjfXNYkQQyJwPayKGYZLpW+pZfreFJoZAVPGOAPQLMk7hvwfA67uujdm45jGRnyp/6lHUo7QuKEXmOSheq0Kl5xk9oSz3cxnPBx1LNvhEnHCysbBI5Ut3VCB+24WjxlLXsP6OpoTBKVySZDjo4AA+oqyVvyMDpCTdFMyAcdmIPFKKWwkyreCTAUg9kNVRXwxyjE34C04G0HGlAm4HfScp41eZQ3/131ZuwjfnjrlVW7Gly/AI6VVehmUelMnkCfFaxdIynKVVSZ+o1ka4wtczi3DSzmAwUJy15itYgbHUNJ2IEohxikYprsDkBC6TYBv5kv8rteC2+l27x5Vn/Lo9NUoDwQHVnvNYjF8OAX9peR5LKErdMOWAXxhm0yZ9bKpBx/0XwrOftU75eyUZTgU2kES1snYSA9IcBOlbWsaD8q0eTmfHoUiwgUdZPhc6xXx2d5W5SMrgnAh84vEW+nY1Q2CNy2gAdEE+u20GB+9sbrmaEbwA9M53Lx2jNLnPPwE1i0De3Go6IdBL5FnVSu91rTV2DQEn1u6rCU29KBstKYE1SumSMbApB4X3KmiwUzOIaU1Go 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: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CzkGVqgbj3uuE+2c+drpH1n8SkXSSksvk8J3zT5tzQiVh+fzOV?= =?utf-8?q?KoH07XPnNCjtjcOZKIQJ6XRBIZEk70I408i7avzIr54l0oszhCq33K51LNExs7dMp?= =?utf-8?q?7iYaa/2hpzDJlzfgNqoW6NDa8Mn3zIAhqv2crS//QACl9vecvHN5hMR7Q/heVpXr5?= =?utf-8?q?ufuBn3K8Bj/zUcezzE+PIg4v8s/1zIbuQQnGATxBBLMI5NsOfLAzhySUhaUGbn7+l?= =?utf-8?q?tIKgme/vmt8C2oVn8YaWSKYMdxjPkl+VBTl8MW6y1azX6//0C93mO9fP2l2LT6dx+?= =?utf-8?q?K5gLEbFPbQTcXGUOWdeasUC5v80r4+YsDnQWwdFn+GZ7IpAgE4O/M8rWuy0mx/jrz?= =?utf-8?q?sW0XYWm2IGGSk5e55sMlrJil6K46YmQQqcxXQVtgpJ40szXfAkRIHRp80JaZF5E7G?= =?utf-8?q?hjCqxO8lj2DYKLyQYCSVtTvLtBu46/y8rGiHXhK0WJrNc9Msrhh7/T/mYUGjLQrfa?= =?utf-8?q?nsoIJnXHZx1caTGXfeonRtZQIt826RO2C5Tcm1rZbKFJsIayBJzxVMJUVf4w2mTiz?= =?utf-8?q?RrYSe6flH+XGtbb5jk3CXPuhE4pcOWeebQZI3r31ivRKPbxmZAN0rS2Bl2UOVCc91?= =?utf-8?q?4aYbYmkAhyrHbWQ2KCrAk7PSxOrdUpLJXI7urtxhIMptMt1biNTsPWuNKLgbX3Vrk?= =?utf-8?q?56EiELNbRvbv?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e44c484-c5b5-4c1a-4802-08db8d8d0a82 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:51.0575 (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: iwkVEtilgjPw4K0guIQxAwA6dI8LmTfnf66jIh7vYdutstuwIaxVpYLfJpan9+9PB7BTK8hoC1QtKFcirAPblg== 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,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: 1772457712138563824 X-GMAIL-MSGID: 1772457712138563824 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/moxart-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c index d0d6ffcf78d4..6673b95747cd 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -687,7 +687,7 @@ static int moxart_probe(struct platform_device *pdev) return ret; } -static int moxart_remove(struct platform_device *pdev) +static void moxart_remove(struct platform_device *pdev) { struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); struct moxart_host *host = mmc_priv(mmc); @@ -705,8 +705,6 @@ static int moxart_remove(struct platform_device *pdev) writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF, host->base + REG_CLOCK_CONTROL); mmc_free_host(mmc); - - return 0; } static const struct of_device_id moxart_mmc_match[] = { @@ -718,7 +716,7 @@ MODULE_DEVICE_TABLE(of, moxart_mmc_match); static struct platform_driver moxart_mmc_driver = { .probe = moxart_probe, - .remove = moxart_remove, + .remove_new = moxart_remove, .driver = { .name = "mmc-moxart", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:12 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: 126105 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp186841vqo; Tue, 25 Jul 2023 22:24:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJNYGc4XpBHyzmjzXaEDxyR3qIXPasrhP6Wd//qjOoCWqQAHSwioDY0VPt42ubEz5P5ki/ X-Received: by 2002:aa7:c50c:0:b0:522:5778:aed9 with SMTP id o12-20020aa7c50c000000b005225778aed9mr676787edq.19.1690349041375; Tue, 25 Jul 2023 22:24:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349041; cv=pass; d=google.com; s=arc-20160816; b=Vwu3pBDqVEjYI6B5OkY/vUVG1wNcHRwob+htqMmU+SZinbdCLCW+Q//UCBk/GvMwZu f2hSO/8jeg3Pf4COQ21AE0iaTSLUPn5VSMrJTWYpEKPE6Y52R4iXB0Yplnw+T0oCpuF2 gSzrUnr2iLFccGq2P5XVJfol0CoYa8HaDBRZ4040xtvyLDNGdeIoRaCcFBJJjSLZxY+M jVSSQDT2wiaoUjhmRD5CFkaUOkDS2KqtomjykvtvR0OnD5DPUNdunwdvI9uMBYz1a511 RwUL2h2IIzlUnjIPEsEVkOLtI/pBBnPWL16dX0GAqy5D2/Qw0L4TpMOcs5OKNBWw7zHb k47A== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; fh=sF9PDWD1dowmsGW2YAvM25ENNNz6DTvxncohGgNxjqc=; b=dvsheCwKKVtRRYIJm64RKO08MK7eYxs/f+b1pRy7bTAcEHEfNKmGopV2GO6UOr0jNL cKcHmgN/PZzm+l+yn+irehH2gYXrkkS8uxF3+ivTyF+x8n4h8bJNZHbtvYiXYwd4u7HD ZqQKqYiFjNj4qx0bA8JIdlRMWKyCYOpC4TBJZVbFivZyiavkfApGqQLVhDBcppY+pZs8 Z6lkN/46g1TaRqHUhK8w8pefZ2g7qEn8f21ev98QSImPkHU45gu8r6aD35q2vnO1JsOw yW8Z9QDR2lSuO078S/+uLErzIsBvSzSWTPrI2W8crLKoRmpjNsIlklSIUWXcEDlb0gbc Bk/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PmtQFItb; 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 g16-20020aa7c590000000b005222adc64f8si4633326edq.405.2023.07.25.22.23.38; Tue, 25 Jul 2023 22:24:01 -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=PmtQFItb; 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 S230398AbjGZEHu (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbjGZEHB (ORCPT ); Wed, 26 Jul 2023 00:07:01 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3C833A9E; Tue, 25 Jul 2023 21:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IPPCNJ/LrNLvZJ0UDolt7lfm93qpB77gnNf+uQLBQmQ+zTYwf3ob3OVFN8orfUTiZGSG0x7RQ5w2z5QTiq9y+Fn5kzeD0/3rntqItDn6UFmOkRYWwsBC7Z0/XdJU2D8t0ntaHGWg7ljwiEyU6/tOkvrc78peDI7EJq+AAI/x/0eW84hXc3fd5NK67RV80iYo4IM8geju9Elh3t1ba3U/9CKdyNArkA/rQ2bpVYe+XGtNNuneUlzwOCmFBe3JBREEo8GtdcyrMW8scKt7F6h9O81uVFPt/suIBOT5L+vqF/Jr+ZcEJuk39jrQWCGpI8AdnEv+nf8tHsSPqcCna3dFVQ== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=A6Fo7jvTFmzPTiZMnf99xtU775P2N/M5/X84Jqspvvs5vgAaN6yiZnicRowwJO98I1ukt3c2DxH9LkWu+5fXvp2wOUPFvm1mRR0SDYzhHj/Xvw9I7nvHMgNjyYV0b4X1gXhbIA4sPgjRVDpu1is8bntjUnf4YsV6zExgzl2615ZEJ54GBcnvtS6WbM4diLiBgySn2d4qU4M9kAXZuQzT/bUo9ohAUGsU+/MskZ8wMnBg7otz873WV2kJaPSCOXEVb4iPgeboWv5KCouO5Zz3knIdgohkqIzEx4azjRmpq9tvFWEMrZZexlaTp4rtAzO2XOZxMf79s9H+t++qJz2c2g== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=PmtQFItbhCGE2SRU92nXJFTTepqp8R0Y5jhJ8966P3Tl2Ez8/9kT9WiCqvgO4Pjq5X52pnEI/IJ9GwstBVAEdRTchQw8/TS49RGGUz+O6rX90/vYKMaKhL7nmYCtW/nnpUCxwxCjnMXd/7GKo6/vQ5LOvxKdnlGE3E96Q5f5U37AVyhZNE7SjfrKhDfqsyRZRdCt+1duYhUhg1L876prMms5VrBYlR4mT9SedQQmjWUBzD1hxespe6qKRVtx3njMwmUG3+AGoYlAy4p5w9Pebqvoy0c1eigdbSrwQDvoASbz5dg36HSb+6+v7QdDMilC3Obe46SfQFEomyEPp0kDYg== 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:02:22 +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:02:22 +0000 From: Yangtao Li To: Vignesh Raghavendra , Adrian Hunter , 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 32/61] mmc: sdhci-omap: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:12 +0800 Message-Id: <20230726040041.26267-32-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: d1927a0b-59cb-4a48-6a0b-08db8d8d0b94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gXxoFi7EEnnvgb6Vkza+dHXokHCSBivMqhjtMJjGOyuZwU2nJ/1KiNLwbXTG4rsE/znU+3tv9koS2KvhsdA0A5/osP66UDkQ330FVX9BE17UhBhu3kYfJLPJtYth+QATAp11pOggwSbscFVfLUs+RvKFtNYa6/O/A2QiGsA32N4eS+eXnT9DQ9nwIjB46Oqp3eqmyRYz5RNUqii+bGnOZbAPFOwPUU/pOtnn5QEZCXBHDdML/gB4h9RIB9AKkUsFlMgJz5DxsWR2ZoKJSqliRqOLEYM2MDYHuC0KcnTZ9s1dvChpWXo9fqvSO3qA1bcGPgDANZPN7Z0s42Jv34NqHp71s7s42a6hX+zRjTT14QaSvERx1tjyLPZpEKwySTAe39CYCdMtvJc3ALhrGG+pQVE416SOvGXjpebLRhPr0aJxEEVibFV68GveAKnLPxKrtExKTmRob0sHBXOfewbUZYIcWErmX4ceGNGr1fi18EB0WuhXYfC7Abgz7aSK4XMMKgHMM2xFwbTI5dRFNxl0XDetuqfvK0hjp/IJmVlESfqAGaGRDLuKx0twQjwmmLASMi9ATXeY1ngmLqcOcbzvWDeL5A6Xt1nuXYWYmB7WvgoNE+05KRfqy13OydssL9WV 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?E+XQomqy2xz+eFG5vcUsrPFKFb6P?= =?utf-8?q?0ybdSS2kPPSQQdpTdwKPBxwITkMoZOcmBowD3KOCtQ1oUpjqnbX1jnxnJkntqu5D2?= =?utf-8?q?tkG7ILZrG3I96q+rUXkN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9TY3Jl4arQ83hIYGu7agJ/XupVNYl3vCH?= =?utf-8?q?BuEqO702SgkoF3f2aEhfKfJoU4QM6E4+Cl+q/SeyyBbGgaFlgxFoVYXxj9luecq7s?= =?utf-8?q?854fFJJLQ0Ub+CE+VdcWOPa/bH3QZzP72Wp1Mj5tjiDHBH3MRFmoL1lfs3V0KYCfj?= =?utf-8?q?o708Yugf01V7CoTW4mPTEUnJIgYW22FDz68MlSlChm8Fm8u2Jf9ECKQ59vNM1dupX?= =?utf-8?q?ZWDZ2GQbfVi3h4h30eznLD4DDXN5Ng6p5jTm1oQ4RWQ1NOkWcZOPLEpLDKeYOLHqT?= =?utf-8?q?luH7hMQ8te+oEZoX59NQW3yJ6JFjUYoUGm+KXI7R2MLy/c5U+UWU0igC3/HOONdst?= =?utf-8?q?UVy/ksulOjT9JcH6l/8JWEt2TbiQrGFeFCxDpHu++u9l0S8580nlj1pt5griWILfc?= =?utf-8?q?0+SsjbOVKSGp06ERb8FtchHi6kObP42Em7BjXdj0EbMeNUM3qykSF32JogEOpydfu?= =?utf-8?q?nRyXk0oi2nXvFE+hqCLBcK6RwfaKU/wL1Tipc58hlbB7RUFMbvMwkrMHbgSworbod?= =?utf-8?q?F2knH2AjRXh2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1927a0b-59cb-4a48-6a0b-08db8d8d0b94 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:52.8721 (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: 5Fx3Iwgo3bNluQYOrlal14rRFZY217JDZ1PdprAmV/HlHH0abJNHvNupYIlyymo00uMHvkLzuZ9DYwDtHMD1GQ== 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,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: 1772459436270269198 X-GMAIL-MSGID: 1772459436270269198 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/sdhci-omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 8ed9256b83da..6aa77eb4a3fb 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1394,7 +1394,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) return ret; } -static int sdhci_omap_remove(struct platform_device *pdev) +static void sdhci_omap_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sdhci_host *host = platform_get_drvdata(pdev); @@ -1408,8 +1408,6 @@ static int sdhci_omap_remove(struct platform_device *pdev) /* Ensure device gets disabled despite userspace sysfs config */ pm_runtime_force_suspend(dev); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM @@ -1478,7 +1476,7 @@ static const struct dev_pm_ops sdhci_omap_dev_pm_ops = { static struct platform_driver sdhci_omap_driver = { .probe = sdhci_omap_probe, - .remove = sdhci_omap_remove, + .remove_new = sdhci_omap_remove, .driver = { .name = "sdhci-omap", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:13 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: 126090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp179286vqo; Tue, 25 Jul 2023 22:01:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOMdu76utWmlUAomp8+THcxpMZeTm7X/AZQLgsOveaHkVClxzAvO+giLsHyg6t1gbF3GH3 X-Received: by 2002:a17:906:4d2:b0:997:c5c3:32cc with SMTP id g18-20020a17090604d200b00997c5c332ccmr684865eja.66.1690347689178; 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=c3yoK3smIIShzKIjmUAJHm59otw3zy4EzpWC4voo/V3P93PptItA6AulAzRHurQxeD yjwitKjWqWa/k/hThb6E1gtfmLikruX+mQL2ty1wq3Tc2DgYlL5kyGl3D1/UHU8vDbhl MDz62ThRiKnZInqxOscKGw5Jsp+MLb1YOZXwiTHMHrB1ZYUznhZKgD0M845yKNW1pO08 g1LqUpdF4kQKRi9nHHH0FYjNqk6rkB2+Y69JqnrHbgC71sBNrIS1qAlZJo3IfdjQhqt8 4Dt8lsPxr88m+/ZHqOKry+KHesSjFkA8Erbv99Qs1e3BZuFGP9BLPIHVa97skwZqPfS+ blKA== 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=AoA9//5kHHjTZWZjeepbfNiubEEEDDWamxoqqTR60BI=; fh=Dum1SMwgEGk1fg5SRoqtuB0lemvsC6TihB1EzSc/Er4=; b=wrG0p4w0ltMBL7I5eHX+kAKqsu/Ub9pMX3crz1q1jJ6ofmzgm2GikrSS++KdQ8DG/j BIo0kmpOCX1xTfOGtkgVEZyip8DXJuGz5IUag2hNc/JqcXAV/qxVWGPktnFNOkapJKU7 CMQ3EUC/aYQw05sU2YdIdcdovSipw2E4W1wvej9cshCmrqtJF5YVuvpNDAz/ACUakcSe qPKFL39HNJkUGg7gW2VBYYdj7yL/WvUJ6lZK41jHuZm7eP59cfLtW9znCooRJxfCdKo/ Jku4Tf1PAhFvsOwJcPomip2m7//Bbww6oQ7/3JFcBScVLhIiIdeozhjx5Krlh/VaWTRm qzkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Y+RlYzyu; 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 p7-20020a170906838700b00991c32f3565si9002483ejx.30.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=Y+RlYzyu; 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 S230269AbjGZEFz (ORCPT + 99 others); Wed, 26 Jul 2023 00:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbjGZEE5 (ORCPT ); Wed, 26 Jul 2023 00:04:57 -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 501FD268E; Tue, 25 Jul 2023 21:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NViTL0bx+Opwo1OhmsO4amyLJzeyGnJH3vnAi27l2HuGZVmwOk5Lm447HWX/vUA74jUyczquOlo6uZndk2qY6eX+m2jEfCk3oiFTSNDr6jiA72TxVBLXl2oM7+ZJA3KsyamM8Xo8Xg03KaUYu54KRMpQvjPcQN4p+Jj4ArFLgtl2AY/dbxV685YHHyVvVgfZNJFMTRELEaacz+6Ja0FQRON8axDQSvL6qUUqvRw7c0g4jJTf8JyvBg6X7vcaootPdjlZiRigO1HO7OwLYPYkd4axiAHRDa8NY8rUFd2ZWajWmOMGXXPYITj/MAcPl2jPfj1SXTKN+IIXP47ItZPW8A== 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=AoA9//5kHHjTZWZjeepbfNiubEEEDDWamxoqqTR60BI=; b=J8JaQw9Knj4YM2Jeui02azWhofCFqaoWSwrqaRPejSb1Tn3UkMt3zBvWbbzf1sd1XlgEiLU8xBfyYLBs4IcY2enss+myJPqK5XJmDHPmIPty/7UhwRlbtZ5WsBOms3LZSMbbLlL1+dNj9buo7YOz+ZA9zrrRAzxSHKTQrO6vfW5K8TmuLO5DpwlzoIfvJlySaQxJTcglqLTGrIjMEBTcHgtUwKXBIKX+YPM7uYk/cGfwcy0d2qNZJxM6/5Nm3ETD9k2Es+0xrw+8T5i1iUV8mI/fNyVDWMsXJFesqifQR3JGbgeu7g+qi2ugaejx5TBaYAGQUFLIYiK7/JYCIGXOrw== 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=AoA9//5kHHjTZWZjeepbfNiubEEEDDWamxoqqTR60BI=; b=Y+RlYzyujhBusf25BSQI5W/2vDTLL0YxmlLJLXQ5JRA5hrPPypyk0q6i7XFbUGD5Q4QojwPI2SbIJCXM3w3J/bCY4smoQ6psY14G0f+6xGFUYAi6JvZzuPbh05tGUgImFwlfxwMrnToSd6m2FgYgbDxbNDPSocaRpjX9DaGy4uIE221Y8DrTlkUjFvg4PLwiXmtx+O8dfIVQzmNwu9X1aSbxIpF92oZ23WHoBpgS3LMURY1ZBlR0hGEFzp5u4nn9nSBxeGQ7qlfUK38wQUhWV2iO/L9Vg9F1KN90p0tnHgDxZAyzzMNVu4+vNKKrNPLfMrq1SNjN/O6AcLY9HA4Jpw== 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:02:22 +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:02:22 +0000 From: Yangtao Li To: Adrian Hunter , Andrew Jeffery , Ulf Hansson , Joel Stanley Cc: Yangtao Li , linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 33/61] mmc: sdhci-of-aspeed: remove unneeded variables Date: Wed, 26 Jul 2023 12:00:13 +0800 Message-Id: <20230726040041.26267-33-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: 04768a4e-f160-4414-c11a-08db8d8d0cdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n6jMPVaF8l+qYUI86EW0hbdtamj7x9YYUA2em50Ww+gYGOmblsRzIp7Ne3VBf1K7rvshuxA0i0DYxgjTFheH54WtAnl63fKn2KL+WNW2baXQux93k56vxHtsV8dBYm9iPfjzizmLdbJmxA8LGIO3ZRb9EEykNAj6kB0L3PJE/PyVyk6R8HSOGwImSJlEPLJrp/QqV9yYEgN7C/6BZcza7xJKx93Wl/ZAsgFu71EXMKuPhLJUlF/jTPeVXf60Auqj+tRO/94L87PkCrf7bniycCFQfabC5fT6IOq45yikg9rNfvhzEKg/oFV3A9bnVt24g9c806+Vs3DhgkQIWWS1nUR++NrLe8mC6wR0Sawt9iYdLutDuoiMiVDt6yh2P71tuJDQoo0jLKNhcY9cSOfPZEQmj/tkZSr1/QB6t7MuEpZoEtHejrynTVzMNWOvQT5pvBOhvPfD1KjpOsG/Lm9k5o43EHX7ng/HUbsYLu8T6KWAXqBt3CTi9mC4+WR6/uubgVv6ocQDC3UAcs8JxPslku5boPaIeqgYJvpCbZyb5LJ5HvcgExM6o4Z9iXQytODGGyAVfxjH2V0eK1fT99D2n5sdHmXFmlFywx8do5vZg96hQ0mQeYh1uVwbQLDBfwiE 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)(110136005)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(4744005)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ySiMMvKQq1lNIHu5yDNHKuT7lvcme/+vpzsz65JJojYuaA1li7jbp7tvI6HQ8Z/ykk3oSETDZ/bNm4QMaMJRdkmJtcHnuQjNYXNkI962VLGJne/ijtWnt+1mNYqKsoyK/yryqF6/GfV/kgVcr51UOoAhwpGh9W2JPszOP+UdJDvPUej1sxll3D0VMRgTHM42N7ei8bjURLNMf/Ca4HEtKdgRrOZ4J/Pqw1u0rafxGZELIlvovLwWjXFN1e3tTq0yKJ9sSwxZ6PRTPFqK1lEbmWs0P+c46+Ph4WHreHn2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zJepPsyqwh6XhlYaM44Obj1UTv+1oF8367p3xGdDRzAjx0w/iHEs7vh1cIqP0bEvWRS3yoizjpOIlgh0c2G85jLurSHJ/yLXVt4IuUkP+OUHo/mtq5xY6tBXh+D0SFdytNRwK4Gs3VzCPM6DgV/4Kew2qLWYeWeOPrLT8T45H1N1BhXM+cYyMeXO3OfZ1pwH+1hxpG2Q8nRUGaVSCP X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04768a4e-f160-4414-c11a-08db8d8d0cdf 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:55.1175 (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: rMux5BcvO6rt5Jc0VYq5LQvVzTOk9FFr7OPfrGvPAaDBZ43aQHSeCP2ycZEe8w0dNevu6MIoWsIgo53mTnm0+A== 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: 1772458018637571059 X-GMAIL-MSGID: 1772458018637571059 The variable 'dead' is redundant, let's remove it. Signed-off-by: Yangtao Li Acked-by: Adrian Hunter Acked-by: Uwe Kleine-König --- drivers/mmc/host/sdhci-of-aspeed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 25b4073f698b..b4867bb4a564 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -454,12 +454,11 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; - int dead = 0; host = platform_get_drvdata(pdev); pltfm_host = sdhci_priv(host); - sdhci_remove_host(host, dead); + sdhci_remove_host(host, 0); clk_disable_unprepare(pltfm_host->clk); From patchwork Wed Jul 26 04:00:14 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: 126109 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp189847vqo; Tue, 25 Jul 2023 22:33:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5VkeuL1DcJ3QLCPLybfFTwUqjOGKpgT3Vo/9c8de9wWSYQPQ2MKviXnz26ExOM+0s55hl X-Received: by 2002:a17:906:1054:b0:96f:b58e:7e21 with SMTP id j20-20020a170906105400b0096fb58e7e21mr799109ejj.52.1690349635613; Tue, 25 Jul 2023 22:33:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349635; cv=pass; d=google.com; s=arc-20160816; b=LJixZ6+DS4zyrjw8Yhc7hiV3k4GK5vo4h3d6eBv5QFsRghPsemQVWHqFfPwDoITH8G 51KQ1Wn55XotrgH+9VBxeiUnBIA9VTPTZ90WXWmtT7FwgRaMyuPKVp0E0XxJ3dMNc08b D9NhQ3TTdzhpXB+JTsOr10jGfLuKNZF6bTyi1FDV6wM0O8wQSAvwR2RZp6Ec+bW0byYs yNLKTu2nOwEFiu+69txI7MerVSdf4GPhAZM8tjC0iRhjxMHWCLp0jOLh624bX3gUYbSL cidKrbhzQdqOnZrLHVitVsG40FXbwEI3u2Uoitk/MuujH6r3Tkk/KLIBu8b4QOt6XpNo Jhbw== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; fh=Jptc+LQTdIbOXFIkBDUB9YnZRWZjO2vsWVpX7sYkr2M=; b=f3S7TuH3ybQTJwrqWbYxmo+CrAmNWknsfw4EOofB5oqa5Rwa45BMlScGA312E4fC36 Tp1Lq9OHzL+3XGSIE9tABUwdYWF67A54WDgIqHwBAcxMyeKINO0ofJYDv2WX5vTDIyhi m1PsPB71gn6vUUMIA/UuZ073YsZfFwPO4WJ/+yIqp8j76YPZv8CfU02f1j5pjaA2/x5b gEwVnoHeLhHephabe9tJaJerj0ffm+whP75lWvzRqys4APTPPv5TxXTYbGId+fOCCGcm Bb6+Su2PZCgMQ+t4LALA+II5UUxIEOx01qSd0YhAL0jIsHb5WE2R9hBiZK5ectABkYLk ZaYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=eRk9lzqK; 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 qo25-20020a170907213900b0099318060d50si8897446ejb.463.2023.07.25.22.33.32; Tue, 25 Jul 2023 22:33:55 -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=eRk9lzqK; 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 S231314AbjGZEG5 (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231484AbjGZEGL (ORCPT ); Wed, 26 Jul 2023 00:06:11 -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 3C53D3584; Tue, 25 Jul 2023 21:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRcr6GvyI6r+N4RtqYBgSteXfAGzVARxUlOMDpoYzNe+xPI7rSX3bBTE6I+s3NJYZEUctAbCSdbaFIMtvTgn+FWO9flTFwJlOh0aWixO4dYKeBMAN435bmzYhJRimVnqNoyRJfywoNO4cq2oqjmzyoFU9WAeAg0pZFUY95Kd4PvzAQh7GfIJE3BUBU6sHCjLnrhuJKcr22h/NBjdKI0k865XrfumTy4XAubMnLQEhxRC7QeYSj1wp1ttx+FN36vbIhfGxU4IKyU7pJRlrMd+4z5zmdKPKOs4vueKzGRf/jd0FMtxv8BGIX02uw06dePe9oLKUgffuhrcluqqnLjl1A== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; b=XtfsNo9T6JbDoFwlNS2oDSYVSjtLjpWlQcWJP1uypSssT3IXmToaT3MrVt60+1NHZ9xwlnU7NgKHpaM2U+DNdNBLlJi3lEMLAa3XUG7o5f6tEjYoTp/V02uNHTmGy+Aow6rqUmqIcsJI+qJ6rgGCUVUOKpOReNCZC+f1mew/K+2bE/oP5APx71Y2J59CVTQtlwOkyRraNKv2Ss6tI+7+S961wbd/HstFYH64HzF1CQQwTFHZgDT8/zk0Hucwujz8WDGGiwI2qJi/BIJPVUBG0ITmIGPfD0Oeds05up/Ep3QoQOwlUsls/fR5xWFCgVO5RF1tFcZQGGpA3mvNjpd+/w== 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=SL+uaG/CbNsLa0Cs8xtMQR2BILGVMnWVziKyhMdPUBs=; b=eRk9lzqK/c4TbgffYiPVQ3xAMjZLkFoq3nlQ0LelWSdxzJWXvMMsvVN7R9oFjYYAj4QS7xv43bo1DhzWTZ38pvtdgSKvWEQnIvFGS2TeZzt/dSEAiNWTXc6LRMIPfbNBDP2yNsHVLhfeM/Pe8XZ2UdQ6QEuhsAtGhFgfg5nXoxamxnUISyZ+7NkqpGTzEnKaEgcaB86PuFOBYO4kh3kP1nkJW/8kkaBrAX3BNKD6JddOIcLMk7ug8aXrUjytVBdmJ1WsWH7Uvyy3HgPlJs66kBYZ6AdSfU7EIKj2MundfSa7GhRzdDtGKiMMpPcIwpSEob//I1WBjctHKC7Hb4SYbw== 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:02:23 +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:02:23 +0000 From: Yangtao Li To: Andrew Jeffery , Adrian Hunter , Ulf Hansson , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 34/61] mmc: sdhci-of-aspeed: Convert to platform remove Date: Wed, 26 Jul 2023 12:00:14 +0800 Message-Id: <20230726040041.26267-34-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: 9543a5d9-0198-40b5-68eb-08db8d8d0e1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G8nFtWWDBxNme8NahD5mEtI8z/qWLXeyf5s5aIihpay1XlVsVhWi7LSVpHDSdaHrnJ7kT7Yk2xPz7cqANqBy/yhUaBTt1wAZS8H/M3Cild0aBWZDaVmLYxu/Ke16tRsNYbwm46CzSObAxAvQChVAiYUv72mw7TjZMzO/Y4g8MwNctTvZ+IpGBus9yB3njUv8AN1qMlb2Wg48OxJnowL8x6iaTU6Z5F9c9f7+pgK6ciSwYWVTqbZi+21nm7Ft1qJSvGB4/FZ1cuPTNGLuL/hnRUsxE8vnPih2cU5pjFF6iBzEKLg31yZPsSvx+Cywt72xLHG1bUcAnOmvCCdxAQ5X8GlGJTKNxWO+XUy/B8LVlg2IJlrBZU8CLVK1I708ZSX7UlDLJ5yPDqUc6eXz+WHT//kkYaHvEAeyxZIa8FcG4FXnZCiPMiDh/QVczqyOah9C3Unk4LeBZdpA1UUQPkkpVvL2LV1HWNa+dr7s6oA+LsILTBjKo/wlOCgp9UXZ6XUsLKnrgV9k/bLRG0Pyo/90vyTARJAV6ykEuxV0uqQ14axsKOEBykXpiypxN45HJXPXMDLoj5XQkYdAlAOqmzBonkxuJS4S90YoTegxrJo4YKgOex9N/Ej7PeEAXaLC4dlS 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);D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Arp+UaZwLLzrxkSqPpTq8akS1suAH6AG?= =?utf-8?q?1Va9iCBOsvDyMz/VS0fSspcinHs/03LT89GeQodBJ/e+8AzSijnYRSN8gSH8rO179?= =?utf-8?q?99gl9Ehk0crWYBNMBBcY6N0mVqYKxnIkkoN+X/pUZ3cWMS/i2oAhBZqvcEYuvhBcx?= =?utf-8?q?wVGBkujUO/f8k5QKq2m20YlXDhfqmTXFdxa7Bno2JgaA49IggMeJMUZNpxPC+W9ZN?= =?utf-8?q?C2o2bEc74gKJwF1m8eTblDjx1ngflcfzObh1NKHCKNj4lj6LdMmpzu6GsIYivpPPx?= =?utf-8?q?6OqUtXrrsZN/+YfQoodp/kCb4pU3EF9VyCkxBuK96h7wicG/MgG/CHY+aIwh9Anvs?= =?utf-8?q?nbdcauk1RX8yWelqpuZQtQymn5DjD6FzLHeTGhU7TUCNtHDy3S1qxLGvjg0xCOm1q?= =?utf-8?q?9SOLcqrJxWKqkVoylMOEALzO6GQ7XY8viRBavjZCkTOhlJZE0MBoCQ6B1uubJepOA?= =?utf-8?q?trNCZYYZB9BRWMI/OXHYQ6dSxXk5KkimMML2KAIqRapgxbN9NP1XD3fAUJnwEwBQ9?= =?utf-8?q?C9oxtpAwi5zywZfUVT3trQZHKqSeUicwQVfW/BVuxuCqPggz5yXd4HeLrViZM3pAT?= =?utf-8?q?oG3SkH8yHw4g1/Aw+m8pjlfPcBJFAcuMPB11BU7h5VOUGt/DCb2cdnzgb6x0MZSWQ?= =?utf-8?q?gXMUOm6p7pmV4y/SkWMlP5z285enX9x1CWaQYjev1D7l2lgkEx4UV/xTTTub1ALaj?= =?utf-8?q?ujy7m0dwPkm9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9543a5d9-0198-40b5-68eb-08db8d8d0e1a 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:57.0789 (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: /Paimdoq4VWZcXlmYtKQ7daiCGmdUnYltTeKTn/2ChHOwc5G2cxg40kJpj/4an8YsV5Lr7C8L80rIK9OxHphrQ== 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: 1772460059808408737 X-GMAIL-MSGID: 1772460059808408737 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 Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-aspeed.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index b4867bb4a564..42d54532cabe 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -450,7 +450,7 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdhci_remove(struct platform_device *pdev) +static void aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; @@ -463,8 +463,6 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = { @@ -520,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = { .of_match_table = aspeed_sdhci_of_match, }, .probe = aspeed_sdhci_probe, - .remove = aspeed_sdhci_remove, + .remove_new = aspeed_sdhci_remove, }; static int aspeed_sdc_probe(struct platform_device *pdev) @@ -573,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdc_remove(struct platform_device *pdev) +static void aspeed_sdc_remove(struct platform_device *pdev) { struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(sdc->clk); - - return 0; } static const struct of_device_id aspeed_sdc_of_match[] = { @@ -599,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = { .of_match_table = aspeed_sdc_of_match, }, .probe = aspeed_sdc_probe, - .remove = aspeed_sdc_remove, + .remove_new = aspeed_sdc_remove, }; #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST) From patchwork Wed Jul 26 04:00:15 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: 126117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp196442vqo; Tue, 25 Jul 2023 22:55:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGcImXvd6X85KcdQnp1ei7U7w/g5s+eYklq9XgTYAu4apuI/7GvDkIzJ1qgSq6bLy38wDOu X-Received: by 2002:a17:90b:384d:b0:263:41d2:4e2 with SMTP id nl13-20020a17090b384d00b0026341d204e2mr1185048pjb.32.1690350936664; Tue, 25 Jul 2023 22:55:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350936; cv=pass; d=google.com; s=arc-20160816; b=p2P7D8KITZWV02AONlFQid8p5b2U78OSc39c4XNqsO0hXfW4uqupoYmEKAyCPOCuqQ myc3OSWTxoAFcWhvlMC8H04gvVCF5KIBx577FFJRvupPXnkMrG2u+zYY5+0xeD1LRSse DdfoZRYxhOfSNwHIgdBhhPUAztAAf0QJCoXDJg7tsTPN/ZThFrl6a2c/PkccTeSe0Y73 R3u+p+4NKhWkZlZuUSbCoNOoA+I5J+PyXq97hv0/ggU9azE/mp3lbb9Yot3dRHkOiMOX PLCvub5dDwA7zkO0UgWsFIIyFoMgk5mBor6hslL85x0Imi6FK+NQ+71Fj2HC8baveWSh k2xA== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=FANYlI4fP1NEiPsb/xwJvvhkkM6r/rkafBtZvr3AUOjXC7bOSLCxnQ7lMBMJRZ1KFd bNPF2DCV79o+ZfIFOjG4YJm2MDdKrF4dXVhXiHYU+bkHr0R+Ymh7HIoQwNpBP0drokHx ijzqX4hEWSQvwMpuODdHJzgyK+Gs8NO5fBY27tIP1vklKFmHDTc0vxCrBZKusLiTHiSF VSVYc7wiQARexrcZH0gApw3OpvMvzQO9GPmaoJpII118SXuIFsUoYaDvJkkh3jHRL//f oeqTVmAGhz7RGfRIVkhbsxIK+6kejz3CuSEW/zzCYwzhvD84s07z8aJGPE81j0UPMw+a azEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ojocoCYp; 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 n9-20020a17090a670900b002680cee323dsi604861pjj.119.2023.07.25.22.55.22; Tue, 25 Jul 2023 22:55:36 -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=ojocoCYp; 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 S229936AbjGZENb (ORCPT + 99 others); Wed, 26 Jul 2023 00:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbjGZEMf (ORCPT ); Wed, 26 Jul 2023 00:12:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E979049DF; Tue, 25 Jul 2023 21:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G4V/6frPZcW4FMjoVNkOcaspGo+swmq2yx0C1PyQsr1vJecn+L1Bqt+GK8DADH2GnopsNO0d6OkKjDRqW+nqIQahoPl9Rr8A0cYQmnhK7BumCG9QMj29g1/65hdeaU9VTlXge0QfnBq8fV79OawtHnLCgBAmuCLtblboYv9T+SJ89jGCGcxDDD3W4uEu/V1kYh909ZsCH1/3wiTYknXm4/vfynfmAApzqo2P3w/crFk80mfCc1d5I4YDYqJYLKUHG1PL9pEyVBAQFbnK0Yitba7emlGdU+Ltc6uVnu6a2wij4lxBwb4Cr1eo/qUjIUQv3r/bZ3aviXMBoW6HsT50PA== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=AnKPJhoVozAzcWi8YwnS6XpJOWXaUUGiesAZtgULDHQhmjM1S7KSWrDr0R93oX3AQpJG8s4cDwvPcUKALxV870v061aus2RPFy46eTHwInpCHQVDwn9AymyzpXsPoR55ss/6qr6kJ9ysrLNn9hKl4frp5aWm0uHTJ17NLGMXlKL3DO5sMgBAdiK+2Ymk1P0ATCz5VBEoyt+Z/EE26yiym43gqMhhhRBzTr1M9jbPlUhl3xdT38c8NZ6x3LFbReLej5KBvzY842/LJrUnxN+y3fmMbzR7lIYAAaOH6A8yEIGkYW2OVEqsLG+RYPY338yWkLJXMzZgL0nMWOb+DlD8sQ== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=ojocoCYpCeQjEArK5y0HDcpzsvhgA5hjZkQN2/9NDbl7IUVbgsoZxI7kItuaOlIv0ZyAn7/ZkM+9jTxQAKKL4JNTDLuQj4b7pEmc57cJjaf2BjMIGuGwxDZ4mIwqgjohXKY/QyH3urFLpssNUdwVvx927ExZtWmKnbQ0QNc8GDk65AQqGjO27EmugHuD5kxeGtjN4gpVi/Rj36Cp1Z09dwBFggSmDtXlLL6DqzC+FPLZc4Qk+4vc78W1pxQXheqongN7uOBIG1DfNiZnz7TK919VLyeKvn/r9ttxwKqYWFycxoK8ViYfKZMIu18j5aqkSqQyPfd89xn5EfFHisdc2A== 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:02:24 +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:02:23 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 35/61] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:15 +0800 Message-Id: <20230726040041.26267-35-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: 37aa22ff-92ae-443f-fe98-08db8d8d0f41 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hbam9d6l7XOUl6ysMZwFRiRuBIQrhp5a3KR48jAH9K3EmiJxMoJbgYw6NPErsVz/HNBRztQXh7LYY4WlcfTB3BBJxL+JRIh+eIw1zdOI+ZgHECtDIGqNHnwMlRr+xYkTYag67zaUcxDPeftyJfp22B1rai1AwEYnZU2w0EK7GtBgxKMoXhimyMegTRQFoqa4zG+oLMvsgcltasoLf0XoLu1r51JKt/PFX3bngBNbDQ7q9CXGHrMahh8MRMoxy1VRQBI4Qwmdn3j7Qc0rYzGN2UhuYxblhyVTVCP7bU+ak7OQdmGLUpPckFP0pMHzS13/v018ODWAFjiXWD3MAtypeasHitKXEhoyFwv+QcViuSsTHXeqZ+2ZMe8roGBDBYygcPlBAZoMfnXVlqu737M8QfNwxn8kpSTVWF32iFAcRtvfNbRa4VLtneETTLcVbdB2VV2nJLNpR44DEBEEz9mahZbjBJhblCiIOTznH0Mmyje9TVdcJV0VeIkFFi7Vh4IIC1ZRzY/EfxIjPjP1TSifLqYxWuabxV/+IqPxTVHBNdym8TOtQSt1oqfdDJNNMbossmUoyhVXNU7aer/eGSqIohd/FtwSpBU6ZY23EMhSZ1Y+0Qv9cPlFHyaiP008w0LM 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TmtXT/OpHK1C3V3Z4AtFZdOMPCEv?= =?utf-8?q?VETqMQAXRwL9k0+X+Nnz1ZVEJ9+djEwT9xlPD+AyULQnWcKtX4uyQuRQp/vNHLMqT?= =?utf-8?q?hIyPWOhwBzA+nrWAr5xHiN2So8EPen/1+pJxzjuw8Q24BladFp5fyl1B+KESWpruW?= =?utf-8?q?tL425YN6Qv6R3obM7csDLhgzBVJuGoGOzlZYw4BSutO7IekKgTd0jEL30Au+qjW73?= =?utf-8?q?2hMGbjl4hR4MY6UkI/hAkUsvcf+cb6Gh4t2QaOmRYbnKzi+jWJGcmqEczaIQNkGuI?= =?utf-8?q?kdrUnrKXpq7JwKkfDMJ+/kXRNxvo1y4LBocEemJtj48/mst4sC0x1dwlGSE1CC+Tc?= =?utf-8?q?fQ7kwwa0RoJnffgVM+mjU9XycWtupB+7knEtflKk+PiYRIy2/oHUzKhGbLxyQdgIn?= =?utf-8?q?Di1OeCsQY300ekye7yCpOdFp9QUQASW5CCm8nJcEYAaDNkwbl75gOId6QLb2hPB7Z?= =?utf-8?q?2sUKm5TObpuq3lMcgBdWuRYVJC11PLhu152/tudP6iG2pswjEkb2TM/BC1KKXIaDx?= =?utf-8?q?mLzzbQyg1B1fTA4UPUmFKzOS9UjOAsjbJJtcTh8TgonrEchThMX6Tb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d0zchtsW9vMcWu2hkf?= =?utf-8?q?nh1QukGAI06EtWCnyvPGH8enHGwBVS0GeAEZZzJj/2MPrDfEIt4DrmcXoAVyf0NTh?= =?utf-8?q?hGdVWfMQ+9GE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37aa22ff-92ae-443f-fe98-08db8d8d0f41 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:59.0234 (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: gFemOGYolw1aPGhILnq6p4rZNgOP0Z6aEg4Nq0ti/T4ZjmBobImDKiWslG1s24MVNHROCJriwy04TNRn7mp+ow== 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,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: 1772461423925702639 X-GMAIL-MSGID: 1772461423925702639 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/meson-mx-sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 3a19a05ef55a..a11577f2ee69 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c @@ -728,7 +728,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_mmc_remove(struct platform_device *pdev) +static void meson_mx_mmc_remove(struct platform_device *pdev) { struct meson_mx_mmc_host *host = platform_get_drvdata(pdev); struct device *slot_dev = mmc_dev(host->mmc); @@ -743,8 +743,6 @@ static int meson_mx_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->core_clk); mmc_free_host(host->mmc); - - return 0; } static const struct of_device_id meson_mx_mmc_of_match[] = { @@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match); static struct platform_driver meson_mx_mmc_driver = { .probe = meson_mx_mmc_probe, - .remove = meson_mx_mmc_remove, + .remove_new = meson_mx_mmc_remove, .driver = { .name = "meson-mx-sdio", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:16 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: 126072 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp169097vqo; Tue, 25 Jul 2023 21:28:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlEh1p/IadEYayN6l2eR1pDTID8KU9EoyY3DXlhtH7ZZ15kHtTsg9bx79Pk3VubANUi7mtrI X-Received: by 2002:aa7:d80f:0:b0:51d:fa7c:c330 with SMTP id v15-20020aa7d80f000000b0051dfa7cc330mr499717edq.26.1690345706134; Tue, 25 Jul 2023 21:28:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345706; cv=pass; d=google.com; s=arc-20160816; b=pA8W+vbzXysMnXTupZiBNjjLuAkiOXQVNq6+QXv23do/dq1tq8XIL7La8T5Oa2h67w 21UkB30MHbiWLx+985LbK18fjo7NxGlY2y0+3qv57Wl55MuZOVvXJ6cKjO9ei2FiXMT6 utsyZchSYJHtd49ouiRC1u/bwnjRVS3WJ2fjMoJb/4pV/beacy6sV8OJfX6JtHJhUvId ipdl0K4n2D2M+yhJ6pdDE9K83VMfLfWVJlP4JRzVpialaHDwK2xKt3mcW324Ncte1/wr kIoas+K6xntdneEkpcCLcJ4LsC9JqCZp8D3QR91LldazuajjPZ20Nlp4H1gcCZ7ubgbY gF8w== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; fh=0b1WHgzFaKa3wEZ+TH0lsKqGVNqDKrTFnhkKsch2fbM=; b=L8pTuk06Uz8lRjZdDSMuvmkKATNU6CbfQDw8TNWyGw4T9WQJq93MvItVYltrYj7TqI dtWzVrlE93F1mu42wXmyEupufZHSX3fyY7RRcXHamQdw4fQjEXq3R+spf8gFxHAXi3xl oSjOHdDIHEnowYeHay41Zst29QGyH76xRmkt0Bb5tVL6ucGuyqt+mQRGMg0t8wvoNJ+D nggqyjUDXU1Rim3U7S1nz7Rp/Zvhfw1gtGcFb1h0HHJ/zOa5y7hNlWldaOJVmAq7jxzX TGFCcjCEEY3L/rqKs32gX+1UHjEpFW1DYURVvUdfoIGMop9D2mfKMO2nLNyiyHZ78MkN BwdA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OBRSfebg; 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 y8-20020a056402134800b00522209cbc7bsi5359003edw.162.2023.07.25.21.28.02; Tue, 25 Jul 2023 21:28:26 -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=OBRSfebg; 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 S231784AbjGZEHz (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbjGZEHI (ORCPT ); Wed, 26 Jul 2023 00:07:08 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::705]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D69FE3ABF; Tue, 25 Jul 2023 21:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NBfZv26qTrnUb6ZTYT5/UDZwscYFtj5UOTzAfaYrj2QfvV5/rKHOOy5GXxp4xT5ycgtjhVnX1B4176ZOmfrlNNfrNIUOgbO1W1KSyZSjXOhxso17N2S0SLp040eljOMhnvjdqHJ21qBI7LDTINYNo5mbow2vPfFlkP8xGKQzmMHaiuM8qL4hm3v8PReMYQ2PZY+GZR/pS/Qv3sSoGGujyoE7e3COW4wbSfhaW5KEnOXBzMYz3NmnR41DfvjbGJSgllkv+ZlHrYFiyqSMlMeGk9UK2KO/ONTALNUokfM2S4YGQYA5xkHSELZl+cK/gq1S/49Jck/7Rck/JnzRoahWAA== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; b=KEOU5Q+Yn97+iC41TJ46s00sMt2FHIWBJhU7xY8ja4vf2VTzeyyDMXcREKRCh0C9lwwvm9Dw/E6Fdu5cUWGbatqffDVnlvqc21u017otjhQpA3eM6ohtwJ+j4yFqE/39pV8Ii9yXzk/+OWtcri1/2CvNYvdvCidwXTCvXvql83AN+iOfuPh7zW2SksIRjJtA2k0sqUrkHdH+W/4d8il0AB2f61eITTdIWWGrINsq41hX2O/LyZAjboc3coTFguOpyiVQubjidqn7aCB1L3OnJapfvSWBkVjoc+NPMSDOMd0mV11FR7frJe1m8BetOxv4AwZNB7IrQ9pTKSqeQTf20Q== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; b=OBRSfebgUVCAL2S1ZroyffWlKVIVzZmowf6GYbTgHZJfFbjNIGUyuFCKyt1+2C9jYsOsj+Di78HiMtaAakXPc+WcKlKFchqOyhKdZA0vdq221XO69Sf/ZWcSx+Gb1Syji1b8oLnEx2GfNXoPigj/g03Kgj6m78jquAxbXd1kHG/GIIj5U8jRL4G6UOiFhgQXoeoFKLGWVzl6I82YiDtjlmHInd/XA28771jdTxnCVuF1kv7huZn6IxFewLOL6QdqG8DkMgBA+Y4Y0RxEd18DTOoJouUq2+Feio6dugasnHn+CaR58IxS16xqqG/KEDm6hdnRzphM382h9bkGHpgFBQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:24 +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:02:24 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 36/61] mmc: sdhci-sprd: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:16 +0800 Message-Id: <20230726040041.26267-36-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b8482f6-4488-4ac7-5bc6-08db8d8d104f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PXbxExiTw5sQHN3z8cuhug2xFU8yhR7tfKN8eKADnhg1vb3nO/I+o/G7OnPdsz4KiI69vTy+CSQ6z2GFBUC1w+t37Vo7bi4OdBI2HeXDMVbE6jhuwjzkXseAZ8eUI6vvtCrMTuxfRRNOVmexio42uQ57q+gliQtgKkoGhIQinQNs4PzTwyBUcS3C3DcO1qhCFRqX1G0O+f2VyrjPoSworOK68gBoc+5BmLR1jMWtsIwORcvBvTTAKomza+PKlIhObe3M39im49+DQRaQVq1fdmeFKTPPMlEaD7nesGM/HWwGMdXz6ekweVx50pUqsUSpNuYpugyVtTm9/xdwduX0Z9YvF1PjonH4on/3iImADgLPAnBKw6Ikb5Lb0T0uKq9mrS+spk3fOeJU8oVf5T+VlvX2Pg00ID8yt7X54MaqHOG3dd5GBtSKiIV+LRQE6FZzsGwAYkPeggSVVYSPSf5KD7B8o/A9c16XPIl3vJieBfAx2+ttbpaRt9Pv+SfFQtck/+GHwWaCGH+53n9HpSXEb1ejp1p+jEUuuLvYXmxicTnZNMoKvuMWW34JrJoWEf5A/3QAUoADj+MWFxeElSzQkwOFIuvELeqooZQuk5kzEqx7pVjrEsf149y+ddnCJoBJ 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?3q10sAqSJZavq3Smu6kJ45XvzOie?= =?utf-8?q?x7v6WkZHnQbEQnQbGaIK6uJG9y+StAG3qG1vgvQ9qhaRTFwy8FU/dbeE1KcQWl0EW?= =?utf-8?q?6795BRMT+qWT5j8D6rPL50z/AhpIOvp12SrIU2ylr3HwXSRoesATIbH/Vj04Auu8n?= =?utf-8?q?U52yP5iT0hkDNibWGHQDPLKjXK0MxhtHZT3hu4dZaW0rI+5weCTJF9Mrqw1z7VGzt?= =?utf-8?q?r3c+CXfoh9UkPEPlXsfBJ3hVV5uOOOmZPmVE4vHplJ6bJRA+TL7CGc+kQIFt34hf9?= =?utf-8?q?Gl+L/4VOnUgeV9DR1nFUI7SxxuncOhxMBiXm+MRWa6rkHzBj3DpjsBG4V4jeTixly?= =?utf-8?q?fpT603pnLJ05BT7hZPhU/OjOhmPVrjWnWRTAu/X2lzXgvUg66Wv3CLvOSxu3i2We7?= =?utf-8?q?6f7f3R6h9PIXbYsw7CYPb6M8Coq8fnyVVIXNeV7/ktRqp+t+lsxutziCtmDLiDI8y?= =?utf-8?q?mJ/lWN0soabgGvQlYOXrBkqfhzR9ppuwGrOjZDnW8b86dBlWeMy27vnXgyFN7E+HD?= =?utf-8?q?nOx9e3iPVXWBkqSVcSmHVwbrvsHjZsQZrYpeV0OYE9aPb1F9ZfQRSjolmCwY+iJ4r?= =?utf-8?q?qXbCZS509XQOwsZPKIjOmJ6c6es2A7WeWGYcZCzwBbj5XHZHZWgCU3c70lkrHWvS3?= =?utf-8?q?D7MHowgoE8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-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b8482f6-4488-4ac7-5bc6-08db8d8d104f 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:02:00.8132 (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: IIY9JHLlas6scAZxPAzI+etjYm+i87hnS/qGS0wd9L9BuWHG7ZZzapYg5wzIKMp2+dV1ZE/ht8MtFHl9QOZwag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772455939324237063 X-GMAIL-MSGID: 1772455939324237063 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 Acked-by: Chunyan Zhang --- drivers/mmc/host/sdhci-sprd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 7f4ee2e12735..379cb3892757 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -720,7 +720,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev) return ret; } -static int sdhci_sprd_remove(struct platform_device *pdev) +static void sdhci_sprd_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); @@ -732,8 +732,6 @@ static int sdhci_sprd_remove(struct platform_device *pdev) clk_disable_unprepare(sprd_host->clk_2x_enable); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id sdhci_sprd_of_match[] = { @@ -800,7 +798,7 @@ static const struct dev_pm_ops sdhci_sprd_pm_ops = { static struct platform_driver sdhci_sprd_driver = { .probe = sdhci_sprd_probe, - .remove = sdhci_sprd_remove, + .remove_new = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:17 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: 126098 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp183724vqo; Tue, 25 Jul 2023 22:14:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHji7yvm6KDLZHU5Oy1fU+n9REvB2t0a8Udeh2CIbbvrtyLDOkRhumchFhLTCd66Ld/wWBA X-Received: by 2002:a05:6808:13c3:b0:3a1:f135:6a49 with SMTP id d3-20020a05680813c300b003a1f1356a49mr1047967oiw.29.1690348447788; Tue, 25 Jul 2023 22:14:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348447; cv=pass; d=google.com; s=arc-20160816; b=RGYg+bitcrbbqt8DCIm7s+17w+Q0qwZ5F+eWUTHyl4NO7bcVV2th1E3oYG8ptE9ayc wDg92NrQ/RhCTJlKbBL3xSKgnfj+EuKVgA6FUcj/XQzZwWmjsiQm9Ovo7lUCFSMQyXMR 8YSCJ36Tt0eVLbt1RSJWL4tPlyQaaSp3hieQbw49OhiiMTbr3KRv2Htyf+A4jO2fVVG7 2Ym88AcVggWMoiSQEn67KiSKp7RsyChDrmYIQqrqakvLax5J5cI0emdFQTt+1w/MGtLI tY3QGInErKRBKvT3EoFkyuo02Z704UUBVjd1bbuIDSDTX2dO3ex+AnXdKkA7Ef5RaRBw eENQ== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; fh=wZYlUM3eR9DzHU7b0SBT2HXVkVx6ajD54pczVSribH0=; b=Sj749EVGXq3zFKgnRqNaHf2wHIk3kvzIYQ7xMX9Zwk9EKuKENZXUZxaPrCMmC1QieO 6FY0Ud546YMPNBNPLBUHeP52ymczhWPmqf4LqVhQ0K6R25iRr6LD/xexDyRTC6tKTcXr ImHBbOEb1Fprel07n78kWrItDXs24wPiD73iY35ts3eCjWWwq/ygjWlGbFU6sQSy+Mae AS+y6edAux204xgBD3Q6CIJhC5AawZa1/eNQjgEgBSXqbdBEyiCAhG9tdrvl3Q/pUgwZ j+dHqf40JUW1P6hdpeocd0yvJGUqoKHsgYzg7QEzreGyHMI/ch0G7agKfDNcN1ctZb5M CJiw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=K7qIgoDE; 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 s1-20020a63dc01000000b005637ef9076csi11416287pgg.327.2023.07.25.22.13.53; Tue, 25 Jul 2023 22:14: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=K7qIgoDE; 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 S230459AbjGZEHd (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbjGZEGq (ORCPT ); Wed, 26 Jul 2023 00:06:46 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F01635B7; Tue, 25 Jul 2023 21:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+5TNHiqleWCIH/+9g/U7+ocgdnbvZCb+4tmCfkMalmEqUNuQ022LPdOsiseQ4wgY5MXgfoJwOQ6ybFD9FozD90WoeFlxUoa0o1d2BH0e+img+77tpSOunB9Y5VcEjA9KqbYRprYLTWHoVgjy1wb522Te9+oL8+4ltKH+5gjEKtL8qdB2hWRSMk43SURWk6kQ0CX2djgt+c9ctXoiN7WABpqr+1YQnEmmTDiPahiAxdGreOmCtvRaFkj2FeLNwLjsfQSGAdagCTTGYsjh1yEnwR14XhokIB4LL7rNy1LJrSlOcCiwGVT5bvyRGgVur7/9FkVV7EMOz60rDuC4cLTHw== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=SWX8e3QHPYzEBpXESt95y8xEs6WfsOI5cxTqs1erwlJbUHjbhMWLPNczWRO5jKD4yujQxm+pStjqUB2R5WA4WzBKJJiZqyZch2MXtKTuVKd5B15yU6KS2qUJMJE1NY3nBscRVq0TPdIZ50nYe1ktZhlsiNYup1Fzp5/XnyGlb5oAdmYcug6r8X3bxhjOPZGZulIGNJ3gYr/vq5qJTiVMZYubug4o7m1RbfJxJev58NUbhowMzP6ngUDg1RKcEfjol1qYRX2QUF1Lvr/L0QUatlsvvG5bPlrhExohLdqhX6cdER+s3zh4Yp9QuZTIFktcZH6m7AyvAvbKMTfF2EnvYQ== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=K7qIgoDEYmQjHHv6rwMfmhvUY0Z6VNIJv4uc22BozO7YhRHl4ta4KWxgTI/pDUXoubJQ2ZEGcCtiisxjc4F9Sj5A+iBMPvbM60y3zcl0Q0j0i+pfVsiO/Bjz5zXTqqWB/I+XWOJ35AXnY1LtvgaDiUntjShGROVi8xBoEx5Ng6YGq7o9GRX2zNn05nZ+j7F2iEgGeOn8Qltu1ZKgpA79Ze3+/zc4WH3pyxeesVTR25YTYAuSSg/hZzy+8/Cmwaf7n9UfefAUNp4jsECKhrQxHh48pxSJrWa8IfQ3XSQILOIgJxfBi1rav15wg1STqw/82kSIUv6k/AVo8uH3ySLePQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:25 +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:02:25 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 37/61] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:17 +0800 Message-Id: <20230726040041.26267-37-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: f4e702cd-3a7e-4bcd-1b5c-08db8d8d115f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ioyyv0vlWHmSbvE1dObAAe9sQe6zl3nXNC42xzl/A2afPKpI4t+28Sl9ce4vmtx+29w2w9jGiwYIS+C/a7ZgKDOChgyR6mIfKd4vs/Ox2lyPuS4O56Gs5mPaGbz9u8oErge9MbCet/UPp5OsBixD244YfnlEc2AFeiX0QP09VlayrR4Pra3aFqPTZPYcEYforpN/oNWnpcR3F5xiXzTU2/6RnD+kYlUcaFv5q3Gjr1FSPdvZ3gA0814H/5qDC8U4zpD06lKHrYLLB0W48YNl5MbFB/qywmjgSe/gG391Lhhc1ycO7orC9B8jmWlH9dy0zWF59RxvwLDFgoZxF6wkQKsED6sIixesySsgbWXpMSygFcuwoa77lGda+UczrgJDsYkywCnMhLi5+gmiRqJiIZefBNG3MMVtuK8eUXM9sPoDqduvdjcGE+rYbHQZ3VTEiXuiTnFwy4GkCBMC3bpccOymhw9kMuDETzBqawqVExiXiMWdzb6TUCzD9kWuzFivv8yW7cEudt1baz/KeFIZxx+rMTeYTK7Dss0da3WdGGB9flnM/mzLtcss3x8Q6J7/ZDnkivypV79Yk62WhVW5tGTalPprcI3XA5J/RqQPORmlivTMvj+QQmFrVoOD0RBO 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?BnyDN/EqmK0+f8J30l+eX9YBRnvi?= =?utf-8?q?7JQchMH0sNWq8WcJpGwePLSHbz4x94QOij9S8iJuKYoiVi03al7jEUGt8oPEi/ZOC?= =?utf-8?q?u7B5yD8x2I2CIBZ3zHD8bMLCRMEL+uClyR8HWKkPj6fIGtbkPpdauqCepR64IgscR?= =?utf-8?q?fgIOqRT71Wv6HoASjC9AwQaG+J2/dKSdc62yVafzaIF7pDACYBA9pKo+nbymv0gN+?= =?utf-8?q?ILqIy/V5reLhZXXrzYsCmznxnLNq/gGyL1nbiVfX4nohA+hwzU1Les2xLpRX/J+P8?= =?utf-8?q?+3e8QrvbI04EWzZpF1Ob3xJHJyQb3huppC9j6VZS1Ov9CF/VDjcQFR8jmYzguJ3LB?= =?utf-8?q?dMzUwiKllcGly5J6M50GSyFrsxwMJrCno7kMrESxZyVQ6qsY32LqpoVyXC+2cRAs1?= =?utf-8?q?fUWpMOK8hnPcGW20nhQCmCOcO1rPx+LVsOA+aFgp1PSJ18Ram9ToYeu1LKZEgbpbW?= =?utf-8?q?EDBMhtA+GbsxfZCMEg/f17Vnx3Lznm85jULRYFGhXDCFG6rKYQi5DbexiWakDw7An?= =?utf-8?q?rDh2hveoRQc4q3zc37Ey/JLBtQk27dsvO0HwZZ+q6idolGbGpvCDrorB1YmJL+Wec?= =?utf-8?q?/0WpZdDryFJk7vyTLWcdVg52izDxGWrzI1Xfhr3NxhLp3ZSQSOn/9L0FC1wkXqCQE?= =?utf-8?q?t7zSNZMsekxYsLJ1l/pI45KQ9LWkrqbUxUkXqU8SpQ2iIAo4E7gpz4FPAH/q21+nv?= =?utf-8?q?SwWfE0dSCQv9UdKp2aGePTSD8z+6nqHn4LRWrIKYpmtl+kEcoeb9tKtjKpDl184S0?= =?utf-8?q?ls+tQMnIGyp1w0rNv4pUinmFwYAwmTnkgFzVwl7CZ3tO/3rsJU6N8f3+owqZusjgo?= =?utf-8?q?x6SUVvA8bnErWYOpPf0brIPmxahjAenJnuTtVKJlshvt26vJuj6Kv+8AZcT1G6Kx7?= =?utf-8?q?d6a2/jSg3S+7oJCn5wdX0ajIGTwcwFVF/teOunFm08fOfsOoGYDGRBSxkMlcdQ1tQ?= =?utf-8?q?P4iONjDwONlJf9pm7Vcn18pPpujpH+qdvHRqCvKialR4F+5xtJV/eSwZIlhjAOmId?= =?utf-8?q?jr6d3A6Kba6yv45jFBcElDZ4VA0787Q7yTm0rNJAB76+M2I9cVKUtTlJdb6awOb61?= =?utf-8?q?98rMIHsX/40So+0e2HeOo/VeBnJQbgYtyyYuavkwM6fRQ6t7aXulLGTSG+lWogj7O?= =?utf-8?q?SPqOW6swVjqCGUUFOFaAiMDLogJiOk3YUKUf17VmZLlbSqd619SSd1laq6xeTjkB2?= =?utf-8?q?2bESIkWd07p9p17j1SYFoheOb0GEZmS8iV3uosvtgG+qm+yBaSJ1PjYBEWIJdKvW0?= =?utf-8?q?eqxY9zkqc87XkQZANr9z+zSFp+Y9WJ9WKdgrGi5WlcXuT97q0+loR7l5HCKdEJQi0?= =?utf-8?q?mp1nCWeR3gsH89VfyUmzixQkca6QQjZfOPVRc0SqacfsoloXTcHZmpyTHMFcse9y+?= =?utf-8?q?XGyzWbrfu6NNLm9X4pSXMniGjlUEvfop0CQh9t3mwzrekpndvGbB96hvdsy490Rcw?= =?utf-8?q?4AygCwDAPdj7h6c+t+g4/KG+SQtWdkhTIPf/rC2Wu2DYGeaTt2CPvbHyrZIYur2ZH?= =?utf-8?q?kWeWzP4UitEX?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4e702cd-3a7e-4bcd-1b5c-08db8d8d115f 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:02:02.5632 (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: XidedTjoX/aLnEy9wT9E6UyMdi4EBcR1Ulc+Wi5ID4cs0xUxFPh13d0WsN+21v2tUa7lCbYPWSJO4C1czcIc1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458814110475267 X-GMAIL-MSGID: 1772458814110475267 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/sdhci-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index bff084f178c9..6a50413afc8d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1818,7 +1818,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev) return rc; } -static int sdhci_tegra_remove(struct platform_device *pdev) +static void sdhci_tegra_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1834,8 +1834,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev) clk_disable_unprepare(tegra_host->tmclk); sdhci_pltfm_free(pdev); - - return 0; } static int __maybe_unused sdhci_tegra_runtime_suspend(struct device *dev) @@ -1933,7 +1931,7 @@ static struct platform_driver sdhci_tegra_driver = { .pm = &sdhci_tegra_dev_pm_ops, }, .probe = sdhci_tegra_probe, - .remove = sdhci_tegra_remove, + .remove_new = sdhci_tegra_remove, }; module_platform_driver(sdhci_tegra_driver); From patchwork Wed Jul 26 04:00:18 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: 126115 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp192807vqo; Tue, 25 Jul 2023 22:43:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhJHHlbBNzkfy80zJ99vvcc41uzxw3VNwhKCLQ0g23ymxmpvhNQiNph8aoT0Un0nntTrNZ X-Received: by 2002:a05:620a:29ce:b0:768:11ff:7899 with SMTP id s14-20020a05620a29ce00b0076811ff7899mr1418680qkp.64.1690350227033; Tue, 25 Jul 2023 22:43:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350226; cv=pass; d=google.com; s=arc-20160816; b=EwIVQT5ZI5iA58bSQck0AYXEfrlU8RwV6QyR9yU9/6ZFnxLlUZGv7BdnGvxiiVRefD Qw+LkqB+xiDYLsSc3NjuLlNmofYyq2YOBhpHPwq68EOJjwWBbcnkd29Cp3KYe7YuQpvI PWHXHV0uKoGSc5ZvtlIHele8mIs43yghC3b1bIF5q2XJxPVYFnJtDbcZwQvYlGMoKuLR 0gzIGGXjeDClBUukLvy9iH6N33k9irb64oq7y1bextuLmxfjxLN2LnA94uths2iDlNOk pfR+dxsvzjK1sA57rz8vC5rP+HQbTJylo02qRongXjuOCMAhOtk2q69fjNra92OwS7iK yj8w== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Ue2G522qIbHaZLtICbBiReVBasbPzRyT3PzTZMMl0TJxdSa/czYQl779T7DK1jtvZ1 KryYMGmHXZfjJZ+c1t4btTtlsHr58O8d2NZHmDqW712x0WGsbv/osSgeGVjPdQ/5HEaH yZatU2MAH8Lj3t32j7/kZ0LhxrvZ6CAZkVrZfTYgNNtQ4AtyhWAMPkpuEKzFfpDGRNcy ju0cEIKd7DXL170TNIP6L4qwi7Dif8z3MQ9R/ZAnSxbYu5+xGKVLrcOGaXrDfMPOg2sT NEuhP6sWs+R+sT9gZ3qvRZhzqFnqOxiqr10c8C+siYnfBdK5LTCSwGuuHqmHQuIgxflt xFMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mC6gWS+s; 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 v186-20020a6389c3000000b0055c77028579si1342200pgd.747.2023.07.25.22.43.33; Tue, 25 Jul 2023 22:43:46 -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=mC6gWS+s; 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 S230093AbjGZEHQ (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjGZEGc (ORCPT ); Wed, 26 Jul 2023 00:06:32 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7854C03; Tue, 25 Jul 2023 21:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sf4VW/IwItlxlqPBf+tZBdK1G2yi8ix7xMMPTcVc7Wz/Rz0arEOyhSehr7xAPU2KfWLM22PeNu0HgnUk3jgxDt75WDYTefB+Yjpjsm8JnFOrPO8FTIJvzrGWtQnvQ1wDw9PoVD6Ud8f/fE0f+rS08KpwR8HtnjxZ8Zc25WH+x1fPC6p0sIgFiTa9s+BowTSn3QFwiGGSlS4fwAD+iOhU6g9GArt4GYu5LTiiS23OL5i7m7ZuHWMROzFyGuflkgxd/7j19TAap1IBO7zivlfnaOPeXBoDxqhnUN2t4x2Ib2hq+YtOKsOtxGEbWUlov8wmMYeQ1jDkff4BcNc6SllOsQ== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=ga7xew43ZZXS7k4sBq3hIxYjFURXSfJv9XbcSjhQLAKpFNdlEQVTc7hz0C8KtDLUrlydXHFqpx3kn2WuYxqKCzxryWyzrncQd5k5CUBl9YnLxVOH5WD4eUIfgt0DfWwGMK2P4VXlYsDswuKYLN8UvPQjYmzulTOpF4QbGh7rpnE2prk6O+HfxhdpQpxfZeXBqwpXmBoZiRSIJ/DgMA2A9rc7fnE40JZufCQPTuiTf6UP2AMKFjESKIQZGu33sD5tBWTxmbRTHVxhpfA6hKfvHlJ37HwP/l7rjAxhEtmlMn09bPI8pnY5+BgUhE1mRssyvNWCD591QoKhD45RLKOerw== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=mC6gWS+sTnA/1gTGU/g2eovkSxYP8+fs5E9fHAsY6HDkW+je8OBe/VmQGMgDZT7uW4LG87D7QRJX553/SLE8nMSdZl/tfM1lDHSE1jlzdGZ4qYbgQPCJZcLh4I6fTZd5cS7EJARNHx1rJ+Iafl0KvgLmL+LgkRUua6xPKW6skehrfN2c39956HQ3OfglOOByF8xGAJqllO1BYzmCf+Nr6KaLCE71ocguQ8eCsUhdkV/m0oBICdv28gbXvvx7+54CzPkj6JbrdtJCe9JO+lXAuiER/f8e752qbppybvDy/y107EZIglOXqH7oWTvFg4VXy9TIqycBpfRTjoQ2JKB2BQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:25 +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:02:25 +0000 From: Yangtao Li To: Adrian Hunter , 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 38/61] mmc: sdhci-acpi: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:18 +0800 Message-Id: <20230726040041.26267-38-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c3e8e53-42ed-4f5c-5196-08db8d8d1265 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: keFaUUfoVmkW02imy3IBFCz+CgUgFH9gb4P06VMO7EtRgYsx3kF+/swF5tIJpbRF2yn9hoscmjsnAZ9iBwf48xdf4RClGzBxai6swen4eMzbCQdv90n7/XaXo4WrmMa1YwglpMxVgvTh+TwCbD2UFhk6+kGfgyV2VyRb/E9ptH1awXK65INXQyILMve4fj7rFVaGIgRcSUQzB5b1GIL2QgVPFQ3yIeHwdlKhXuTMsXFPbJIZrMTecOswcTvxN9sWVFOCze8pgmyRVlgnzAmSQKKFAWscbfVrANN9dyv2f2gUI195SK30P5qtlQ6mCwn0Ct0HUkSfOgNhPnx1mOrPicv0QpnlJDGQc6pkieVjuzAciaQLmR2qDmsSlGxXvrQUsdQ+stsj1QxAdr4bHtBHpLk0khUQNdmrIQffvKf3eK7a/i/n/90DMApzA3z3itj0d383TNahN1N/ijy1luzRRbUBuHYlDUAmEEtiJ/hZcGufOAkO2Ik7RoPNpUeT1xcUeacUQtOrfEAxaNN5FVxKiz30SoyZf3cIjmaeWddLfpD49vUytzNuYHvo/j55Avue4CwqiMBGIpNOAzqTLNQEIVvxZV+J+im5/RClo+n34R71LlTWGMvsHW2dpcHzC2s8 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?qjSJygs+Ue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=?utf-8?q?IqvX7waxs2YdDfq7453vBpn2hJqe7YOnyeE0MgBV+UyBAyFFXwx9eWLcDd36K8pRp?= =?utf-8?q?CLsBYv/cS1BVaZjMo75Czyo5fEdZfUjClzsm/yfRIkdJNKNNz8WN9vYXs/MNJtszR?= =?utf-8?q?V9SxzhTcINxqnfT1XAPM2llkOK5UCpu1N90zezYjHoKYEma/zl95kS/WSeYvNmuns?= =?utf-8?q?QHWHhN7T2l1Er2Qm6ncQ9rOuslsANEEVzAhB5F0eyU8q60hjbqMl/Fiw8UfCaw0C8?= =?utf-8?q?8qqAHfXcF8x2eC4OGkkRIxJlFdAqBThmgHSrP8QePXtHmggjlhLvhOsnlM4SBCWY3?= =?utf-8?q?EzMDEnWD7zuZwDbBgYRvzirVEQrHlsnbqk6Dq55Jo1iIJtEnEAOAznSbgn48slIZ5?= =?utf-8?q?UdQhZai5ctxL2AItj4Ojd+X4rRYXkMrNp1jD17df9DH09d4XP6m8eavfffzu7l54s?= =?utf-8?q?xWMv0HVgIx8ZIedPrc+WdxgivvPY8V96mhX/aWoByadBBig7D++q5E5Pwrske2dd9?= =?utf-8?q?DK2Qu4BAjAMB7QywqeWJfA2/8NAIeb/a7mUwnHap1kZIW4spcCqtUeCqMqIOS8LuR?= =?utf-8?q?GW7CyCaFClwqeLHzqwjte6JMwdmVUaXQUWBIYysfI232EMgG8K2/AD+IJCDyfqFVI?= =?utf-8?q?2xDxNf/jjWXj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c3e8e53-42ed-4f5c-5196-08db8d8d1265 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:02:04.2835 (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: GdWGnOvKlOfg8RJRgquJS9y92JvK89uPt3E8Ysvf6IeEtaDo8ods7Nk6ZATan3dlbQwQqxXXFaDIaSBbGy48ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772460679972699710 X-GMAIL-MSGID: 1772460679972699710 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/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index edf2e6c14dc6..acf5fc3ad7e4 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -917,7 +917,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) return err; } -static int sdhci_acpi_remove(struct platform_device *pdev) +static void sdhci_acpi_remove(struct platform_device *pdev) { struct sdhci_acpi_host *c = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -939,8 +939,6 @@ static int sdhci_acpi_remove(struct platform_device *pdev) c->slot->free_slot(pdev); sdhci_free_host(c->host); - - return 0; } static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( @@ -1033,7 +1031,7 @@ static struct platform_driver sdhci_acpi_driver = { .pm = &sdhci_acpi_pm_ops, }, .probe = sdhci_acpi_probe, - .remove = sdhci_acpi_remove, + .remove_new = sdhci_acpi_remove, }; module_platform_driver(sdhci_acpi_driver); From patchwork Wed Jul 26 04:00:19 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: 126102 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp184220vqo; Tue, 25 Jul 2023 22:15:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlEExyaca77aZw681B+fpS1hUpGu+RnSKItq0cNxzlyGu0rGUApy3QH3YWv2hWEVLlKoomXo X-Received: by 2002:a17:903:32c5:b0:1bb:377f:8cbf with SMTP id i5-20020a17090332c500b001bb377f8cbfmr1594764plr.16.1690348540845; Tue, 25 Jul 2023 22:15:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348540; cv=pass; d=google.com; s=arc-20160816; b=PMnF285UVFAvDWCPzzXVWm5XAsZ2gMEudk0hpL04xGSIOAWE5FUao/fDC90aAIZBgL dacVNydoOSBjAAHa4N4vjdVex7QpBuVyM1Ki+e9bWOvaG8VJdKgtbLkACc1mQ/T5azFX v1gvoDIDPUCAlr62xBx86NzN4ke4DVquND4ekUJiKy8qPVDp3dJak+ti+xSl4F4qXq3L OsXKWFaWghcktM13LzWce2X1mgnHGTmjC1u/XIeNC8s+0MAjaOcuPFXBb9vksypMkhfw D77w+yvyiRnSN8Bk6mXtSKTnzQjvtdRRPGLJ0jp8QR/Yd8lH8wrYHj07aq9UGSONwaUd TlHA== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; fh=b9dHX9k7LQUBH7MV8y7hwirzK4SEG5gZGgG6c7DQpKM=; b=r0DBQ5VqR9usR3bZe45pOBcLdLImdxRQxpzcuAMM7sM5AHStzyc7UMcEpjk+4YJkS/ i4EODWVtTzHmZ4xZV1EBoEcPHUZg8O4n23Cw7N4sKaC8gz1jyrnKF4ykqTkGkYsL1tcT bAgwujxgj3StSwmW2D8Q9MubFdfojd4PQ7RwrzgF43dwIEKv1F0ui200De2UiTUa6K4I PktKcPKfHv4b4uSndcOshVqyw0YubKcvRS6DPMXzMHdh92HVTnyuBa2LZprSOpNOIcBx k/6HXXIuKxmU3p1sXQ7GSD4dayZbybVmpYVIJINeJyQT965c6lBcYLFaK4JS7M/5NrgD mrfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XqR+bNrb; 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 z10-20020a170903018a00b001b9d180fd9asi12879628plg.121.2023.07.25.22.15.27; Tue, 25 Jul 2023 22:15:40 -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=XqR+bNrb; 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 S229956AbjGZEIi (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjGZEHv (ORCPT ); Wed, 26 Jul 2023 00:07:51 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 020BA4C33; Tue, 25 Jul 2023 21:04:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gh5W0xiBJCF3WANhwgZzi+AmCkigtVOV20QbfUbEkOK3kucjD0bgI1apsqL+6zEdrga+3Qs5EA6T4sRbM5s7OSZiDqcU760lL047AbtYvgIIh/lCSXy8bKdKXFi1q/vAMeODl8NaBR3VqfJVdK35bZCEE2trlDEnC4CiCZAp99f2Exnfmvgs0DL1xC+ku1gRnh6scdlNRwUiuHeTOdh0qS8qWouKBvjtFuTceN2wsuzgmEP2ZR2tDz4VnMf2g3KsDQAL6mjiiCA07H6p0SKdztdttx+9ST4HLLJuPP/MkldDF1Xd9FEDixINXVD7Hcgj6I6KZWpXEphOEP+n4td4CQ== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=gxWc0SVul38YkHEGB6CtfTpa4KkHli3SLYgjN8/jyiyEkyn3j9aGIh3NvlYRGtAAbHAinvIjagJIsmSFnsXROV96NbcaahvA3eWFFzf+N9+i6TO2SCFhox7Ttk5AyGdXvwGFb/QAcvdfsjtb3tMOMPARlkzN4RhhIYU0+oO6rYuz1QeCYHK5GO7m3gplnZpi8vGJhhGiGeI4Hc/vdqM+YGbIa4uvEFGh7Guc5+KfoJBFFSrxwY+oZ/FSSngQMvvNpnghLPqA04weXuFMgS7BEwmtmnEGK7wgkjYZzJaR0ZtbsN64qYeTmrzpizEgfI4ZiJ161Klz+MlyrbBdgbKrRg== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=XqR+bNrbpJrse062qN2STVA9mrFmZmXIFMdHiePX/VgvNQ63RZo9U+PeCvCCeOBq4cRMsnVhMtdXZVsJlP3lA05jncjUi7v1/r3i77NWKOuvylWQ3m7c33FldRGJV9q1qA3mjGMzOoK4iwJhw+EJLATcjpTgJbQIq3gZKyQqCADloho3UbzsOwiSh7l0LH0f6Pn2HYvrBeesRpUIf8lhvGfPYxr7UPnboFROwDsYDd8FHLgBonVFeEt1lKjK/WSb5bWr1pkHYUqYfceswcP1u3I86LfUUHRdOFousC0TjHTXOOSjyS0iEkQdc3/HFxKoJjqb+7l4fkDTyUlf3N6OaA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:26 +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:02:26 +0000 From: Yangtao Li To: Adrian Hunter , Haibo Chen , Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 39/61] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:19 +0800 Message-Id: <20230726040041.26267-39-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a480c50-3244-4a0e-2f03-08db8d8d13d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: itUbjkEO4zZXJDKYJ5XKGOc0eHjlweu+/kHS+hwqgL/VrIasvJXfELWpO34T/i7cwnmRmtKEU3lgrbYSuGJUuE13B0/bnm2XKvZq96/MZwy8/vKawFmYxMhvKxhGaAJLNozJT/EujJ6k7lbT4Ey5OB16UeMqqV1+XxOY0DcEybuVkAd3qHiK4+XAgPnPeYztaOVPeEDApP7sfuDzuyx1Bdbc2JZl38c9YUKnvtQzmv8bQhIXTKz49JEU4n0b7JOqzGSZ6N75ImDcI9QCi6vO5KTRTAHc93NPQRqsIsdqbKn03I4Q4BNXr3v/MiIURu9d0H2SvnfsGhHRRkRf+2Eaa5My2HBCXz91M9Je+c+hix8Yh0jAQQqTTkoAfRjVZzNgtssEYQ3zl8WxTwGAd06xPGdNuZDHyqWo1K6sJUMH9+3fsGIL5AblP2NB8ghs/7F/CT0U51hWuGu6yPHH3JNWedoBR2eTeUBxSSgVRYHaCrbtPJAP0nuWpAAZP6SE19aoR8dC77c/2dnJ7v4YgQeQ5FIq7Vv1a0cJmxavbLAZ7omWNVtK9ixQPyFts+0HYyyvA4t8DDst04KHib6J4V23UdFinXlAo3D2tUittdlOxoyiSL1YVfdMvtIUpDcZUBUZ 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1O2a953KBYE/yuAUHt2UDRjxT4yP?= =?utf-8?q?hwZ48UPKPpputvsuAvSdx2sW1a1JlXqeK3QAnvadHIp+veobqZQVOrtJ09yy0bwj0?= =?utf-8?q?Vjt/ZIttEndl8sz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tZx//wd4F0CHKrJEFv6yAT0GgG1fL3X5Gmh9pwnsw8wrAisIXlUbEjQvM?= =?utf-8?q?P2uWsjXWrNJ9JwHE0rSxi6uxsER6kYJeAOv++E4uhuCeU7qxE54AA/52xCi93e+uw?= =?utf-8?q?LxCcc5tS75RWLxhF/yVYq1xWrX/+KDwdTmM4d6v6coRM75rKA63AMhVClK4uSA5Y7?= =?utf-8?q?rxqWZvyW0D26/US7xprbM6isF0Qjkb58SgBKhamY1U/JXlE871NR4X+cH1+9EeAhY?= =?utf-8?q?Cd4JEY1YPFcyj9M1UbUTBscUvvIlbkVMD1AZjwr/CN3Sq3eK0YsXwceJ06M6oIdIo?= =?utf-8?q?1yRsYRvLzxUGaXH5ajj0g0Q18jxSCB08Dskc0/rqz8Kjb89YEta/PnJLfCvbDTjmW?= =?utf-8?q?+tTXigkFmDsMy/Jxtmg/zMWrXNbDHIxdep6sZ3OOAW8jBHDvSRTj5ZSLjwMI0q/F+?= =?utf-8?q?ZJn6pK5oF6eGkx9XHqknXiFTlz1apQs0sqwyngfPiny8sPSo9vgOrqTBrk7kVDqoT?= =?utf-8?q?Iu6TSlqkrJaOd7OejgFGIClqx+iVkcBmvaAuSrAFCK+5/kLTjoXAIwx499ChSTz4n?= =?utf-8?q?i4PAliQDMqU9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a480c50-3244-4a0e-2f03-08db8d8d13d9 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:02:06.7239 (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: uEdxugz02KiGPYpZA1W4cadtHhAtloN/qBMSOquU9d4DKGgWIRQ6Jy4cp+VE2laxW1si5ZLCcVaVm8bBUxxo7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458911403276522 X-GMAIL-MSGID: 1772458911403276522 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/sdhci-esdhc-imx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index eebf94604a7f..e882067366da 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_imx_remove(struct platform_device *pdev) +static void sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) cpu_latency_qos_remove_request(&imx_data->pm_qos_req); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { .pm = &sdhci_esdhc_pmops, }, .probe = sdhci_esdhc_imx_probe, - .remove = sdhci_esdhc_imx_remove, + .remove_new = sdhci_esdhc_imx_remove, }; module_platform_driver(sdhci_esdhc_imx_driver); From patchwork Wed Jul 26 04:00:20 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: 126083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175983vqo; Tue, 25 Jul 2023 21:50:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBUjfwuSYJyNBaztkMFjD2nvrHZiCwZdjLuMnvsq7HCkSBh0l9FWxnDjlql2OxfrAT+bim X-Received: by 2002:a50:fb85:0:b0:522:1b93:4cf3 with SMTP id e5-20020a50fb85000000b005221b934cf3mr581475edq.27.1690347015122; Tue, 25 Jul 2023 21:50:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347015; cv=pass; d=google.com; s=arc-20160816; b=A/zIrvpyz53cBYI9bbldEMJtydsh2hTbLgy7Y04ac/dXqlliOLVG/fiXfWd5fE21qq rUywLtNo1PHubrngE/HD4wI+COqqP+jg0SBSw3FSgRxMJsygD9BqKzZwPJY4VegUwXp9 geUTJ7WAuA0FAtWMaOcqXUOA2Wbx9ggJx4CUFIeqDxvcd2KNijPrw4NJZqjm/gHx0MpM 5fl9H5KvpqjfIA633Hnsww2AU+wB/XWkLdtYToDhkAv/ydI0JEZOX7WVulffJhXE5LRb mM1EMsOpWR2vRsri7ksO/kTXoRE2dIApcjMYyugsdQwOchazn4lBl/y3VihMZdSLA8p1 tvLg== 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=ZkhpTrP1fBy6oKTGfSv4gzzCC9zrpbviYP34vWBotLo=; fh=WlToDQ2saYMXn/rkMs5pDwh2UkuFS8Vrnaq/kNYGuo8=; b=tgdC3hMvxdkPcZqt+71dS3wv1b7llVJF2Lgr/3cmM0ylmqq4GT/Q1aUWdpyBnGinqF s+XnJGp65hs5VB8Ccwm2Zu78cKPpW7MOoEqAKZ08cKFymJf0OrAj7pt4kH86/J0Ifxmr Fp2MlM75Al3l8Vi5gax1L/AR/UwSeF4dpeZQznZlq/BjS2k2TKV2j0g5Hq7KEagbf0hd KNTJMuW/O7XcZqd/tUP++MUWtFeoprmpTDTlGIA+cCr7+u0t/nXen9zzBhkosM3ug4vH dRq3Q9W5bBc9mCO4OEcWgd5rj7xqbGwJlv+3KXDI/4z7bP91Aed9fHkM+lN9+/pGR9iv RZgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=kIQLS3Y9; 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 e18-20020aa7d7d2000000b005223a28fed2si3181488eds.455.2023.07.25.21.49.51; Tue, 25 Jul 2023 21:50:15 -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=kIQLS3Y9; 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 S231919AbjGZEPK (ORCPT + 99 others); Wed, 26 Jul 2023 00:15:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjGZEOi (ORCPT ); Wed, 26 Jul 2023 00:14:38 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E1BE618A; Tue, 25 Jul 2023 21:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TUXG6YmnK1Z80f5PhW227slnL8at8rMirwbfnwKwsDE6mqTX01Jtxg+x02qpiGMAKuQ5o2Sxe0BWAW66kgGPDdeMXtJ6jvGJSHKpZtdXtXT9vh4evfMHSzifRC/xdsplDP38CuO3H103FoEW/wttO51A1vFkLnDGunUXIn8cxRn//6auYFfXoS5sli/TCmtDTFM1BlEgVvvt6oJCmSsMtXph5DtRBzhB2EgJN3PfXhjCKE3aEi3LLnZe+TCc3Nm+lrBmh293eAyFzrvj+9hVnjLxdLAx2IncSkHxlQx/LgQdMQZSXf68/AR14MJz1kzk37NDgCzaJIXB3+vL4VGhRQ== 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=ZkhpTrP1fBy6oKTGfSv4gzzCC9zrpbviYP34vWBotLo=; b=dvzCqjfeKLLs1+RgszUOg58Y5w35CkUYXFf3D89sxVYty9WDo1B+WiDwS6DpPc8pmKOq1Y/COwz4SNMJDbFWGv/aJgds4jk/yu0drHu68qSfVSG6cSkpTdjgC63GpidjQ9b4eTZiSo2n1lFNLToPFO52zMVdZT67SA+/bJf4UMq/AjyLc7O5+rG3i2IvR6+NaDFwNAuzewvloelvdMPiDlKY3gTymUWUzvToGOISJ69dUTux5i92467NMwk28BZmZolc8IDcFMeE+otk3p9NHGL87YTj3PN5zSUP6S9Y3MG33YGHnC96dHDZIYQe9YcHeZcbSyNmD5qRwkj3X93TVw== 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=ZkhpTrP1fBy6oKTGfSv4gzzCC9zrpbviYP34vWBotLo=; b=kIQLS3Y9SXhofHcz86sXCDYzvjXYQvdmSqOZb6jm7wws32n3X90C7vBfHYKsGr9ltnBWYcldFE28/dS6OQz9tNyOjunNkVR6pYBfPYwRTfJ09HGn2Y7+9lHUfU3CmYmmFjclc9JSYiv3U5/4VVD1L7DaKYabIy8imNh6xnl7VdKS0iweCHUuOvfB7JpoihCRVCkf82mYVVrbQg6U8Ij58m6dkcR+F6jqsVdxFE5h5dFGwATsMi5g8gYokke9207l4F4ycb4KiwTA1MaXjyxFUn9oiPIjKTMswHvbZfCelVDf0c7+xkH+I91Ggeg0UuHoTeRGvG+3A+Y5bT3yzx4Sww== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:27 +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:02:27 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 40/61] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:20 +0800 Message-Id: <20230726040041.26267-40-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 91ba5ada-7bfb-48a8-d9a7-08db8d8d14f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 38f8Cqay50/4rKLFEniBB8EKnNrR/D1AYgVJp2oxfm1icjYyYBPwjwO691R2gkx0fquSzW6VD1bB6HucmZ9ddkRQ+DPp6XFKOe5O+HCJpu1qGfmzJhrmbM/9tagU/rqQqA4r70Of7Kc4d9i19sUhzGFHx88yJANYdrcZxJacoziStMqDRew1Kb8Sp97tm+EMQPPivu3KM9JqQPUBhREBF2LZqjITRplNuKtU0tHcbEDO2xF1e7v7z6XjWig1EFG+f8lIcuEoYgvWi8zyvUZEsDpdLhkHNVcJRXH5gZF7HbbF/81bTlZMkke/VWuJCD5tJ5E0cCXkCCiw/WJ2gUzkSwVe85cb3Vpst1MwxndPbmu1dZ/Dzbxn7NjxXwuEGB9mFKq+1wgKCQ96qZj6K3GJW14qTZBNxEgoAAzqR/34lXIBXqTdf5KFI0bi3tXzyfwsiLEeEY9sAj+zZFPdKtUPSXfckJDdM6MOznbKl2ol7PRNRLCWqdaO/Cl0y2/EgGrkdydwlCpXdEycuEYCJWetURmsPa/CkBaoNk76+hMEqJxfgRO+K3ngbSBBQLEevLKrSTQ1unsSBkgolXzBrzFzPuTVvew/Hy6lqZVt/crvFZ7ItmnwuQYKAiCK0qPDPaQi 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?n4H2eK8Zbf/B44tP6QWHbaFHpF2d?= =?utf-8?q?DQiL0iTubhLlE9KdBCgKhC0piht6xMaoUq32IWbirtpGFMxkXUB7AVBmY5IQJbrbk?= =?utf-8?q?6m9epQM/w9yiDsjmfSGmffnSc0Eka19+Vkb6PTQ3CaQSdGyPnP+1fweemIP3GO9T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utf-8?q?9P8+YMTeqIHuaPP5QBBssC+Mu3K45k9k42+7HV0/SlyNpOKbsZ9uo5+FgjBiabDOH?= =?utf-8?q?936dxLLEFCUY0qH89bD7oburtSJiRFgacwXSJAVn6KBdiaFzqCHaOLyvJUurTG39h?= =?utf-8?q?v3PuL4k4DYTO4rrrMwYOCopCOfc+8Ui8KMHXdqrxqZJn7qWNN0cFtoA0VS+MvKolt?= =?utf-8?q?3I9mDz66nAYF4LuSMNHahxVrc89/sD/JDXpRZYt+tt3FK98veKBQ2z0TkWNRC4aD+?= =?utf-8?q?3XAIe5OVOus1Zcu6EstCsKsW7m6e9BHWLD0X/1/KgWdWDfgxosWyrhn9sIjDKVKQw?= =?utf-8?q?GcAcyebAOXaOjxwriooMfd6l+MzW/ES+oerJmM1fP1Bp5wG1YfsVj3eu6n6smubud?= =?utf-8?q?/STBi1U529E1ZtzQsqrD0wJhHitxJhV4QZ7h2Sugi5gaoBRE9my5ityP8KJA0NA29?= =?utf-8?q?zxEIn/0hXDmDiNzDfz+9bF2wAfsi+rFwnXsOToiKmOnVFT0ofo5BsDRUJjJnJmfTc?= =?utf-8?q?XtjfUaiMreI2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91ba5ada-7bfb-48a8-d9a7-08db8d8d14f4 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:02:08.5793 (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: zFY/JUlA3AYG1A0n8RNiTnMizM6HdIhMnUSahb0VUrzwLzweyuiQux32ZB9Ji3tFm3o1kK0hESXcWgmKFCfUtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772457311402549757 X-GMAIL-MSGID: 1772457311402549757 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 Acked-by: Konrad Dybcio --- drivers/mmc/host/sdhci-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1c935b5bafe1..80e376802ee0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2668,7 +2668,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) return ret; } -static int sdhci_msm_remove(struct platform_device *pdev) +static void sdhci_msm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2687,7 +2687,6 @@ static int sdhci_msm_remove(struct platform_device *pdev) if (!IS_ERR(msm_host->bus_clk)) clk_disable_unprepare(msm_host->bus_clk); sdhci_pltfm_free(pdev); - return 0; } static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev) @@ -2740,7 +2739,7 @@ static const struct dev_pm_ops sdhci_msm_pm_ops = { static struct platform_driver sdhci_msm_driver = { .probe = sdhci_msm_probe, - .remove = sdhci_msm_remove, + .remove_new = sdhci_msm_remove, .driver = { .name = "sdhci_msm", .of_match_table = sdhci_msm_dt_match, From patchwork Wed Jul 26 04:00:21 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: 126075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp169455vqo; Tue, 25 Jul 2023 21:29:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFonlTRGfgvMW0Ym6IgLg/BRyCd1VIO1v176nLJvOzfqTyxbO/+xyNRgiTzQnrPDSZ8eYMp X-Received: by 2002:aa7:d71a:0:b0:522:36e8:bc88 with SMTP id t26-20020aa7d71a000000b0052236e8bc88mr552563edq.12.1690345766242; Tue, 25 Jul 2023 21:29:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345766; cv=pass; d=google.com; s=arc-20160816; b=oOYnVjCSjeT233+vNeS9Eg/yds4iZoE1675IGu0QUk54i0Yek77g1DFBcGp47xHbCt dtmccmcF5MLJoes3ZC2f0aBTw6r9j9K8fKF7s33p5a0J/cErI1gCLPPIYwCdufUmolE/ 7bemA/FP1YSfLdUfjS4KeckGJtZomm3sPB3an4PeiOFln8FSkFXad4WUuUC6/3YyM8+D maaCsHPWmLX4RbqVyWP28JK54cVsoq5I45gWrwZESemnNZSzf3fVfV2cGgEB7C4SFr4m jorWHMdNFfKXm72+9/b3fce25/zazrxNdyAefhKvCI/r4I/akASC0nRh4Ppy5ShMMuN/ ES1g== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=mmkxagUd0fsCA2lG4PScmXiwIZGHkFZj6ZlYwh6utN/ES58hckfSeowoVQO4Yd1wNV 1kWU3rqjQ1jtCk/idBpHC44QEcpPyvoRQYH0+RX5I57VZtUjQMNoWZ0trDmuza6mbGWt S6wE78HTDIBhnY2+Duk2C5RLe6j5OreLHuZVtypHE2DsUK1j+xNW4kjnhdNTu9xXiLtt BWUh57eHT2cnBDr3aJVh8GHQi51uZqwUYnUy+VX+dKzLToqjopnyfYWcVW9ecGUMCzlg ucDbkhIkMsx++ltd3MA9CsOhf8v3pxxb47a+3aHAA0CM/WQfK7C1J/xkmzue2TKGxHLG mzUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nszivcoJ; 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 y14-20020aa7c24e000000b005221fc36675si5579612edo.78.2023.07.25.21.29.02; Tue, 25 Jul 2023 21:29:26 -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=nszivcoJ; 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 S231790AbjGZEJ0 (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbjGZEIX (ORCPT ); Wed, 26 Jul 2023 00:08:23 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::716]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A0884EE1; Tue, 25 Jul 2023 21:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIZYZ9KxGp4ohgfglbtD1H2Kw6zo86YPuqYoUKzR5jkScoBQQr4V8sfNRTkKpb/FBIQhjvoxUcBL6SkZi+eNht0yR7XzCEKj5IhEHhIpQF6Gjo1CMQxUjBBKf/CzSJZCYa4AHRygU4LsN9ByZ1V6upIsLdgKrk1MqCGqikJ1DyIC8ZOD8H0cx4kDErX0ThAN9zmO/6AvZU86Ij4EZXG8WAOWytRGPY9OqRTDJJGCerrf9ZKPIPkQS7znnQsik+4Yk0JV0Z+6OD/XyYtzXj/ULPRuduMHq8oJAxk2JpYOMaKrpmfnaJvwODgBlz2lFgGm3GUi1cVtiNxJilCa3aWR+Q== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=K1/0y8OjSw+sdXj2OChixqVMdp/oDv0StqschXcvjzzGKIMgUQODouYVhAkJgkXjl0miHcqrN/zK4Ra5tWcxJ51VM03lsPhRtyNOa0aH3qnClakaU1auaBPE9Ow06TMuxYB09FKvk0GzTsZn4pNmkjTfRu0h197op6dZPXFXjrb3z5IwUnAcs3PAmXTd0J0BJhq29xTWQ2HFuJuEBTO/L89h1Eq3uO/cEPhN391Tn6cDJE/AX72g7SHLkijYXhaQo75o3wELayBz8LkKzoeFUMkVDgTU8+9PXVTPL3WEIzY3cdKo89pJK2KvBzUgFZc8RorUxPV+aT+xMLifhy9pbw== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=nszivcoJJV1sDS+ltn3AVb8fPhrrFBiVObnn0zopmnEOVdIV6GiwIIuqFZUT57UWgJBO38p+/OHaOAVX9bYvseUm498bOqnnK+8Y8SshGyNoBWeDedikfO1qkxbvr26Er1y6Ad97tm6tplrfEU1gkat9Uf4bZy/pY36LjS4TrHkl+DfKGxMawnboDzkBHLK4PB1dz8uNtXghtKtCZqnAFkDFV0wzbG3zxe4Gi1NBCE4zpORv/vzgT9x4t79OW0E6GDH5BXjWCZKPnGGU0yx1A0v3IbthQRNypGLfBbyBgEGObTwWbYBYfI2BrYKOksGZZcilXAnDzAPUu5wDpbYp5w== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:27 +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:02:27 +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 41/61] mmc: alcor: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:21 +0800 Message-Id: <20230726040041.26267-41-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 54b725bc-49fb-4e46-b3b6-08db8d8d15ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sCKDz5wMkAML9YbfOoCMFQ/GrC1sH8I2khedVHbGNBjElt0kYu4DL2PNbxM+jWA8ZK8Dsup9f/C2KQzxqMRQmOQFOZwYaodQPlfrkQbmUFJK0AVrwatXV5GuvLM0VPkfVz0GVntWDeWfmigodOcy3I1Cg0TVUN4SHzZHVaKvf+UaheoyVV9dS/PEMncAzmyj0kNzGSQ4GkpBEHh20nB3kdRKhODO5/zKEyulxWgAUyHhV6ImVbsD0uAMYzK58WEdhw4NKe5mWRtDtMGyXKJJeSMMF6aUFOVpAoPEIONl6XF217zUEua5bBl1J06EYHI9W+eygCOzflRAtpZxTB6Oat5WOmMcT6NMa3c9nc04kSG4qMQHmlBB4yVt45bWyQogav5Uj3kB+psvbRyotozgWGSr3sVf6VIcvbQo10qBUzfiWgRsF5/liRJwOKy/Cl0qeyPESBL2H3/ZaMC478zPnsyAjjdhb7yVu0zRYEOWA2jGAf+chm/kVW5kCt0Qo544yBy4EAyvXXLXroVy2cE1YxwTfku/RAbDsvm2XgRxKo8fVfIo3oJL5TACBR23SfnfXRm0lcx2bds3TopEV13VXw8hEcw6nq1FpSNfHMoWLHQYC1F5oBpuw21DApYKI+ft 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?m9zvFQuJkZueQtV6Lv/puPMZoAm5?= =?utf-8?q?GtgRiwKaSXARqYGaHwBmwShVxwni0SJLnG614KLkOgi7cwN7yL8a38+a4gZuX7YdL?= =?utf-8?q?o3xYF9sNKFGPvlcv1Yu0eNtvTh1MEE5GBmuozuR/5jEUrYIn/dP6MotP5m3Vwjcc1?= =?utf-8?q?ksNapScGRhkMczoFcvP/LR8Q/144ge/Z2OE74VMCUVOODMMNB1he8npEe73JPnZkS?= =?utf-8?q?CWOuL5s/CPY/IFnhV+HkVXtnn7BA8Kj0an/z/ai3SBoG6vI9Trg6dALHV/CmFFb+k?= =?utf-8?q?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qxELTynjRNHJBUI0S3Ei+lRynowZDcoUfNrssBeOhE2PaETgpyodVUY1LS?= =?utf-8?q?xHMLZacCKbaIXKwisAGWRy8GPxZbvvBxhx9ggpWU0CkuyARYx4EZLn55WkP346WnU?= =?utf-8?q?UxB/7fWNEe4PZd8Gl8K0keOAr4Py8afC6m+xCRFnD6+wXUYdySXpbBUqL/kBlRCl5?= =?utf-8?q?uEUmfpTu65RA5qO48L/h/xFp6TNNt6YKvCU+0e3CWYoyKDQHzkn3v6Jkukoi5t/7k?= =?utf-8?q?rZeZ3UN8pxJ3pXNddTHoFrKGcROhBR39snqokG0v1ob906dldzj1ghp8tSuj8nyqN?= =?utf-8?q?MXt4ZxIYPLKY4BTr5pol5n7XjgsRz5sA7eVzm68vbraM2FPvCGIi7KdDT4ZfAOt2E?= =?utf-8?q?cYskj9mKzbjv?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54b725bc-49fb-4e46-b3b6-08db8d8d15ba 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:02:09.8822 (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: hoHuRZY1A4Evx/685MJp3k8K1MqSw7MKk1vKcqgg5maEOaAzVmU0eNroCIw8PCcfiWWisQtHiyCiCJ7NfI/D3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772456001813249151 X-GMAIL-MSGID: 1772456001813249151 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/alcor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/alcor.c b/drivers/mmc/host/alcor.c index d01df01d4b4d..42aa43740ba8 100644 --- a/drivers/mmc/host/alcor.c +++ b/drivers/mmc/host/alcor.c @@ -1125,7 +1125,7 @@ static int alcor_pci_sdmmc_drv_probe(struct platform_device *pdev) return ret; } -static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct alcor_sdmmc_host *host = dev_get_drvdata(&pdev->dev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1136,8 +1136,6 @@ static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) alcor_hw_uninit(host); mmc_remove_host(mmc); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1177,7 +1175,7 @@ MODULE_DEVICE_TABLE(platform, alcor_pci_sdmmc_ids); static struct platform_driver alcor_pci_sdmmc_driver = { .probe = alcor_pci_sdmmc_drv_probe, - .remove = alcor_pci_sdmmc_drv_remove, + .remove_new = alcor_pci_sdmmc_drv_remove, .id_table = alcor_pci_sdmmc_ids, .driver = { .name = DRV_NAME_ALCOR_PCI_SDMMC, From patchwork Wed Jul 26 04:00:22 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: 126108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp189023vqo; Tue, 25 Jul 2023 22:31:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlE73nvG5WF9BbQxstEkUem++wfxeimc5WIGSWjR+bto8kJj0p57nYE7aJyJzEn1t/umDiVT X-Received: by 2002:a05:6e02:c70:b0:346:66f6:4da2 with SMTP id f16-20020a056e020c7000b0034666f64da2mr1017863ilj.10.1690349482555; Tue, 25 Jul 2023 22:31:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349482; cv=pass; d=google.com; s=arc-20160816; b=Qnswf4QGx2J4F+39yDOJS6TYjadZeF9Un26xldX1HRWAvglVckLBt0cSkIJWP09b8U BKXpFKO98jkzqiayHfGfm90ozGmSobuRfKs82PKbn9UCRZaKX4WdjfwmKqkvzlNd3dt8 9zXQ8v3gUhuCMYB+x/kDZzp6M+q6wUq80PBoquXrQVm3XRMPsQCVOddG0/7QFUfHXZLA 2tqYD7bDFvFRBgGGa0xc7bvpRWp7pGlyS9MiUqZ8rb99S53oPml7RsmviinrwBFRh4T4 dti1HxH+ymXPA65eGbN+OJcYSqYz9V70jxCLcquPFcXRPWqabhLRgBYUKfv/RmVDU8dI z6HQ== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; fh=zja0ga6cdYzjxoJoO6ODJpxhr+hlxRWJt2ziNAHhkao=; b=Q0DTmpGWoee8F9YMdaufK2duG0QPbdtOrqhIwGpeJRIkPfMylx6p9Az2zH0SEw4fjC 6aQ45MMAw7zHdsnpmn8Z3zA3dC55vSmTYwlI1oO8mB4YkltzISktS1KFNjkoouzGZVWl c1qBIa1Y+t3ox58mktaYCbfLdufPozB1nw93St9iVafGims37Ih8g8EviqK1QsQe5PVh EzVeJvrA3IQx9AG9PHg/7FccqYCyGEYdeqiQfoLtU9yet6tSIslhI3pMVByj2+X3rE3Q +PGGv47OBTvASA7BLOMYen9uoOQ6Z9sleYwZKriQ4lE1puVyWura+sZ+F8RGlHIlVYWg Vjdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jsu2PTDJ; 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 i6-20020a63e446000000b0053fb354c194si12486791pgk.659.2023.07.25.22.31.09; Tue, 25 Jul 2023 22:31:22 -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=jsu2PTDJ; 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 S229790AbjGZEIa (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231730AbjGZEH0 (ORCPT ); Wed, 26 Jul 2023 00:07:26 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D31E23C32; Tue, 25 Jul 2023 21:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eTBet43sGs4UslfTD9yGSHwVGbVEBqP5zOQSUw9Q2UHPIsG2TKt0LVIH05ycSYUKBdybLqBIcqLTQU7EAgVYBHYjPESQnBI6R15mbQph9MozOXeif9h9g/82CprtlulpWdAKfiv/F/a85yRtRMuUgkJ9KEMY45EOhlGpYsoK9Q92TB7o6fYr5y2b5AUmyaoAEdCHmVIMVVl6S7QHLeAyo8muQjFmYgfHNeiiOz+4YrLzLCA9uigsAmy57i5OI3W+KWH4Vw3xrOTu47tdwE6lh4G7O1rEyyHYhu6JZLs1dAQb96XEOs6v/oSg84oskY+tZyVlezMCjEb18dU3KU5Nyg== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=JfcwhU3rGz5syUzfnIVdY1Qfx/CkIz5GCjuLzfwDVapFS1TZ8sItuLF1NWDXsPBWe+WrkxiuVHbE2342bH3/f1C+dNLrdC7UVe9DJBtuVfFAFd1UbQjSNid3KnX8jhphwbSWMJKXAQzUWuPpsybwUNvJWtHt5zrbGA/mEFKWlUgJOUjU60R5cqWrzJikuajO3TOnFulmHYmnzOda8qw/4WjjzAP0KD35mMfsnthTSlECy7tjvYmLNBOvIocaURPAAdvfxC4aIXVpqB8EuD/bsSbcSOjE7DjISRkYKRrJc86KAPOpn+I7QT6Y7VAc90/JRnBvftWHdrO//+iZqFUs7w== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=jsu2PTDJnzhnmNnQcYjypHsA2sSS7++l5g/xucfs3HzR1+oxrexxPJNE7jeK2/gqC/C0TZY+nKS1lGijYrj2N2DevBrYY7Rnv4KgdgsFKDVNbqLhYLAK4JuLXyWeYxiWChNE6rtO9YxxHiY0Y8tqjquKy2sJQpVbE8BR7D+sP1L1hDGGltE4e1QwTp6HLOfLwC8OvX8rcrqczif4SFisV+wq/O3JHEjrGl1/eSOYOdSbQVebz+L3NH/pfkFejZOEMu/Kd9GoM72yOlKDAerHfer168oMi8e8Vd2ty9gVI6lPtjOYXlf+mgkQulb7AuNGgjSR9OBls1L37V+U0Jn0aA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:28 +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:02:28 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Heiko Stuebner Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 42/61] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:22 +0800 Message-Id: <20230726040041.26267-42-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: f2b143fe-1a52-45d9-84e0-08db8d8d16dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iZsqgPvWHHA7TbxIb75YKDzCfyYBsWZkfPLcq0Oo/m5vV9kdW0yOhofFT4PM4krxKjvb4034H5kv6MSwICzjMTUo/crSHLMOZgJ7mfU9nlHaYQQdSIIvbXJu/ZSZeZfdQar61aAOsK6WGdB7fbFS/ACJgMZ4e9tRtPx3Lwc96PdDkCVM2yQFwvj3xbqSR17vNJNjeSLIoP0Lj6Z1OgX/bRs7bbYo85TLhIBmCkMwYrkcmUNRsjRZX1CrYx99DYC1ehpbBwb8PjQ1ygn1zuCEacimaK3kQ9KhkUEgxmsCONoXpd1+ZekuiHaN2iuW9t+0hBjfV83XLBmabgy4nBwv1pUbXMSXYgl0Zq1F37F6hH1FtAcMFXh3RUBq5E02oi5RMhwXAiMljPSlgT17edsp+eEAUHieMR+awPtQqtPc7PjJNyPxofhyoK2+t1lUEA/icoCwm0AhoVGzbkx+ETNrcoTe8qEhMcYTpvor4mUmh3eLTxahTJsy6Dw+SsHbof4bjYcQ6+oPXkrQ4dRhb0sJOVJ1nnyqqxicxnWZsw8wUO/Un5eVS4nevq3LHVKZhjTat6EmvqLLat54oUBaV2A9eWxjFu5yJZwvkKLSB0GIM4yOv5Uend9CT1JBORA0p8Pe 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?0cIvSMzdq5/q60es0oDip73ZtlKk?= =?utf-8?q?Z5/+JLUWCDwYGngM+ilwMD7bgPLveHczJi8R0re/5rPiSoaNsytXO6F3Nr4P4Xymk?= =?utf-8?q?zjM5kaBPCcZ1pSgoyYZ2tkgVkBT3l5dAmqY1c6kYi1GHa9lmXCNMokptrjiOkZ5OF?= =?utf-8?q?Mhz5t5ccpbekhVaBnLl9Y1RlYE4O4EanVLQINitEVisxzJNItD+ifcQFTIWwsYTuv?= =?utf-8?q?QQ7m6lX/Exiw56HgrmUJOPFTOuEnx1Zi3GNez0fNLDCR1ywfONlts1rhfgU8DsTBE?= =?utf-8?q?LTnwmLjaSc+4Rfc0Kdr2yd3dA9bL2+gg++cr0tBUfY/4d9Mwd+m+OK+oxBs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2Eg?= =?utf-8?q?Q4rUF2m+mOc1HAhF9//0G2y5yb5HGCxkCAfbl9fkRiuxESh4U4X+guiOFvdoxIXMN?= =?utf-8?q?L4qZzBjoKozQEiIB3aHH+V9sZ1EDCCCWVKwUQvG3UakZMdY5P+BiOukV2smzfBtOB?= =?utf-8?q?6Sx1lE2Lt4g6W1NnITydZv7sjW9K/0SYCKLEGrMsCn7F9X0AaHC6w6+oaE9vvGC4Q?= =?utf-8?q?viStGI7ieCG/r8LPzMzqIvmFsSe+G4tDFUepiHhQ/bYiJqiu7Yrui86UIDGSLikMl?= =?utf-8?q?iz6/dE1Mbi37Cl7ECLYXwqyhBAJp2228UuD74kTh/T7EnJMAazSm9G0MGTia2APSD?= =?utf-8?q?p6CIUtdjYtOb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2b143fe-1a52-45d9-84e0-08db8d8d16dd 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:02:11.7833 (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: tSgCGb4HmaZ4XgsTvTg3NFgNfbSazPb6G9Q1Nw7ZcKUxm+DfoTUL8yKaTwcTthBSUahP9ryGtkMo1yv9KUOVrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772459899248669460 X-GMAIL-MSGID: 1772459899248669460 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/dw_mmc-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 2a99f15f527f..b07190ba4b7a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) return 0; } -static int dw_mci_rockchip_remove(struct platform_device *pdev) +static void dw_mci_rockchip_remove(struct platform_device *pdev) { pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { @@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { static struct platform_driver dw_mci_rockchip_pltfm_driver = { .probe = dw_mci_rockchip_probe, - .remove = dw_mci_rockchip_remove, + .remove_new = dw_mci_rockchip_remove, .driver = { .name = "dwmmc_rockchip", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:23 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: 126100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp184109vqo; Tue, 25 Jul 2023 22:15:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdB1FkkUBUK2ByQbSbf50tbrhM1HWhu1lo/a2CkV6VR5Gc18VIdzw/HYekK6N0fR4gs8HL X-Received: by 2002:a05:6a20:a109:b0:133:e3e3:dc07 with SMTP id q9-20020a056a20a10900b00133e3e3dc07mr951685pzk.49.1690348519837; Tue, 25 Jul 2023 22:15:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348519; cv=pass; d=google.com; s=arc-20160816; b=AkcUxsRI1RYHX5T5+U643+tZncroEQksrHdddGlOLXledC5agPJN2gWOUOt+sSmHzJ CkX5/az8DH0467fGOrW+SpIXUuuK0z32JI4T65InbBoMBewArfF8eoeTPTi4PUuOUe/s gEmnrzP3dTCJ3F9Bj33z6m6CXufDPFfLJGGe8DVkzboDjUEF331Ox1S6p9xP+PNmSkY2 C4WUmcR2m6nnktiLXY1eWQ5dx5zQkSgjs8/NAnxMx22hHfSI8EntX+azs+IcgL+hHK9C aqSn/0dJK1llLfmIUqry0yLkyIZlzBgSD34YAy6NpIUvT7X07l4dlX7i1CCQyr/bMwXE fDGA== 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=v5F3eAom54EqmQeIWHQZGaMo4VvIgIlVhGycW33wlGd5FiRTcCQ7HoI3KUXCCTCLFS aHnCXymdYth+UP78/l4ffq5Fm4C2nnoM9z5m8t5dNoBt/0y3ZZWfu/KDZ3BswqouOE2N bCZyf78czFFvMWa11mBq8rRfdtXpCxyr9jCHWrGrn8TRLGEDoE/wt9Il0SdPLzQQ47Bt J+AZgH/P4uL4tlVqVQjY06DV72mJEdWLF0c+cZ5i0tqTtcOB9Q/RGrX9uOmjULuTnsc3 wJmPAHcUmpSFpakjuWgrp2afRwbmBbjW7gIP/mxCHkj8u76rseHtKRImJR1JNEzrvQUW ETNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Frovvrou; 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 x5-20020a654145000000b0055c7d9edbc5si12389401pgp.174.2023.07.25.22.15.04; Tue, 25 Jul 2023 22:15:19 -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=Frovvrou; 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 S230258AbjGZEId (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbjGZEHl (ORCPT ); Wed, 26 Jul 2023 00:07:41 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AAA24C23; Tue, 25 Jul 2023 21:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ddVRsjz0BTfKBE2Ot4aIDiqZLO2JnG9AfSaSGoqhSGwieRAXlptPpLdV9z1UAcvJ+BGkYChbQgI7usJdVLqOvuYa/+dM15qUV9sxbEKpbQtZD6P7siGtkZIhpyEi65RD6hy+wGnboEaIjY0MuCjipH38ck44Iq6BzwI0MEqaYcGEEUCwsj+4MPw1viUyhdcQdTMgxVrdsw2HB3fKx17LAMyW9t7+vAakgKyg1KdKw/EX4A14AsWUvaM2n9MtyxegEs6fmc6um2KPbVFDtd3cvAqHwEHYKdaNHQmf+LfiaqkgVvk4d1MB458TQ0WflAsA32bfpWlavQixvcf8F3x4Iw== 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=lcGInNIn1daum7aPzhd0S+sCrJbLEWlA2pxieQ6gJQLLWQoINnoj3C6sdFoN1lEhBzNQswNT9WOixG34yg7vQG36dq46SOefsr7/76Wdhzs7o4tKdGEB4alI9SbZTauFEdQqhh2jsBpgsX1cseqWYpRbLBf8RxSf7VsXWAVT5UYdqiw2UR4DmotznhkgN4gQUNQWVUyNzBPAkibrsE3ejGDNLIT708EKO01oOuw108Y9njBWZ9HAl9DVk0Y056WsvkTj1aSVkArF6T/Haw1ZRK7PKjFDLi+mtI95z5g52TzObWZl1NrnXYwRfm87UdLb9YBzZVP+AeDodtWBiWuxVA== 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=FrovvrouhvcIgVgCtDFuShO7t35t/7dQj2XO7E57ToUMDBYENC/UHlp79lhJF30JW4mR2GapIJxFZC4+z8WNTgQh/KzIk903bNI87yN9icGNzBEu2Y/k7WQRZRcRzwXItN5ht5pCLfPFhELGECS+b5taYdXs1W5DczNgzU8LQMX9blHGVUJIMAzbZEoFCBLLqC6Cyn/FXhmmnY+4YpxCSgc35cqJwga2UoHDF5FBw5TniCmITdjf96CE9gCN7zV2Nz/hVvfeRhZPGt9eCUVW5y/7ngkC3KflBk7Pi4nXr1ILediyDM6ASohn7G2a6oTYSAt5e8dsadnbNiVRBBtBZg== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:28 +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:02:28 +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 v2 43/61] mmc: owl: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:23 +0800 Message-Id: <20230726040041.26267-43-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 6190c62f-deb8-4770-a388-08db8d8d180e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EOb1sAtihy6ZYroe+Le6swXes4AO8x7s0EG73WlKiiqLCqYQL5+XXapIYL6+vm2XCoc4HrQUMpi7W0iuYM8kSo/x1SbwUu0nus9l8vbaOudzaPGYxEODh2Bgnp5UcnY/yNVNwmA3MvdBcfawwq0O7Adh5N+hoHgQj+rq9QVnezpeH/mMY0lF6T/+QVoMj2i0lTq2XThTktHhmoDjHodak0hxMjvY4LxrnIpEgb6bD5vAc6q+OxgN5vut0XnAz2DrjxOWVszKD7aNDPRA4ofp58BqPKITRyL1Yl4/OxlPQRo2xySFIUiuIiBNoSBZvwILm0dl35FQF0AJ5LAiN4o/3cTRHaLktS0itQNiUgaNssOSudOmXkJ66Cs/p2vDU5ZSh+skn/L0nnJfPrHpOk5OQBAmBrRCUmhlcR7nKa1nR2fzZPoblwOkpxazjaT01pqVCCsjpwjKKDIXi8m00PrceCazN1mpgz5MjFbG/vsK6gHlEPR9JWhxd8nmeDriLbg+OBNSqEjnKx9V2IdQNHkKTb4ZTpJdJmZ9rgLs3r7OdTDQJLcOmB+NsnTTut8TMaORnixeioszWH1YV3SmnTh0tjvuqiKkzru0NYdkFKbdaTRLW5+70RW85SeP95HIKFcm 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?udahdcCFjH+moVrD7zeBZCB1M9qW?= =?utf-8?q?ajBepisIWtBF+xEh7WPeMYFEkXHeCamwL1TtI5cw3agz7JZoTG9kRjRxi1u1kSRjn?= =?utf-8?q?dk9m5BCB2QW7UpaHNz1aOu7us/o7//b8pnsDpMlSE68QEwgZadDBer59kANHDvXfv?= =?utf-8?q?2hW9T85DqtyJavIqX3OeR/2cMSIZy1gt3Sjxs8HFd7l9kiapmGEcbFh39h9AS55ES?= =?utf-8?q?bB3XQGhiJoFffO9YGQVHEhPLeHUNKrRV/VMDkHlXZo7P2TSP5/qO6WjkVB5D/AzCf?= =?utf-8?q?/RP7rmy/7XScaZCCXJpV3zbZ94hiyv8/sLSMxE6yh69Th7kAgOgLf6YAbv3Ul1Lpn?= =?utf-8?q?O9DgKBXpYOxei7Bf91pRPBVyQwYF18+9ODBqXyoqtTrZ0lEPPTMJrfZwmzxeqHOeh?= =?utf-8?q?0y/vHGGeWRCMsVC3EWXPooosM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SjVrgwIOuUw/C6O3y2ci3s5uCmR5?= =?utf-8?q?tT6zrREMnvCtIJo7iXhO/nk6k08AnWJQhc2HvsCIT99neIgk6id5PdqxO7D8iSnRu?= =?utf-8?q?LNlwmz1BP3IZ34YArAWm9dTuw53dsQFuSrEFSyi/oR4T8Vv3FSWkmclj2K8lHvpiM?= =?utf-8?q?yDY0v7LW49oRfuA/DNSc+xclQR9erDd/EFTVHoR8Q5s9mKNC8BkkipxhTlwoBE4Q0?= =?utf-8?q?4CPlGkvmVCI5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6190c62f-deb8-4770-a388-08db8d8d180e 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:02:13.7839 (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: cOjIQOqcszs0to6zw6eKaVi5/M4JmjfDLlN7g2ajIUtSnRpM1wVSEJFT/SSWQXi875szgsruIb2OFfaB+gufzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458889393723450 X-GMAIL-MSGID: 1772458889393723450 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); From patchwork Wed Jul 26 04:00:24 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: 126071 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp168946vqo; Tue, 25 Jul 2023 21:28:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHTJT2GRRHDPgZOF7HY3HZbW/13OAnxr5avyjmUH0vwImSRYVJOtdPmX4UHfDgxgdMGdKGE X-Received: by 2002:a17:906:7a4a:b0:99b:bca6:cf94 with SMTP id i10-20020a1709067a4a00b0099bbca6cf94mr730359ejo.14.1690345680073; Tue, 25 Jul 2023 21:28:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345680; cv=pass; d=google.com; s=arc-20160816; b=JukJYg1Wfg1e/vM58aKqm5Y+Syrpp/wCE/07WmCEqhoPWTKqMRKrDwxrobdlEDethK SijVyJmaXxgX1Il7fS+YNqU/hkqVwrnsYVBYd0w072h7j4HbsOQcVmLhjPGAjJKOtXba /jUW5ylgbtcXW1oAIcW7R0IA3FeDBfTNOt7OL4S2G0bRKoAGTXtCMGQciOz0EqcP8N4c kwZj7s+Xt03s7HPGndf26TmyuuwBUS6dHxxc5bC89YWQLyLq5OHje9Gk7JfJGNyIFqeZ Rzo9kKs8wdGHGTv8kEsCi53kM/MltQ9X4lYk8HNb35MR0o7v5sy3+afdoNoQOKu+G/tA 7D7g== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; fh=6cdLzAmRtuylSKIxaYw9sY9DAq4BCLf68zkyCZCuc9k=; b=Ds0XHJnJKVclrSa/xwpzc9HOEaeMrd/TOqlwS3CGRfN3bszarpSvZLCZ1NsdbJMuY3 GNcro1zTLm7wkc+Jl9IcgDg/YDmXDzUW3QFvIvi4quIRuga5hCtD7RnqBg5P93s2k+1g /EFJBVXd0lt8tQ+Ay6XSparvVcDjbYF1lDVBd8fBCsS6vGjjCs9TJVOtcoONW2zj/VXd BIl0G9eF1TvxHkEOmMXmsOmfHfxyRMkD1CvRHMBnKghpwhI+SKbA+riWMhbNVyMnGHqn Boq0wK57B2KIaQnZrbwOo/07dAc6rS0V2T/UvsaCmUGRvIxZykhCMlHvBZkNVbpBPPHs PCdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LYaSzgp+; 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 x20-20020a1709065ad400b0096f6faaaa93si8910630ejs.223.2023.07.25.21.27.37; Tue, 25 Jul 2023 21:28:00 -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=LYaSzgp+; 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 S231176AbjGZEIl (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbjGZEIB (ORCPT ); Wed, 26 Jul 2023 00:08:01 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::705]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064044EC3; Tue, 25 Jul 2023 21:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YPE6dxRszVSeZIbRIKnSjaJS4ATjpPalnUOYSaW/hGO6uVhSSYepKkvIu3WObbiGgxie6S0qrNtsJ/xREGhAs7YdfuYqKRdWO0+AEPKsShAlU0l+jqghcWVSk3OhF0URC0Vaw+YEG9K3mEJtFWgnjCjSVehfPXwBb+d2sOAgGVxtfMvBVQeQnE60yJoPBsxihdEMr0tqPp0q3ppOKPuOJ+5uQLg+ZJ5FumE0PpS4/s5v1EJf7C7eqcny1z0NrlWxnUJw/uYW6bIGIzFYw4ojce99J+L1d9NhBaDAHI1QTFr96IIzogW0u3OMg1rSNWvxSHaf+ww8noCIEwI3My0nqQ== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=LQ5xk8DyABleCejGjICE7S1S1M7Ud4H8/i/SgYWGHXEvRYegHBFLOJa9wXq3eAqlRkgeq+0DBTCrdXc4hyS0j2hxgzJX0QkBBFc4H9rBVYpEPUf7WCyGR9S09ufR+OswuaKHFl171StooXn2w3fhhs+LHD2fiPH1BlYjuPMJ7jzpb+kJfzR2YKTsOCFyOPQC8SbJShlAbBq5ASLeQeib+C2y4TkMGbEIn2pmiF4i6z4jsIORrILXgTp5SRBn25t4oM+sL65FWRYk3zxS/4zjOlP8fCiHLWj/JjpbNngAH95ub8X7VWAJwW5mC6ARhj4zaufFdgOzNyZajOq1jCeoRQ== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=LYaSzgp+q8y1vRJbdfXeHpo4tO+omEE3ETxPFYa9bGPcabrnoDA6ZgJm2RiZH0adxJZ0ex+cPjF+S6bw6B1JMRnQ3BH/bN7KNzqkWbxlLg8iBgQr3XBlilnrZZt2rU+T0aJQGZlQR7IgG+ccniz9PdTnzB0phipxWETBKsNOUQZJ7tzsmVnoc1wtom90JMdBJ27gV14B7E6DwSfkLhRkXD7VLOGt++Wo+hWV9eYLwYNB/yMYFLYqjDckrlcjQEL9l+wPN8TYicllJ76+3kHaEyCQjI1X9IsbetrV1ThhoxC4ncpKi8ZgGjWOgKWAml/4HwKIagA2l+a3IDeZLUgXEw== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:29 +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:02:29 +0000 From: Yangtao Li To: Pierre Ossman , 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 44/61] mmc: wbsd: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:24 +0800 Message-Id: <20230726040041.26267-44-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: db671ade-63f1-42fa-c257-08db8d8d193f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CMIbEO5DKVz9xi+KLGQwANXldswD12sXbH9ochhu1G/Akf8QuCWtDnblQ7RxLsoE1TuK1S62LQdFMFpFDZc9oE4KBsl+lMCilPDwxF3kDrjPM5QiI3dD6RNxzUuAzCnots2HcwRstxQ0isyQTn7Mzqgk5SdLv5c2X2iVQTcFXKkBQccbZifJ9+1gLJlIMwxHTbE+wrroaJP7UYhs7yZKVQQpjNHG/zwSyMvJBdISMD40Bnjk07PqEnpIUG0b1ZT4aJyIKKmf5i7kQQPF/z9+5nCoWEI/0dHA9UBDUc+31+NJp/JY5jW/EKPuC9uDhdiv14n8nh0mq8CuomvdbZ+5/m5fDLS1ckeFw9qOL9zYN/AN+udxcPyxYXcBWArsPmGXqsv1fsmMA3qYuEqPuBaEkcuoQ9ZQnYNu5EAWXzES9xxOXpcmyX46L02pD41OiIyXjNQczC36FHrrPPT6k/QDALhmskUiVez1xIifQlsFll5fggSy8WO3TaOkI3ukLLsJFw79g9zXA7RhBsafmXa0TYsmcJ07u+5aa6Yl5GCzW2SstxsJgHgdHnFedjPftqTtNHKlWxFYwqpnoF7Dv1OCQcz2b604fhu2fn+pO3Q1UPbsgTeDdELT8Z08hgO5DldX 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?d7r9vFc5C4Ph0wV8RvDavxDv6VSN?= =?utf-8?q?vCPABja6M98juTs1ZuaW8vykyGXbLGSRPbSer+4gncDMk74C4CV5/O9ApnVV1VX6B?= =?utf-8?q?Ru7yK/bL4OFBZaDAfxXlHcafy1Rffk6/BZWqh4AAeIiA7m793yTAv8A0XXU4/BVTN?= =?utf-8?q?uy3rRBiy9tMcDrQe5RLjr61oKp6x1ok9+vhlylm5e+rzRZIa4O2jVOi+l7wKV2Ad8?= =?utf-8?q?rSyFMY8cBrFKL8OzR0evJmoHOsaY4Y+mmhE4ixgHravEb/i0nrXX1cja4rynTucX6?= =?utf-8?q?hyqd231rjcN++cg7evkb75+qMTaW6AQWp8kqocSmaiHkONmirl02NyfxYk57TnJPZ?= =?utf-8?q?78f1+MrIiicLMxqZD+tnOljJ+WFRl8ZCeTVdDbAVUQ7FSipBhyDk8QcRVdbSS2sdu?= =?utf-8?q?zwkz5nEf8r8TodiezilzXwb5hEy5b7lHyd+4amRexNmpdbhLM0Z0+Yt1PfqD7eSwM?= =?utf-8?q?KBOVgKtkwr+uK6K9mwQ7RIm6iC4yK+XCthxeXiohOWbvFe9eD/Jf5HaCLdQNErU2p?= =?utf-8?q?Tg0olaJOWwgftxo9XD9DKXKg0DFq6FoXVlej8H2Kn/N8g0uF5Nly7avNz9NMcC2rW?= =?utf-8?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?QNmVPSjmTwQs2yzHkRMfIaGJ6+2/0amuHVLp9tNjuE/0GoKeoqS5391gPbpUcr93M?= =?utf-8?q?vANrUr/xpp/O?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: db671ade-63f1-42fa-c257-08db8d8d193f 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:02:15.7681 (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: NTTj5IkqR34zCnCzGodwaZdWac9n/ccGWzxyjuGqWFzOVX9WqNR6P+SXwDkjjGyq6nDJGbzyyryAqKg90vBpkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772455911881415701 X-GMAIL-MSGID: 1772455911881415701 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/wbsd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 521af9251f33..f361cefcee01 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1758,11 +1758,9 @@ static int wbsd_probe(struct platform_device *dev) return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0); } -static int wbsd_remove(struct platform_device *dev) +static void wbsd_remove(struct platform_device *dev) { wbsd_shutdown(&dev->dev, 0); - - return 0; } /* @@ -1904,8 +1902,7 @@ static struct platform_device *wbsd_device; static struct platform_driver wbsd_driver = { .probe = wbsd_probe, - .remove = wbsd_remove, - + .remove_new = wbsd_remove, .suspend = wbsd_platform_suspend, .resume = wbsd_platform_resume, .driver = { From patchwork Wed Jul 26 04:00:25 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: 126106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp187316vqo; Tue, 25 Jul 2023 22:25:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtvIfoXzwPkttKC9JH71tO8KWwZ5kxzqehx5SsBECjF2rlKv0N9G8N6wIxZDqSQa+mzhFS X-Received: by 2002:a17:907:a0d3:b0:988:f559:47b with SMTP id hw19-20020a170907a0d300b00988f559047bmr791197ejc.31.1690349146928; Tue, 25 Jul 2023 22:25:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349146; cv=pass; d=google.com; s=arc-20160816; b=LaLbCiraw3u8d7jF/lbzlORxtma4PyMZD3DMC/bDs4UrunSkPC0K5/bnoqF/XmQu5W +13ZbUQ/oUKZ7v9K8yZ8qv/mDTO4042m05rOxw17sbPN+9LPLWTUTdK70rTKtDGBGSbs Fo6JHdWFaV2oIinwpncHB5jdx+NDIpn7Zjcqs//ZKroLubqvy+1Z/Nb1ILZycIEbSsD9 9ztiJgSvv5YhU02eOm+GG4ErW1wIrdXh5zP9+sBNWgK7frQrQmtOPTNVgpmicNQlG38L I/mOWvmZAlg35pNdPqNX2XdPUj+khOcQIp8gbHWbIn2RdleP22LEkmdJ/ozuR2ki3KDh vqZg== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=T2BOP8N5qUDps+eu1RzBAODHpPOAOh2HHwNCSlXKSUDUPb8cHPQoSLcMUxjXlr1IR6 EEoVSVSrz9HOEAoV3i8H1A5CT+g234O0LevAN1yv8HGPnRHa1TVjQt+2lR51jN6iyTX2 Tei5AYFWgRXa8YabCsO0RPSigY7qIPCe9HanscNgD3JDtQe9ofGZvT3ZRauBEZ2+/9VF J6Sj7pcNemYzqY/7CgC7xBCQzUCkkTXbxPLZD87avkUd4EPzlDMTwAMx5edF3mbRlCcQ 3Vi31llNYPE4U7f0hKLgZjt+zIFSgVP7AwwagkHxPEtKFeaYw5GwDa4v8C+20NM4XBjW wuuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZrXVzItH; 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 md17-20020a170906ae9100b0098e3591d105si8742726ejb.405.2023.07.25.22.25.23; Tue, 25 Jul 2023 22:25:46 -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=ZrXVzItH; 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 S229542AbjGZEI5 (ORCPT + 99 others); Wed, 26 Jul 2023 00:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbjGZEIK (ORCPT ); Wed, 26 Jul 2023 00:08:10 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1D04219; Tue, 25 Jul 2023 21:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iy0uv38j/t+RYn35nWERXNx/ZulHz7F9vn8gnuP1/LwfFqwrNAWgbUzQ2/4+7jRthu94vP23+Vof7d5sCx4D35oQiZcRjRUeL3ZG9bEiystFYPC/CwYNv9T0P2E7VAsVq6kVgJgq+rmnGJpLgtcw+n25iy3pH1dhKlhcOnbX65WxgUP9UzUxfQScxzHyu2SJrW4eYXtt5NeKCNEVwDBzB4mad+JUec694TmABVPo7EhvYLWzjRkPGr3Dd9IS+chkml50q/fNZ7wg+L72XWM9K5EPejsXorcXZb1sg1GRYR+fBjl/pECm01YyHz4OmP7dYpOWK8PWc3wmkIPfHRESkQ== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=R7I2sn9fv0smlMaqr6OIcAn7iVfRQ8b5qPfgyod8krxtfMsD9HIi9S0lul0FiAdcsPJDHToKrAmjk7oGrV4ifjansrPNSTZEyI4io85yz8g6M8237eqVpTWbvtg1MgZFwPLfoszIjBqT139RKnoP78RO5jfPAlTlqabEtaRVLGs8F/KfMYO/zqBtq99Zgf62yyTWQc6O8q2OdyPbsZgXkWh//qtLkhkp4xgY+vAChu/AigpDwmqWIy1qrYa4R1TUwZpByHSDhRMcB9XolYb+9moMM1kTJnLIckdbn6yFZiH+/vHMcXUpyjtgRXYvteT6mDin8UWIAedoX6pyLcTzlg== 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=lZwO81R7bbiuI82gPcvzCcJYy8CKX1m7kW4A8ZR89No=; b=ZrXVzItHmDLj7sZLOSzCtOcNFwb8paxIKhFVLnPsqyP7pUGbjH6apScpwhCSh94HbVDh5xWl6P6uaSJpc5GJaDgPdXGpr9hXAopDr20BFHw7aGRfvDarVagaxTKLIr2tNLIRzHSAYSQmzBfJEfDqd9p0LjNDMW5jlRPjVxgobDgg7nEeTWBby952D1+Je3UntJfF4WP6HJ0xAOv4b4nFb4NaAglHDUrgXvTsDf4Zoke9tqidfyUl9QzDSe8xSQbw/vQZnQjy7zvkoBE5dRvXmDxrudA138g0aRov6Bom1Q2F0nMTn9fUT4wjzzGaaMkQP3aWt0GHNdF87f6qcSKzEA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:30 +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:02:30 +0000 From: Yangtao Li To: Jesper Nilsson , Lars Persson , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 45/61] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:25 +0800 Message-Id: <20230726040041.26267-45-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b04fdc4-df79-4158-48ec-08db8d8d1a35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g/4ybTHL+30vT9xfcG3rRj4zbkPBTyp6gNOeXhSm7fkUdF3iiQJ4vfTD4ut0mLOFGjgzzq2T1q48LZdpGhOVjV7DWMuls1FqlZX3j2IIMB2pDQh0vsDYg2m81sdEGwnIzViqZl6aGWeBKDMVgo+YMuVCv3SEDV7NJZqzH8/W6PqvYq2wWyAGPgVmLBEjSXHNYtO/p0212+CLAIA0VZ1abb7NkA35bBLosMw7jtml+NHdu0UkKQFg7iNX39Q9p9qZ6WfB7B3cPjttkjJzf1cN2r1NFpbnWYSqd1M6aDn9uJSnlcn8QhLeH6C1IrKwQkkcMPZQHTgr7Fd+IWGsmxNzW9iV8zmZzAL4v+nlYgxJczA84JnThSXKrhj3T18a3pNVRlI7bgnRp1xsT3D2b1IyVenaPbwaNldV368xayuXhHQBg7eoZHZhyA8SQ1D5pn9K8wvUq+w0qPXm54D3zxfXrM9X9cBszk5v3OoPZbwYNDt7th4WN92m//j3stqCYCX1W17q9wKRMl9egyvZ2hr+qocCs1x+uoK+0OOaHc+AYR1ILp/aGamwBAEC2nNJ+gxnftode7pvojT2s1LO+Lb3APYIuewwO5hDFixfXZBTB+tV/ZrN3F34kB+frpejjvfO 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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-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MJUI3h7wGhWdb3hjOkziS/Y?= =?utf-8?q?ju9EQxXhv5rWeUVR9R2CWfUSVRIqEAO0qOi63OCdG8Q1bQfKJ5amDMqrkQ0h3OJHu?= =?utf-8?q?FY9uoU8HSE1ogcptyyAs47ZxP8XHgH8UqLNeMVsDFjCl2fGXBoGi1wfzXSh3OaYO4?= =?utf-8?q?qNgW8CnZPtXIusMYuhYwxqLLmnZYQFPgkRZS83YVwklTQxpKSe38RwsxsVJBTHZOe?= =?utf-8?q?0LBSwk8ezL9JC3m2esCbEOqmup0vTYEhM/X2N6wraVPiTQa32OLKlHyTUAggwtxnR?= =?utf-8?q?BLjODrVAMZMuN/Sso55IkOLy1djAqXHlwGQBG317f7FRiKnITfeS7ravuBO7EguaF?= =?utf-8?q?fnFw9olLMLe9G4aeew7ILnpFB+3Rp5hJqFk5qL+BgH1F0AYRcd+jZiTsOmZI1SsMZ?= =?utf-8?q?9jcB59C8Jr3FTb1OGJ6TgVokmb0Uewi5lTla8GfsZAXWMANJNz0sq9BvigXXMsfiV?= =?utf-8?q?zlpXuWL6WRR0pc87kPajpT3JLA3rveOcCyOEAthgCE65lrDDcxNTaAP2OD4C0JWRa?= =?utf-8?q?5rmEaWK5AfzEms4GpH1DOZmiwxBoPm+PJdPndunRWVihXumu5zvz8ZqD5iKUIbOJ3?= =?utf-8?q?YgU8nlS0G67efXOAOhYe2JksKZ5jUk212nMq5PgGGpZcMuaCnvaeifREVJGlLEnB5?= =?utf-8?q?xaI2D+cDJ/yl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b04fdc4-df79-4158-48ec-08db8d8d1a35 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:02:17.3978 (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: L5c3xuTJzXnGt1jV2tMg2x1YcS4xjF3jRQolXAb4zznYn+jv/I6Yj0cij43gsk996boy1Ua87qN+lpw1DrlE2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772459547029657373 X-GMAIL-MSGID: 1772459547029657373 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 Acked-by: Jesper Nilsson --- drivers/mmc/host/usdhi6rol0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:26 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: 126081 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175863vqo; Tue, 25 Jul 2023 21:49:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlEh5WK1U7vYCJ/hHt+6zRiFohYN2pd0PSscwhrTQsbbim/bkmos/WDAZEIOh9uysB5hxp8e X-Received: by 2002:a17:906:c1:b0:99b:50ea:2f96 with SMTP id 1-20020a17090600c100b0099b50ea2f96mr1250717eji.12.1690346995471; Tue, 25 Jul 2023 21:49:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346995; cv=pass; d=google.com; s=arc-20160816; b=efHrXYAJ9voj3hj9QY7JQ0PYJxVW7FVy6PpSSReyL7MsinN5IS057CWBtbSWJKAo+r 2Ucjjr25ZIS0HW4TbfJWsr70QLIQwXSIdiu54oAhY5RndMzPw+3WgaCEZxKJ69pF/8E/ yr4dsNgHjI0/1Tpgw9Rxpqrp1B+gLiweX6QYEh+Q+OVVs14sLByw2Wt8WvldA4/CTIHt 7wWG03o5bw1byeS8ID2DoPVc5MN4qwLDc/d/YFoS9goqxzj/e7jXPnAzVVzXJZzsiGRV wSRSZnMHuE+eVHIdin61vQAE8aQnB+QOt18Dqup5Ysa3cN5V6vsbJfhb702wM1b0eYWc kuQw== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; fh=/iS3GMUzRg2/LaJKGORKyjWGeAQGYKw/hpkHadSzFUk=; b=LgSun1znFMTFocGNY6qWQ0XvzhIF+2xi7Im59UdCogPopVZnD3jBW0zvbTLBrPqLjw WNljAPiU62RafKUMlXHbRklwLL77c55saIWMtOw7ogKthIsayqMrHa/MaT3KXLURHPT+ 4q0AJoXgPJuaZLnuzqcGhwHu848ObyTM+QFchAeeOAPmx4/QViCn+TOMQ3QaTGhIsP9E pBsVcuB46Oz0/PqhBQoWeqyaRpKrvUFEErinyws+bTVNRTCeoDASEZka4pU3rmOvtruj 8UofpnDBrt1fScLSvHvtx8cxZ5A8EvfdiJ8gGoZSteQmP7jZl3vFS5+A0HICNn3gdKog 2PpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KkeUS5e5; 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 u22-20020a170906655600b00992a83966a8si9551564ejn.83.2023.07.25.21.49.23; Tue, 25 Jul 2023 21:49:55 -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=KkeUS5e5; 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 S231704AbjGZEJN (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231945AbjGZEIP (ORCPT ); Wed, 26 Jul 2023 00:08:15 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC6D5448B; Tue, 25 Jul 2023 21:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdB/XdIWVSEd9JjSHBpH0gLVC+RB2BlmqviEtAuWAlmtPycm5Wwwu29PJpt0/pdxqrcVuK41hmrk96+fJUQYM8svvpkblHIMr5TukGbOWTgBZE9i5f6BG45SnJ9vMCs6xRjYx373SeWwpnMxfI4Rfr2vE/unr1JaxW556JsANHEMUycwmZV9BirXort12imlBB5R3WzlIRtWFMuAheMIvHT7a9AB92LhbZVOXmIrlFQL5zTjMoyY2uCryvFSp3MEtfTMzRCbZrWwiBo2w6f1rRBDIXfds7k5xM4Ra1AaysmBu468LRrfgRjpznTlXQGPU6tXzH9vyLpPY/77wUKYVw== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=GYT+UU9h4q29QXBkznNbqqKc8dPCdB7A5/J8LobsHTrOJSkjkkqhCnvuMiZ09xsUHIA2fJvSHsHToQ0bOKm0ALvrshSFMmDGq4UPZIXXTa7x1wbF4Lj43/DphV+a0bJaj/VX9O0czqoW4jmaAmPQ2xtlvWXzBtfx5glK4eRzsMCSUa5P3drOIQa/KxmTe+bJeDEWW9jduMi9N4+KwXccfIxGOy/lRa7U7tLgkwiUH6XuofFqFmIUV/rj6tok+NdV8Lteg4BbusiHq6loaZDxb+HikBc6BiSClHrSSnloco5oukQ22/1IOLHUN/14t6qepYSGGEaEnGt8llp5bk4ksQ== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=KkeUS5e5t5KO0lbgTwqPUg3E5/iUUqA1rYVvMWQAmvVLFdvd4XxeX4EuigWhvZJDF8ql5LuhxG81oPMhwjpAlrqfaRj3GjJFoMeqWEXkm1OsJy7mxLc+iFCL91DGLfgNnAvHIwWzcsJvsG2PoINA/3Ux7b/CCh28Il5msJXHCU5kkS0u2FynWDapcQ3CdRNXKXle2itf4Nbu1Y7jE4H8uhv+TuTWnfoFwC8pro62jVjMNFEbUMlxd8R8MvIuuSId2k3rFhZH0KK0ZVdCfURfVQq1K90LPS85ifEZb5jItMAVZpHc7qcT0YwNqgY3E9WjBH4911Y77ojgVDAyS8IorQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:30 +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:02:30 +0000 From: Yangtao Li To: Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 46/61] mmc: atmel-mci: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:26 +0800 Message-Id: <20230726040041.26267-46-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 83d037bc-e351-41cb-f384-08db8d8d1b50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nfrcrJ8WAKh5/WhuybRFhX7if7YMlxEHhPny2vXchuBTqEB11hbDDXOGAO8UlbSf0ZRviKkoOdOQZVEGvQjDYl5HkWvqKoOpD7Ah7u7ruu6ECIHzDvBi/sYNF3JbjGYFoM9SizFXX80+gLPE1JoTfjT8zJYafIKOusGvYTNircgEyZLiTWdlSwx0R7aItwOfvPrAGjSefWz4v3CQNFcPYYBI15EeaMhow+LHMFrpQRQfwD0F/lhkx0etLFsdh+jOGvCPuIZNy+sjTh29ss6kmR5jnEt6+Zx5BVN5gkumhK7FbZl9h1znsTCycW+uW4yfChlhAGVlTTBH5AC2V0hp/+0khpBrlsTMFiyA8byI+oiuG3FtG3V+OwQKsdNkBwRe5XcY7tpVmhJbZ6l5dxWvYFDxoReUDkHtdytcReZXUUfxiUFgrBuOHsc1IW/Hf1F+gK+Gf1RFCLiUELL0/HrnnLNd1bXPP/hFgAVni+EY6BWjUsfuy/FbhEXMpgTqwaP/e7VVfYwbfUNUN3uRQuXjh9sUm0fnJzlLMqIrytc9VMYuGlb7CsN21h7NIbsjzc1qibC68yVE4baAce1JVK82wdtu94n6h7qC7uYngbuVMs9JaRk1bXnR4jd91FgChAxK 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?FQZKsbmWlG37WFcJMkYZrggyJWP/?= =?utf-8?q?DNZy3Tc2LKzipuTKzzUdU+/Gmb6fglgjGty9Jc+aKFqrHykbLRt5dUe6ZR2kRndMU?= =?utf-8?q?2kzeMAv5Hepaxxs4XRQhp9QDeuhHC+YXzen3RNIhNRzvTyAbbjd0jhphRdU47QW2V?= =?utf-8?q?o+KwXle3gwsB3oiqzuCswl4hB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uFBpZgjHLbvFHpRSkQmQidx9tN/Jf7/I12vWskpPDkrS?= =?utf-8?q?nPhk8FYUTs4IkcrAU6Ohm9JPei0vkD0Ialdj17p1ijPKjDgxQgk0LfKfogBV6F69J?= =?utf-8?q?/eNDyMwga7X5+Ojh/GQuAuggCWxuoDHK+Uab2cvmKFu+CWSZKdI5gNgxWJ5M4rDv5?= =?utf-8?q?ychqsvXzl2tInwOVS2km9llwSNyfRst/iTp+VaRF5wxxMXp47FTANzw1EL+T+EtRM?= =?utf-8?q?HuLUOWBDl2UhC2b+LPqEYi/uXmfqKEJKqvaX4kSF4tXWL7FDuhfkPRYNvjtmhQoj9?= =?utf-8?q?rIVDYUiurCuM89VL7fxRpGfwGI6wilKufaIFuXNN9qhExRYs6XcSlVCYBH/QB9LAQ?= =?utf-8?q?gKZRImk4hIjIGPjefTgRellzwvQxxTFydvCM7ZemlnYJzBRU4eDzMqztuRRxFYAbF?= =?utf-8?q?toKO6GPeo4d9Styqb+uWiqb7457lXmCEvZCa5r7E8msIhagdpNt45PtiYRznZ9GdT?= =?utf-8?q?+v16TYJDnYoC?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83d037bc-e351-41cb-f384-08db8d8d1b50 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:02:19.4463 (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: z29OMKT9BH6Z32B73HHq4n667wnITKP5sHFDOKyHAv7OVfWKvV1oSkAEGM1ayqnVDKICR3X1/6po63rvJV+FuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772457290946473324 X-GMAIL-MSGID: 1772457290946473324 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 Reviewed-by: Claudiu Beznea --- drivers/mmc/host/atmel-mci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dd18440a90c5..b4ae9aa939a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev) return ret; } -static int atmci_remove(struct platform_device *pdev) +static void atmci_remove(struct platform_device *pdev) { struct atmel_mci *host = platform_get_drvdata(pdev); unsigned int i; @@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = { static struct platform_driver atmci_driver = { .probe = atmci_probe, - .remove = atmci_remove, + .remove_new = atmci_remove, .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:27 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: 126116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp194188vqo; Tue, 25 Jul 2023 22:48:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPN+A103dNwg2ry1Fv9S+3eVnwJNByabEPcsv/+dlhLUgR0gXv6xqh+WA8DCE/rzhl2MKx X-Received: by 2002:a05:6a20:dda4:b0:115:5ed5:34d3 with SMTP id kw36-20020a056a20dda400b001155ed534d3mr792348pzb.20.1690350498504; Tue, 25 Jul 2023 22:48:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350498; cv=pass; d=google.com; s=arc-20160816; b=rSmgVWbuV8kt9dSn4Gq2n4BNEVKUCNfU3gEMbDHvNVrVGMWo9e6EK0SDgl25AJsAtX PKFHB/4+5hhXpyQKzc1iGR09zl0ujJpdueVsn0NTBZVAa4hBermAof9HMNodlyH+DMFa GbyO9SkiLt/hE8o8HfQbPcNDI12fNRc51h5T9JknGx9/mkBWfIjvMMpZAeXRDsqTUO/i LWcRW7gzZC11cNyI073OF3STu1ZBXJXvdanGwcVUBj6+WeVXWGBmuK6zeTU6rdS1NB0S /jMvf8GivnKEMUN2Zk2PytUbKMfEGdVYXXlnR2/xQeK55gXom4+AH+R1Fzn+veBHsc41 Cqew== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; fh=0IxJXeUvkLg4fOfNSZqaLHLueSytlsxbZbmTt4C1D68=; b=liO/hqvQRP/Fcj/nP04Qa9tNbfeF/3iirZhNTOLDpnS/MSdP9CRV5tQ6XpQno00g57 T25hWpnTzExJMx/TH14T4vNptVSdkRBUazLQIESfh6eGJDXJfoy8wguMTA8dJuZmDvCy AM82sfG/lMeeP3PMvpLudeqj6inE7qO38LQ9FluTQhhPS3hgc0HlzzBi/QRojf9y9xe4 LX8m8dbYwtlElNAGYwN6dTQGDo6mXYZYKIunkEDxO/aYKHu0csUlGq0CYsHGjRyqLivX mW/e9Pl1lTM2C8cgM26K8JvYShUx26XLCjUg/SiRQaTrUa8gtSck/Fw3PDu4dlpZUpE1 eNbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X8zy3zNt; 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 f15-20020a056a001acf00b00679cdcafec1si12678788pfv.109.2023.07.25.22.48.05; Tue, 25 Jul 2023 22:48:18 -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=X8zy3zNt; 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 S230003AbjGZEJ3 (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbjGZEIZ (ORCPT ); Wed, 26 Jul 2023 00:08:25 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C30448E; Tue, 25 Jul 2023 21:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4XHDPI1lHO+plL/VmcgemDDo1eAWJAsFIDKYZFeih4dpVpejU5v+LzO1SdacgZkNZ4vQQ8d4DGD/umOZCgtT+UfRFieoEIkhq4ASfhhq2REXEDwDFm8i/V/Fp7nQXQlTLsGyy9y/xNQTLkfA/hB/NOaUCxkI/b8fGyugYqMDJhO5y5oCe3W9tpY2y1dmTKG50KPAKhq1TWU+tcsH05bHPHquDc+8WhgkoE1/iQS2bWGATF8WU1xshLjLFHTKvLly2hF2B71WNSvCJSzC76z74UrtnnXCmrJcf41b2IL3ZyKrWsf24ywGvc0TNJcZ2J95R66BoBsPuX9U/Ziy9pwhw== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=XCp/M99SFUhm2aT2Fpx4vE9avbdVGwAxKnGCzyPNDYeJzQCrqOabFcAXOLrW7pNEF52213f8ehvmnBQCzIerNdBB+q+8U8FZtKYg9M7AonMblPEqyMvHtdkFauzB+GfS4UCcT5Z2QU+Ulx9e2Pgnkef0ZDbNz5pN1v4VCy9DmxpHVeA7Up/p45uYA+b+IAmJQiKpQYEuNh+5lcdbO/+ZhRZfgj/el1P1vP7ewnGU9IXC/V7zm1Sk95HkVA0Cm4xy02V4Pq43zfwACIXGCrkYDjcON3u9evDI+/EKKKtDdQuq8bl6+IzvaLRU+ZIT700qDqPT2S50T9h8pGCWNuEOog== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=X8zy3zNtoFEIPoyvS+JTVGircL8d45et4Ip4b6WnSc/exjicFvT3bofyGESVII5jhtNlymePgb1nwKScqYYm/mJyN2vYvsgsZq+dOi0v4q3I/h9IRlS+XEKY1/cuu9nGdI40uERkPMriLX3c/kyAntj6BVYqV4cv6+Ov6wsEs8YhVdZpWn6Yzc0RAWE9DU0bzBzLrBpPJVESJyDErCFQfRfYcDFbV6FzI+vTiYR3tLtCo4sK7RfmcQcBFtz53R+mj8Zs4orL5CjSauZCoiR2OoH8DKCFuXOuRixFlInZeZQFQAV0DoUip7hds+NHiv5TlgnsOGEED/uVUfUIgHTADA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:31 +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:02:31 +0000 From: Yangtao Li To: Patrice Chotard , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 47/61] mmc: sdhci-st: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:27 +0800 Message-Id: <20230726040041.26267-47-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: a9eb9e51-28ae-4395-4ad1-08db8d8d1c9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4KOa4FuVgukNi4sySAOxPdfLBvTLVrsSwfKYb4ParvQItOXQfzORcPfINP5+st5T6/I1uPCVReqozM8rb1gJBgQmxINt/WPWtKVVIgqRvX/NiUX3DSaggjfoA7rs/n9JuTWzErJa/mdOSRxKBb5vDywhiLFm1zTdBMbm6rDllfFjmadVsEGUJKwQ5y9hcQPGOir/zYtx889EOnZIc7v++NpumTBOz8T1IpsHwXqRDIqF5+b/JVSUtGDKgRaetwsVKMbvlHrOz0WFedGb2pWUWYS/FawZn8VtxXw1FQh8CNdjpvsnFc6f9odKmXOZw/iBnLyr5k6axlGyMba0cT+4kJpeEVW5sTzGO4avWmwX3xMVBlE7fhe94PTZ0NEKSBlXnAeS1yg79loda6SG1KDQlYLZSxrOW6ULZyqUBl66JK72BmtQparEodzLAKlOpJuhraY7xgVrUrgYqthy78pe8fNkMI9dqBDNfA7vGynMNEStcmTsWQd7awHE91L3Q326G4/vZmGAV71nGwZseo26Ecouwt6uCT5gH+fLR7rRzvmb4vNCJiZEYfI3nX6NO3l2h/gV9kAT363GJS1K+q/mR5FCVR/CshE9HRJb8xY8tW2IUMpvWdRnKcsbn1o2NigG 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?Si1w1PPOtvmAtr91fPyPR2KLq4g2?= =?utf-8?q?eUc11ZMOP51QXjteBt71NkHRpgd6OInKaG14uR0JBQmol0X5Ha0N1Mzh9AylLyPaG?= =?utf-8?q?Xfz+POrmSCDHiVmhzMUurLsn1PEQ+UOruHEo+vEiPvsPbhbmhodyqz8GieOWNLU+P?= =?utf-8?q?8DvcD6/6GdPo3yOJQzJ39c9K0Rxuu5KfIElM6CbkVpDD2FKTsj2+tzAjWymcmj5tc?= =?utf-8?q?q8g7PuyayUe84Dp6WrRGWFKvrNQgu9rpda9kWlYfUhlERbJmiExxkA4dPVENaCAsQ?= =?utf-8?q?H4xsK4NN5rU8IPez+khc++xPha/f5h50fkvkf4aD16wgtwzwLTAab8/E1kk4LBaIY?= =?utf-8?q?UTrvTbF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bY357GfpZaSe8pMkyaPl89R1NuQ8ENsmwKhhAmhC?= =?utf-8?q?C+SsUKU3aNbM9fC68/EPzR7whicuFx73sZKdVu5g7p73hLM2pJqEi4IQSLmlSrSVn?= =?utf-8?q?fK7dC9HrmNhMDBK1M4xG532HIVnBsuDIHUII74a+jT0MeQWMjZsYqdbZNBlKuM/c9?= =?utf-8?q?I7c6ecEJF/Zvj0NEA8aWlCFFJWfJlUxTGntzmxrMRPcnE0EwpW1jwr1R7kfjtmQuC?= =?utf-8?q?qqlwRRxAUCtiXsvlS5rNV9aLnZKnnlzG83Ve9SQ4fjefLtPqXvRr7nsWJpBT45zS6?= =?utf-8?q?iTHwlkIU/hKH?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9eb9e51-28ae-4395-4ad1-08db8d8d1c9c 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:02:21.4588 (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: XUR2cmGN+Go73rY3Xn5lUxneYW8DTNS118ZrBg+kHsgDmpZms78CEVIYAvNoVlnEKn0wd8mImY0+ahLi8lM08w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772460964110050255 X-GMAIL-MSGID: 1772460964110050255 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/sdhci-st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 6415916fbd91..d955b5f4b7e9 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -434,7 +434,7 @@ static int sdhci_st_probe(struct platform_device *pdev) return ret; } -static int sdhci_st_remove(struct platform_device *pdev) +static void sdhci_st_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -446,8 +446,6 @@ static int sdhci_st_remove(struct platform_device *pdev) clk_disable_unprepare(pdata->icnclk); reset_control_assert(rstc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -510,7 +508,7 @@ MODULE_DEVICE_TABLE(of, st_sdhci_match); static struct platform_driver sdhci_st_driver = { .probe = sdhci_st_probe, - .remove = sdhci_st_remove, + .remove_new = sdhci_st_remove, .driver = { .name = "sdhci-st", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:28 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: 126101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp184121vqo; Tue, 25 Jul 2023 22:15:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlG37UYUi6gDdkKb8lpDodoNTD1GQIpRkFYAJvVsE8I0Msy6rAmbL47Dvvq2FLhiSv8zSBpQ X-Received: by 2002:a05:6a20:3d81:b0:f0:50c4:4c43 with SMTP id s1-20020a056a203d8100b000f050c44c43mr1387051pzi.5.1690348521801; Tue, 25 Jul 2023 22:15:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348521; cv=pass; d=google.com; s=arc-20160816; b=XS7YgsubUzjElWqcuKHyCxauNg+KZ9My/1LkOo68KmvI21aO6uKhQ4uARAIYXPr7EZ 8FeEhbPM+NnHlxQscQBm/YJkj9olc7g7VhuAQE02YKr6AiBLCaJIhQaoKCTOk9f7LRy8 y5qwMvLlzjiapqvQ2GHED04csM9XV9huhwbykqIHhn08uE8oqyReAzRBENIgXX4WEatY w5ylaT6+i4Z0+GSBKo7Gp2CNbekmjVjgoNiQ3ooR4kgGhVoSJBZLfHTARDW7aQd9bxjK 2oOJKO9IvdJRjjUBXhYR6shvJp3dKSwGB4I/uP0HaZUtZg8dfAUF4zz8zwczESv2QPdm 0FOA== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; fh=VgrQwm1O7S562Nu0EHXj1yIoeXgypBRfDN0sIz9nJ0s=; b=b1glaJmhinQZTKZrFmlSqG1OQvUXgUJ4mtHEl+7sZ/cDm3xd6KaHVjsIpBZAVQiPY/ QQNeeUWIMKiyEN+ORFz0/kXWjJKJz3Z64CMblpwbOFUDSQKpFVImDn/rutTHcVx2Xkdy fM4V6uRRVDJpzSZjzBmg5b2qRExhFWUvPCKtm+SeSzGMsNDLs/KZxocuF1SrJGxjjMmW m2LwayZ6Vu7yu8ER0I+UJB3uDkTtnxSvPU+YWNgYoBEtnYQCP1SMmlQsqdXKUUGSJOhM wHSVBOcPOwqrZp4171x5QH8gZN3yZZPKOseK3QikC+iIxtV54WKa4sNxsIXNqCf0Chm9 +i5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ddaY1C6U; 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 i190-20020a6387c7000000b0055c4c9cc016si12322842pge.598.2023.07.25.22.15.08; Tue, 25 Jul 2023 22:15:21 -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=ddaY1C6U; 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 S231340AbjGZEJk (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbjGZEIx (ORCPT ); Wed, 26 Jul 2023 00:08:53 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::705]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B84B4EF6; Tue, 25 Jul 2023 21:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cFczwi2hXSXjs+rMzgVVPcrTnyWzZx4LX/rX7K0BC7sgEGmnyzpjAXa4G/DxLo8H3jrzci8GKt3x0tyfEsuZPjM9GiBNHsWdGQtSJ8bUgLDAdnzIL2lkM7gJ6Lvhdn8PplqEZXd0v8Xoznkem4mHu3dYFwsw9b4PEx+D7T+knxzeHzOBEzb79stIv9krZ4X7cpgOAMTHurvnq+s8ZKAdhb/Q9TRHTq+nPEa4mY5xJliUiuzYVNrgdZtVz3DDrFCNIoRMBSe2IKZ39wpYONENP3VfjH8o3knjKHPUX0XILfhbq2UCQKaf/7Iay5zVnPMjUBdKX1NpcXaPihRJZb/mJw== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=lATzebIU8ItjI+ErwlKOEoaT0RhJdGIyyZN12hXevqmvSd9+Iu3yFaTFc3IRFB/LOX6eOzAjP4vt6G38zLwqufsIunpORisGDWbcL+X9RmwiYgDtupADzFRtOyxoZrpzgIPO+oAdz59Ay7KEui5MgO0ivW+VSv5wa8ems4NlVbxvawI82CCGUCvchgShD6qEaab3RPs+9XUdWyYYmQsHWuZ0Nw5V/H/5lJ1VchKUEONGpK2JkKE3rxDWgEJhBRi4l5vkkKt5KucIQa3/N/RpjzfjFbqA/+X+kB77qkLey1aODfI1V6mr9PGs3Y5Rn79+5cWKBNWQ4vycnjTiF5rkkw== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=ddaY1C6UIn498SOzE5CllYImmyx8vRMeXj/uJa3qdxlsc+pIKEl6+w1cjI75yw84OGj0Djxuxq8VYUEDg59jLJ+tyQm6VjE9olef+LEAV3NgOriwl4u0dALEfSm7jjOZWwmufzdAfMJ9QL8R3w/maApbV/KZfphMLUmAe4MH08dVimPoS+75qSAwiY751bAUz7Wwo1NWM1QjZ693p/tfZLjE4hRWOX5pafB7aFBNktGGyLWyYACGQL/m+1mwl32t2NMK6bRtBz/zE8lKuP2UUnEZGUdC9Nhm0cFWLeLr5EXbKZbCaQQUaSnp96RJSyYcXmfxumLlI8OiwRerARy9+Q== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:31 +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:02:31 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 48/61] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:28 +0800 Message-Id: <20230726040041.26267-48-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a69c92f-754c-4bdd-98f0-08db8d8d1d77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZXHKmj/OkYoyXka9ehtZHrKrXvH4yi940OABB8SjRPatnHFPCglL5I1cFMpNlwhg6Ds9865QlbozMz2O6CfWbmW6C6pWpYnd2V3MYL7Fm2IJ4NzWGSUoRx6Pkb+x6jvOBprDVXRZFRisM7AWWJqcrv8YOfG/7svqs7+EvUVNiCtr6BOs9rF1ptBNbAxPWzvo/J9z3eyBTiTqVREkaY1r3Xpt6+Q5aCuwsx1ZH2OyO/HRetyK+zTVad+dgoil4hGCnfp7BaHmW99PDByJjYB7iuqeKIs8GlJDXCa3zY3eFAhqGIqeYPoOllxhdSqaP5bmFiHme5x+CuxqXonJneuHuXSByvav+gqt1+fooekiqi+V3oN7CJxQdRrfFrEuGruvMiYnHhE1ArlyQLz1jdzlgoa966SbgtYTo2SVhtXJdwmzTQ7OU8shvzhEFu5zZXz2akMcZSS6WoI0YtgrV3gCRVsdWaHFN2mxI8u62C9mjCv00F79DvU4hUUItd3zVDboWiNRdPy7H6X5xnLl+XBfAVgWhTASK/jVnD52FHyO6KljrQ+ho3t6yBGlJc4DAfS0856UUIX1aNsNM8gVZRj2JcyNzLfFCX2lobxt4kDN9vKgofkyXMyimBLPIE37evuN 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?dP4t3ScUJA274XeorzaP7ajdfu9F?= =?utf-8?q?A0KGMtIAB8TV/cE8i0xfmkCuuCuwANc8vJsilQiJlmzgf5Ogf/8pkRc8HcNPtf2N2?= =?utf-8?q?lMvD7gvK0bIJFf3gGQtzdE9DJmNWnZr/ss6zX5YlPu2kadXkC1RsnVsJwN8YzfQwc?= =?utf-8?q?eKwdzjH6daMfeM3XzZAfYApsmWj2OBbLX3ZTrYr6T+kEu4FaYOLMHmS+CeJgbx+3z?= =?utf-8?q?P2rFLrJCnlKR5oA1HfmqNRlmqYXQTrTuY7wTVOJAbNW8cm6g5cd2ivbOteZ6klbRj?= =?utf-8?q?RByYnQW7/4zX4PhvJkKBkRFjW3YzHBRN+m/0S/6rCFmOSeZUFuzo9HZSTrSNCiAlV?= =?utf-8?q?lZwj4ctIRntKY4Nl3MNd8RLnlW1NeyOTAse6Sf3Fw1i6lQewgk5mQ6kOanuJngS0F?= =?utf-8?q?zNguUP68zBkjEy9hS7NYLhwPbmJLZpFkkN3VdouUitruPWiJVK1BMcoSdbeBkKgwQ?= =?utf-8?q?iIqFsq2MGVmJWFx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8wzPBvdFX2J9La6Vd8JAF8V44EhekcYsMvOEawBiFu6dF/Ei?= =?utf-8?q?kLujSLj6jqpSFtd2OAvN+p+TFXu2AVvXH0OgfpWs6c9copyS4KEugqu8WMuRRIXq9?= =?utf-8?q?202hD3h3SPPDO6of9alBTZbEBP3w3AH4VBeCnlpEHBafHfcZnAWdiqtn/bEY/H+8s?= =?utf-8?q?mdmzcbeRtSwh?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a69c92f-754c-4bdd-98f0-08db8d8d1d77 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:02:22.8711 (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: gtSrqdFUbkdTYblJzN/k/BU0MrYutxZZSUNxbb3IS7lpnwFYJZOzjzsI3fY5pTEH358LAKjrW2rYQMfgK9glwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458891343504156 X-GMAIL-MSGID: 1772458891343504156 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/wmt-sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 68525d900046..74c475d071b7 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev) return ret; } -static int wmt_mci_remove(struct platform_device *pdev) +static void wmt_mci_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct wmt_mci_priv *priv; @@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev) mmc_free_host(mmc); dev_info(&pdev->dev, "WMT MCI device removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = { static struct platform_driver wmt_mci_driver = { .probe = wmt_mci_probe, - .remove = wmt_mci_remove, + .remove_new = wmt_mci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:29 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: 126096 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp181836vqo; Tue, 25 Jul 2023 22:08:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlGnLrvSjKppuGvpx/93JM9ulWENF2ZCugXr4aaPRFa2GH7t7XGiRPZ3ee47IldMi3eAdmhG X-Received: by 2002:a17:90b:33d2:b0:267:ee02:4563 with SMTP id lk18-20020a17090b33d200b00267ee024563mr1143019pjb.26.1690348098945; Tue, 25 Jul 2023 22:08:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348098; cv=pass; d=google.com; s=arc-20160816; b=kzYweTlNamm0sLtrHSKdNBp3uAue37pJoWjJqfOpdqLzTqfjZ8+NV27pZPnqhA8qqs zb9I3f+2RxxTXmj5RyadfWEZunUJn1xZI/Ph7wEohf9Gp/qjAuwx/3paX1eYChi2hMDT V2lD5Io+5qyL9tsgnZafuY3ShSWMPNw7lIoIb9Wkfv8IrDAYoftBEiRltRZ4o0d7h1o0 NmtWNi6u6NMv73/3jzuk1eTwKi7tXKFhslBEE2Azc6eoi4CN0/lS4Wzpy8P8HPjkIM7f MLHfHOOnn/DJkyjYYGUBAKTqNmIzgOE1EVN5EZUJEcC0fJ+YdXxJsuDcqqTb9MBOnP7y PfeA== 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=VT7qOQ62I2XJCm8fWlnztBkYfBsGaUpc/87KVtpwDDE=; fh=M8OwPB4xxHq8UKL6c3Cis5twdEf52Lh9rLE4k56F3W0=; b=YLxZrEx76nvRrQiGma3OtaD9+YBDl4SfgDpFKM4fpXPAIrRJSKppktBsD6Ae0tMvJA dmLoWxMSCWuEFrwOAr7FM4xsV+fB4IhxJDVtEL4E0uVbRNeBkv0osMwhYMl9DAPMTcbR vQYuC1SYbvg1iR/Lb8/k5jfpAOkax0lUC3v+SpphdyleFpTLpbvCmzFMzzXTJjQZ9wBg nEm4WqopNYxXQO8stEtxRlvuqlg+QGZ9XFP+7Md3n+SweufM3DUADBFMKkSqnlBPECny 3nncdGAWZl9Xi56DoHY0aNsEXsLRD0OIezy28QORsAIHML12pQ+KEb0iHbBTOrsfmlZn Ohhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AjLoFDB9; 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 f23-20020a17090ace1700b00262fe4585f3si538438pju.150.2023.07.25.22.08.06; Tue, 25 Jul 2023 22:08:18 -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=AjLoFDB9; 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 S231697AbjGZEJz (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbjGZEJL (ORCPT ); Wed, 26 Jul 2023 00:09:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E49055253; Tue, 25 Jul 2023 21:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L0743ghStL1fhL0oYcZkD2DecqPTFbAyV+j7JKpoto09YzIAtB9qHRBwAf8YDbH8AHhVR6BlvssG3YSK+O33tWO7FHAvrjkuxhzg/3TC077OmFK2L72mqov7TzUMwzzvU96+uycwGuS1967rHF9RKNgZ/fH1qB77bPEKiMRBUqbBxREWJ3ZUiUU3aAAVeGqnVts829mOELNA2k7S8WY13tZnNkKPmkZJDcMHnS3XLAgNWmId1DMKJ4SN8cRw4W9yCg+aIbRC/bbapRcIA/hfqEIx0JMuS0xbZeZ/q5Fdqmko88mHqS+MuprLd7utQKjm4xqzOMMglEJtwKmplVpmrA== 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=VT7qOQ62I2XJCm8fWlnztBkYfBsGaUpc/87KVtpwDDE=; b=Eib3BMpdi7j3AHhVkZ+1Oxl2qQGS11DeqOanpTtotzbg9dx5s45p9r5vExddV7MrmtjJffHhZYoAKn+D60BGFxGIa50p08t1hDoE9aNnN7XAVBvQNvxUB93omRX5GN51AoBcOEyuYChlFKa8KkJD3N6xChpeuv6HIPmBKTUH2DKITl0S4Xvd3/Oi30Z5M0A9yHTim+U6eLX4UxLiifpbpIdXr/nLhTB99ObM/hNL0J0ZHAmM5MzpQ8ZKlyRop0oRvAUfiX4Brvqw56cT7i6P4n42Kf3lsBJ5phxFSSZiKu+h8IKjiuieQnBaAtXm0QvW+//VUUNzDGKfeiUycc2IrQ== 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=VT7qOQ62I2XJCm8fWlnztBkYfBsGaUpc/87KVtpwDDE=; b=AjLoFDB9aFbTu9vqm3L7g0XZRXzKGaAdDoiwYQTl0QzohKaR074OhoGWQJOFSQg4N5xJf9WrsIOwJGl8slZEzsIAR18n5cW5mVfeGqoFns6PEtz6Mo02EQG/vwkQXwdeL53SSVZ1xh0z7WWa9r34ydsJhMKhSEbJ5DibmGANkf6JG+ji6bbnynIgUPYG4M3m+BcQTi0MiaW+B0sj8tsCNkGYltmMoF1Y6pVnHxMllQgUK+yclkpujpU2Yb4yJifuDN2cMWc8RReJxzUIOQwduhVHtN7dCL7/q20DGzm0Fc9Qvy7bX1jJ4pihJSyKfgwZxKNVw3DTgGyYkEpKyFH2PA== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:32 +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:02:32 +0000 From: Yangtao Li To: Adrian Hunter , Angelo Dureghello , 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 49/61] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:29 +0800 Message-Id: <20230726040041.26267-49-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: c9890010-9db0-4489-4369-08db8d8d1e93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r1IW+v+vJdTiPZfDeONYNb2raq80F0cq3HQsmjP3DpCfSAfgp5Pqv9PRwECZ6C4LdQTxbcfWXcDGEp3gt85SdnoXMq5tFqLiamxHsw4zz2afVYfDuG7lKHhKKmMu/Ly2VXLqsdNOsnYyHXBEXrS73EQy6h+VcXwn+7d1XvOmKZ6zr7Or8x7wlk79NGoUt+VfP8OahTaFaKOI6WmJhOGrKN9b33l5Nto6SuDX/kqLxF5nJrjfw9eB7R6Er3lvfublZTU/doWpnT5WqTthuzoG+46Mc/pg1IHMQT0CPYIsBjQXsYyZA07IooJRwKNYU6rf1o8zCwxIQf7A7lrCANA4dup9RMmOyYY7+BkQcMcHqbwP19Con+X9T8LJY2mgETRnZrrPdCgM996B8jazI3ELO9jx6Ld9zILsXTV943k/9rIgMfNeew8uFvC/4Z7GMSPo5jwyzyXuEXeYKm4Xc7+AFsWGb5F2q9pYNWuHKoK3FEJtOMUvq0VQpYg2V4hDkydXlfi6hiVPs5WF9WQNnKXc/09JL+0A7H3oDMCLrv8sSHLQ8dezg8qscAPqODWL4QdYqv/jUdByoL71t/kr4Y265oXSz+ErtWzBN0XuIB38dndn0jy9lABLIllXYyBeUQo4 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?NioL4kPb+WmvegL9HDhfvvXMS8/H?= =?utf-8?q?Jz1ADk0SgURVC35fWsfC7pLNMgB3qRfXBGCtOusy8scqlx4sFWsl7NFTIQZRt+7A5?= =?utf-8?q?tgDykyQAbWGS7+decsMfhakKNsEvKhi+falE1RBpAXmJ71wuTgbe9c4lgP3/TUOiZ?= =?utf-8?q?sF1fDQnB3m+/MNa68QNNBD4i8OH3f7z+dnbGQaesA6+Vimooh6h+jajYOh65arXEA?= =?utf-8?q?2ZLocK6c7/nDiavBfW2WQiyqS9n0+Aui3S5BybHQhj6w+Ot4pNyWNrAKKTidunkDA?= =?utf-8?q?laqHFJLFA2/KBhLKkX0ZNDDsi6kHXQBd4vbwPaRbWQT6eB3Y5GRBkv4F4supxpaWj?= =?utf-8?q?IX4Ae00lypvW3FpA6s45FegeqgaBlEzdN3a023O4HweVsSK9ZCuu9hLYiPFQRGyyU?= =?utf-8?q?QShRxbKABy86z6FxfebC1qYRIWOBLGoY+Uhbp2BIRW24dABvSa7rCpG+B5y7mI+p7?= =?utf-8?q?WURYpmREgtUbK5+ZWkDaNbSOtmehrNjMEP0jOY1TfNYIyIUS8wHwz1i/v4GY834gq?= =?utf-8?q?YBVAtGMyI0nutpijVP5hm8LduX+bct3M337+d0ckU5dgp13/JfqzGcnFdSXtAmQWK?= =?utf-8?q?ls32xQ4blO2+CUnzDab4rsmyl5CytvWZZ+ErUrPY22G+HtQdFBwxO2CmlELMUHu/H?= =?utf-8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zkaezaOWYmi?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9890010-9db0-4489-4369-08db8d8d1e93 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:02:24.6947 (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: 2e6/KT1yLzCuutA7LTshaDm6CJd7CQMXvjbkehI05pG/DvMqSoAvaGyZ9yeZ/uI3msAxpWwltp2FhVhQFFMRPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458447997390568 X-GMAIL-MSGID: 1772458447997390568 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 Acked-by: Angelo Dureghello Acked-by: Angelo Dureghello --- drivers/mmc/host/sdhci-esdhc-mcf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-esdhc-mcf.c index 05926bf5ecf9..a07f8333cd6b 100644 --- a/drivers/mmc/host/sdhci-esdhc-mcf.c +++ b/drivers/mmc/host/sdhci-esdhc-mcf.c @@ -489,7 +489,7 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) +static void sdhci_esdhc_mcf_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -502,8 +502,6 @@ static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) clk_disable_unprepare(mcf_data->clk_per); sdhci_pltfm_free(pdev); - - return 0; } static struct platform_driver sdhci_esdhc_mcf_driver = { @@ -512,7 +510,7 @@ static struct platform_driver sdhci_esdhc_mcf_driver = { .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sdhci_esdhc_mcf_probe, - .remove = sdhci_esdhc_mcf_remove, + .remove_new = sdhci_esdhc_mcf_remove, }; module_platform_driver(sdhci_esdhc_mcf_driver); From patchwork Wed Jul 26 04:00:30 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: 126097 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp182843vqo; Tue, 25 Jul 2023 22:11:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGKn4dOfnvSiIukTsL4Fw9xl1qQP+aBXzBGTU24HQWCxurl/I441raLv3yFXxdM9+Qg1XkF X-Received: by 2002:a05:6358:918e:b0:134:e4fe:e162 with SMTP id j14-20020a056358918e00b00134e4fee162mr910284rwa.13.1690348285171; Tue, 25 Jul 2023 22:11:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690348285; cv=pass; d=google.com; s=arc-20160816; b=nG9Xl2ReFIOz5pAAbDTs22yvv8SYMczGSaLDpcqp/qH6lRk1A9QcJwucH+5gmpEMaY PBQcY8H8p2F/y07NClcPuBh7awsvNDucVEg+dS3aYBmQZxBw6kbxfFlFKmHAQ3PTRRrQ YSjAJ6PQE36Eq17fMy9jzbKiygvq6VzB45lLnCZyFjhPWhdBrQOj0jVD3rNdiLenqZYZ yi+vqAw6YitPACc6nh188Uvw+bqSFIcQRsSdgWzOCnV4a98AG4fKPnvDaffd+CZFgie/ VFGqfo+YsX+tdXraTPcYQBC/Q3QcnCUCef/5nOmrOngOoKIw9xm1YWf0gNSi6/wL3SQ0 QVpA== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; fh=DltQIqE9+pGXrPR5WLFAdWiPosppoWjSKQ/zZl2z5K8=; b=NVNTmBYtVp1bdhUEL1qrdhXNK9vbWU+CVKZ51vn8Bvi8S5ASaWG1sY26lgiYCYBEPZ 1YZcO6LrwKArKPuy4abrUIXB6kCZjaaSKym93BGOQhgpyQQL11IJQAEb4dAPlgllsBab VLF+6HKLYf9R/av1VUdVJt3Gk18fOp6tfzjRKdZBNUNPpeXm5ajLDNvXypt0CedgW0Lr D6wQS68h09MKMJ1xZZP8a56T3u1Mv+GoaweKUZY1V6RXsslAajEhZJUzzmleDz9eDNun uJZeEidmnoYNDOrSxIGuMom/SKNPs7AEL2vpJSSpbZlTNY7w/z3P0oZ/2aHkWB+6Sn1V qANg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=m2NgVrAQ; 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 i190-20020a6387c7000000b0055c4c9cc016si12322842pge.598.2023.07.25.22.11.12; Tue, 25 Jul 2023 22:11:25 -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=m2NgVrAQ; 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 S230140AbjGZEJ7 (ORCPT + 99 others); Wed, 26 Jul 2023 00:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231747AbjGZEJP (ORCPT ); Wed, 26 Jul 2023 00:09:15 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::70b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339A75262; Tue, 25 Jul 2023 21:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NA+hdyhg/a8cDbkVoRjN2zHpyilkXQ5efhPfKk76v2fd7OZZ2ku8VUFvLgeoz++ZwVB3LSueV7as172CvmGRwVzGUtlCMMDylrhOwMWsIrSZ6WHH2RYsF8u3LV90oztkRagbHN+9rNqJYHdtsBIB88UD7pRflgrfUw6ihshSYYGrqxEiGCSuKUlPuKgUyDzPfPh4hKFd4MyRiJWUWbYYRiNGGEltxTsqfLpCivoGWivl41FAZJ5pD6nNqElc2y/JGYJin57oopolEx5Xv6qfbxA+9fuy0nl4SBVqBFtg7SVSeRCKDcutIZmFA9yt9Fcj/IQqVkVwfyjTEIGByne1zA== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; b=aQpA2g8jUjsdR+XeLlcHbwGCnzy6uvCGrudt9kFFrqLC9a9ktjA128MqyofEfnXg8/t8GEtF83OOSMgE17dQ5afqVUT6Oa8eZIviBjj7h0ti6SoM4i2Jv0sMaA22IGuO8xn9+vt9U/2mKIwiZ6+YAyMaQGV2srhiXWfVO8nc6b+6Q7Sw5IQLfCQbI44DCXeDYgYJaWQSZlWFnrmEnyc7gcl1UPJ+LSVyJDpiKNsv2+bNxAy27TgV+GrgG0GUlGRgLhlLYIPPQwUahsyh10+LyCAK2sxPrIbmaxvrSXdXLmYSkzRZVifYGr9TsVF5WNDsAM4/7l70Vcp/6ED7QrAlGw== 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=FXZpNO+3dmb0lnQ8WXsQM3rNh0ZF61gf7J5F6UfMTHc=; b=m2NgVrAQrCpDuo26SIUaSbLqhvPV2ohQy2ngiS04+/Jazw3Qs9S3ddfrI6sIMIphQUoyM1Njjg3th+jtDk/F5BOvDZrk62zSYaejzNpZT2r0um72g+9jo7cZn8xH9Ctv0FCwMDDv+upcV3i6PamGvF6d8yl0FGCpLd9ye9uQKOBVj5C5Xar1L0DhZ1uV/aLYJbxlxGDotxfT80xTxoEeJTX9fvhEltO3gTDgYd7hxSnZOUPUbmC8ksIAch3aFQwIHtbfwa/jMen90KveCOoDxvnlNxoS6vjogZGpwsSIAUenZXPFpkG8B+fKQwh13QrIkvKeXdi2yosK5QLyzPwmWQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:33 +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:02:33 +0000 From: Yangtao Li To: Tony Huang , Li-hao Kuo , 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 50/61] mmc: sunplus-mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:30 +0800 Message-Id: <20230726040041.26267-50-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c8fb908-75a9-4a3f-def0-08db8d8d1f7c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mq4kNcY2Rabcmy5l1Yq9e7TQHsknvBsbZ4vKFDkQKv8xRYW/Qf04i9t96TpVabXWYGpg+h3cAXC7x8i4MK+LYnLXC+B4HDmPDpIe/W0txQ+HPBydz69RwZWzrEXcqqMCoKI9T+J76aZocljIa1bGBqgB7KhuxDj+woh0bgJ1Z8B7/hxMQPO1sXP9qDQi14BR1SR9cogL0wSMzQIcW5S3JlL9QMYe8pLUAUk36znffJd0ht/vHlEHkOnEEFA+u+PYM3olwmZAZcpcs0Z0qvhwd7Pvyv7Uyyllnn90ef9nxK+m2Pm7yA3M8aWhI20DlnO1Ra0s4KDk72sQXYfocE4qJcsQtcoJ6PTQJWt7YSB4lIegPFhEevv9TN4+CD8dUZGokCFmSj32YDLMM3uYisuMz/hfgRhZIB8sYK6p8d2qsdL9gP9v51xjd4UriVZvT2A+7XG9J4AYQI4bDjXMdwgeFn5vf3x+U0LfAo9g5ZDSThmL8TqrHUF3ZoD1YhNIqNdGtLT2eaNccWJ4CAJxCd192D/GbzItUWcW6bhjMjbI9cC0s89weOewNBHGKUjLE998hj8jCnBrUunaycb54RvjgbPGMTQ+/aQ44LSqg8CXikcCbhOw9Fyb4abuBAZs7gmq 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?WdG0vYn5qspkFBRo7iWjoUqEtek8?= =?utf-8?q?kvC79MennWMJ2/+KffNYtb5rFUHjAL6u0eCcoj827bB1ifTsY67zI/CwxMYvuv7yM?= =?utf-8?q?bGT8R+I3r1G71M89q85kE0IIUR0CPPcjysy96VsOakRPMI0dcCdh7xRrFWPN+a8Zw?= =?utf-8?q?d/036WCjvGgaXyDz0WwzPbjB5BfJQUn1qgg5z7yXWYtO8uyqW1v9hMnj4uEgzAnxx?= =?utf-8?q?oQdwXC3ieeSNY4KwszIkwdlc8o72NHdiCbJemW2Dkr3tkrjfJwOPDpIzgJv7j1QAk?= =?utf-8?q?p2z2UhRXIlSceRKOj0F2OzqRaiDsVRYl+vqQAUdq91H8M6h+1hpcEjjVLw/RV+Iy9?= =?utf-8?q?51J3kbS5VAcF9pb7buZvPEjAFgWSPK8z0EEmnAd0WDzSKNz5894JUJK2dCK5PVoHv?= =?utf-8?q?WJmheyM5Lo/ZMkLbxbr53kJybUBg1UTJvT5nPzSwl+aL+9Q8iT8diRjzU9GFsX1u7?= =?utf-8?q?NclbeymHYWGVdzRxI9O1ScRueUt5owzxE63V1ZfM2gCH0Whr9xumFM+fd4fDC+aay?= =?utf-8?q?f8SwTgkORUdvIoSu0eH9FrVZlNg6FeFM+CwaLgupS2ih489G77Iucudktx3n7AGS9?= =?utf-8?q?pplqste5GgzJfZwLUfVE5lRkZJtjCsnQtzY+QSUWZYBJ3JUn5UGYtz1K1v5HhOsCk?= =?utf-8?q?pZ3/4qRXyGHD23xmVq1TiNtqi2XGEZA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.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c8fb908-75a9-4a3f-def0-08db8d8d1f7c 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:02:26.2732 (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: FwTZ3mOQxBRNs57HVc/fR+IeonEKqRb1IH44AvwbUQ/m+wbgCCbiF9I80iwE9RLF4oswvYyGqj6zYiekhvtufQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458643634948965 X-GMAIL-MSGID: 1772458643634948965 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/sunplus-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c index a55a87f64d2a..2f30a683a17f 100644 --- a/drivers/mmc/host/sunplus-mmc.c +++ b/drivers/mmc/host/sunplus-mmc.c @@ -946,7 +946,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) return ret; } -static int spmmc_drv_remove(struct platform_device *dev) +static void spmmc_drv_remove(struct platform_device *dev) { struct spmmc_host *host = platform_get_drvdata(dev); @@ -957,8 +957,6 @@ static int spmmc_drv_remove(struct platform_device *dev) pm_runtime_disable(&dev->dev); platform_set_drvdata(dev, NULL); mmc_free_host(host->mmc); - - return 0; } static int spmmc_pm_runtime_suspend(struct device *dev) @@ -993,7 +991,7 @@ MODULE_DEVICE_TABLE(of, spmmc_of_table); static struct platform_driver spmmc_driver = { .probe = spmmc_drv_probe, - .remove = spmmc_drv_remove, + .remove_new = spmmc_drv_remove, .driver = { .name = "spmmc", .pm = pm_ptr(&spmmc_pm_ops), From patchwork Wed Jul 26 04: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: 126089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp178568vqo; Tue, 25 Jul 2023 21:59:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaIrXc5X5uC2ZOPpPacV7bQSJ0nHkZmVjaxqzPtxqo1DL5uC230WKGW1pfADcac20rjEAK X-Received: by 2002:a17:906:3ca1:b0:973:fd02:a41f with SMTP id b1-20020a1709063ca100b00973fd02a41fmr664327ejh.40.1690347595068; Tue, 25 Jul 2023 21:59:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347595; cv=pass; d=google.com; s=arc-20160816; b=r3TiByVf5OSOkj3A93hf+jfKZ6qyfyLRvzBfmpZDPXwgxRsywPNkUv0otXAJExgk3m kCRXr0zzr5RchzxcqmCrLl6ceFhfU5w/YK4qZveXgqhpmQD71Kupqgs6kf8OmJvYCTpz ph0IsK173cGCuOlpeI27/XPUeqZ0GZEFRgST6sMAbfptO+/gH4bzKF7pakZBnLHEMEJl VuDN3kN9Yukxvpgxq51YTmDeIoTn+7bGRI5De10l48j2k1BF1cDOev2oJK0bsgYBuUr0 1rQ25T/SCFPq3kStKH7h3cp+i/vBvNCvv70aqSdb5DajjXx8i4Qzc7//FvN9fiGVjpFz 66aQ== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; fh=M5PJ0QPvxaEtzFzT/QWaP4ZjWGMUHe+0XLMcM/KMfKM=; b=efSjVcbuscG6mqHJ9tVa3IEyKRUUY8vjcl+xUtMytj8pUifI4yVfK5OHl2acwLrpSw A7EQq4Shfl28eX2ahaYU4sjNnSu73HO4DDEzXsX40cdZxuNpP96MnqpcN+TBeahs3U7i 22VloXZhV3EjjTHfWiAdYjU9Aap/zpbjI6CrEobpU4W5txlT0UuLXSho8XU9DiSjJ4W/ iN6wMkgVXnFBLnkj65EA8YRXuFBS88IjE15IesWZwO0yO+3rG+3rfDkw4zLnpUne3Hh+ 6dEIVZn/PCz2/g0K//ssL3LghW58i3upTUtnEYsZW4XVFy4mOOJBrEAXnznvql9ISVMN YUIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=atPNBvvY; 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 me25-20020a170906aed900b00993fe9ca8cfsi8607288ejb.766.2023.07.25.21.59.31; Tue, 25 Jul 2023 21:59:55 -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=atPNBvvY; 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 S231815AbjGZEKT (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjGZEJf (ORCPT ); Wed, 26 Jul 2023 00:09:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::716]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEA5E5275; Tue, 25 Jul 2023 21:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4yQtpfsikGP+qZbYLyEYz9uAzb/jC9SAK01Rt/9z5Cd+MY9UzLMIlyFDzxOROgB1PSdrQ6dZxlAf9YXFsdEaCTzoOPgpHmuH7/Aa7FDrjdxZxmIMhHE8NbCYKs7MUfM1ZG18gyOS5q7cFesp97+VTtvYUdNAEd2iLHi9Li0eAWc+FKnHUcZhqEjpea72IBhqi00Excc6D3fPSwb6fn5jUWxOiChJ8OYzIlufBmuST3Xxr+dhzdb34cfzcxC0oNL8G/3RLuJ+x3LaSdonvB6FeImneCbpHqBJ5m9vOaH0vlURpZZp1RvoKbA4L4DHjXqWY4FpcgBFnlAIoYKT4kZsA== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; b=jTk45OyIKvO41egTVt93tjH70t73Su0CsVUi+xRarkJXe74Mh/332u+Bwy3f28pmLLV4IHrc+SyBiXqBBxienGjEncByZjhH15BYtTRQcygEMPkq7LAw2SBuB/tg+wT+hVnC8kxi1MMmjf530NAj//p8ai/+Oq3Tm276Pv7mNKsbKdiK0BduDKTl1xJ1Gh579mcieLdcOYVKTHJMgbr0bCc8mwEw/oGukMlceHD7khOBkzSF3opF59nPylhycS/baQ/0K8Y2IUls3qhiNqZhVsFQIaW/Ew3CEyYJSqNBE/MI0ziVbG+mWm+m2FW3yrODpTC+vJ3c2UmyKC9DhE+Liw== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; b=atPNBvvYs64LVQUOmNacUMTLfBb5kF10Uhiyon2Vgsi6QI9qFcAVdzoT4OTAljOnZSj4v3XLlZIlJLik6YzOHvgIVwjgRlH+5wXtqvPU8xUpLzjwmAJYR4RKt1gzA2jnED/pfHUTnoD1W3tg1Yu2rfItenUxT6IiZYU4xH+xpU9IdDlFwqWrFbH5SPFluX9vxRjgB1wM+XfgHCAH2/xiNBRgVSOYG+ya5t1PfcDSLEKzn4oUHetFV1JQDbS1GpK9sE2PNMvS3wi69AQUGs+dLMZEotNjuL0dO392zR68l3+wUniKGXjFDj6sDXvzwfHWpgUVI3vez+bk6Mncc9Xx0g== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:33 +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:02:33 +0000 From: Yangtao Li To: Adrian Hunter , Viresh Kumar , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Viresh Kumar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 51/61] mmc: sdhci-spear: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:31 +0800 Message-Id: <20230726040041.26267-51-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: dadbe81e-e41d-404a-8c63-08db8d8d2079 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j33NjLcSB0uobzIPCJJvC/W/UE+awO7J6fWB7Po0shoGQ2OWULPU3Y04tYNiVLr6Zffp7P7PlSY5UYOSC9Ppwmpf46ExJJcPDV78bMSsGzwfZoflnG5c//zfpujiYvUmVv9P/AGfe6ShAFEc4TfCXRyq7Wwpsw7lP/5rjM7ZeQM2824YRaL8gJ64uu2sCAN1RXKaFI2Sk2uYZ18KBeQ2vslZNNDnKOcO5LcZL4rVVz249u/pBbp5jCRcG7x5QZ9ZHFflxR5nfOE8W1q+TvF4TOWP4BybGxMqUG7kv+cVY/eDfTnoSkX2u8hDdsiPEblID2KryE5DR+cgm5w+tzJP5ru0hL6TAS9tKallcJmMs8ZxR1U7xFTc5Yw9h8BY0x3ybqUn6g8ZQQqQFnbRmI/Y+NqiPCOPSRgNcd3ItlSTNcF7EZV+M+hy7ep7GZ3iGBfJsWJq/EUihfh0rJH7aDkIseTAoWd/wOgRsX30/AlLkBTLWULuiy2S6oDjZDbHGSjszJQ9fSyq8hdheYHCnNlq6zq+cKVe/qPN/H0bVV9mGz7guT02lhCARhp74t2nkppTl8C7rlAwDcA06cFGcRmWZfAtnAD8epwAOdmLTJzNV3fOhErcBHGVjQYibVP8ganz 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-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tGGXqbNEUaiuGQo?= =?utf-8?q?pfL0nOedQUlmvyVC5pGRHMnk6rp15EiuNNOtvBXyPgqKntyCS3VarNHPIJXsVWD97?= =?utf-8?q?CiOTSZFVX0sS2L6ma5aPpjU5Cnexw3doPQqGylA32tP+DOgIhgM3AYhgF11Jz0sxJ?= =?utf-8?q?ufmFpDs7CGf4YQKh4DIQ9q6Jq/pHQcTr0P4cOTY5DWMqfoiu+tALYtU04DTkL05Kg?= =?utf-8?q?ShqUnKWtmR4OOnM6vFullu32Sp8Rs5+O1AnkCr+YNGV/RZdbPk097/+EZOC/AiaHr?= =?utf-8?q?nlMcIl6G8C4RCmJI1QCX2WmpsJB0n9/+IMUzOWChyO+rBQJxRyr1qv8PTo+5wiD0V?= =?utf-8?q?0joDPqGKQ5MxKWI5DE+93itOAgLWcyuxGu+e7uC97U7GUSF5r9r5BxESADVf+aNdD?= =?utf-8?q?tfcuGkMwoiC3MF/+/jZl5Q7GTxiXdYYOwLFZKdk8OI2a2EHzsfhi1sWap5yVCxvzd?= =?utf-8?q?z4Ff7mYIJFXxmwRe10dVrejlKX+alH4V8WEgSkX5byeKHCagp0eqPIEdBfvASn7Tm?= =?utf-8?q?5gzcIvgxuRVnTWDloWRrBCXWb4sLxufIk6X6bnNwqPSokfXzJ91cQWNsYl6CkEYUS?= =?utf-8?q?F0o3VpqIca9Xfr0XP/FiuczJWr8PE9+tyGrGVTa45TUsn5MXA01ez+6OMb+tPODP9?= =?utf-8?q?qGMneDifM21/Btkr2PvqTCNJMdh2iyDFLdN1v+b9py51DrRfW9qqw3FEdneZeEaz1?= =?utf-8?q?qr0bvtM/qR50?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dadbe81e-e41d-404a-8c63-08db8d8d2079 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:02:27.9395 (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: Eby7EtEoMiuMK9Sekm9VIb48YO2FHXu3GizbaJ+wF4AwLsX5NX9hvAytANckVV+XczEDD5gUnpfAeo0t1nkJ9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772457919618080991 X-GMAIL-MSGID: 1772457919618080991 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 Acked-by: Viresh Kumar --- drivers/mmc/host/sdhci-spear.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index c79035727b20..ec6c7d8e3736 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) return ret; } -static int sdhci_remove(struct platform_device *pdev) +static void sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = sdhci_priv(host); @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(sdhci->clk); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = sdhci_remove, + .remove_new = sdhci_remove, }; module_platform_driver(sdhci_driver); From patchwork Wed Jul 26 04:00:32 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: 126111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp191662vqo; Tue, 25 Jul 2023 22:39:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8pajUL16hMn3yo9fReSQS9d1FvIHNMdxJYzPFtd1UEAlUPtrBopF13XBSwhWitFrqJAlL X-Received: by 2002:a05:6358:e48f:b0:132:d517:2409 with SMTP id by15-20020a056358e48f00b00132d5172409mr966763rwb.9.1690349996671; Tue, 25 Jul 2023 22:39:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690349996; cv=pass; d=google.com; s=arc-20160816; b=YjALd+/dBpSWy6HkZbepDxaRnrf+WOFFXo0RWWtOwrM9HGF81gDN25okqar7WInoIS 4bHCziIKIKHHv9xbzUcMLxmc97fRZk1J1Hs+CKluWqok0PGLEjJuJsSNFjGlRKcdMGJt aWZNTHxLZjhWJTleVtnu/eBeBqi6P5rCrQE8maCGFd1NXV/x720NnN7SgGxLnjGqvfAW 8S/MGH4zST4EGZ9DKpGT8SlgUh3mV5ZALHEi387MhJSsN3bGsNJrsT9CcooBSlYkny+9 +m5bdIZoLkM8T0AA5wrxNUAUCQisBU20DZnSc14AsAn7VlqJ1Wt9TWIdyvaLDs50bbRv NKpw== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=gAFqpAF0WBFenyGzjZ1MGkRGUIFaFkoK5sAbCmPu3FNZeTMBqDy8hfZfWFCmhEK5CF dpJX2zpOiBSyJ81uNNXLfns1zfMFAuJ1uNmdOLJdP3xXmox3QZuf8Y7SgU1HIsH8H/vQ lg4DLXEp/vpEAKw8iy+qCH0cIJeGgaRYOvUdvS29nE9hjB15yiG6BASZ9Wp5+Tq11eMU Ct1ElRdec+XDWeFeHtrtFoh1xXH8p5DmUp8kQWoBvzWzRUDIfH2ROaErojZXWKOv8cWq mbsMpt6BqJsyfIG+r49icVX83ZaYDiS98Xusq/G0CvSQ+YCAEJAUlJpYIetm3feicIU0 9hBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HkSukUqR; 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 v22-20020a63f216000000b00550e8b1ebc1si13009162pgh.339.2023.07.25.22.39.43; Tue, 25 Jul 2023 22:39:56 -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=HkSukUqR; 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 S231849AbjGZEKZ (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbjGZEJi (ORCPT ); Wed, 26 Jul 2023 00:09:38 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2071e.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::71e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EF044B6; Tue, 25 Jul 2023 21:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=neKbGccaA7rWWvTWw6M3hb9kNOtAUJ42r/eK+Q3lv7/UTh7X9Az4GWaKPEI1K8f+RuPOCuU26Z+u+mW+fgBaYrCFRwLNFxNvvRl24GAjvqr7cRehT7ofDbPv0nESf9SIyhGBPhQR0o8lUzx5a1eFcLYNyClcOW2qyxHTXoliwATVKMwzYHyyhqMjV3/YKJkWpxj04s022tuYik1zBhbtYRP3ABoXa1iQ94h0q7us4ELwYLxK4iLNU+7B4MpRjF0c+MYN9+VLhjuP6/iqMOQJoOB0bpko4nUqXek+ojGjVdl1fxgrUIdhoUQcRm/YcsAf3Mr8ZdbOqrJduiCRy2KTFw== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=ifleiRb8DnSsba62z84xTH/38O+OEgcH4s0ifC0YeMgTdMmqYVM1nh5sNPb9f/CCtK59TZMtQHO5zRdWYXiU2EpXGMLJjXmq9+QDp5vG3th1MazQ1y27oq3oBxkkgX0J0WipB/TEiith5o+ctqav9UWnGxHRWW4V3eaeeHkl8OF+q3vIHtYnnX/4nYmexc+tTI37GRXgN1H0zuGNQUeStdZhi+BphqSvLMyjtgD8B3doMCFd1qG492GwFKV2UGsfBo9XZxkmCKkPG0R2QgwP9QKHFV47wuySSiSYIasy7aMSf7Og4bT8EBYDoVFoQxrcmgQZ5V99Fl5bMLLFdJzhjQ== 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=uPnrvKCQGrGsesSBC854cGT5go4mKOa3EElli0C165Q=; b=HkSukUqRjYTBCfHSRgYRkpw8yJ3VCjmT8s11faTAXiiS8lEVSFoJ7RJO3WnljFAGZ21baBLUMrdBYPPkb7ge73xx3V5TQ8Rh+DjlHca4n/K49/DhNbESMGPPLTrYH11DEsYPArna5GYOkQV082RU21IZ5u/iIso3xQdk0KcJxl7JaoZuHj9xBRssuSyZGKulluVTYJ+E3qOdlB5joPTexrqLSLDMi+8IxNkEEA5nBJQslfNJ6OLPVmmKGGhOoHqtpPJtFQtU2hQygQzhF+/ewtLK7gZ9P6PImVnlqXdD33WrUQNnt7zI2Pnb7cgL40dgCwqVgtgFITszHkqHMUyQcw== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:34 +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:02:34 +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 52/61] mmc: mxcmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:32 +0800 Message-Id: <20230726040041.26267-52-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: b9716d6c-682b-46d5-2ab7-08db8d8d2144 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e0vpsJLLgRBUhWjgKKlGYjMQ7GAu6/OF9U31wP3R7DPvCkRiQWuF23qQ5HB/O7WMl0XfEkLLf3N7XjML6bswZK5Mz6W+byb1h5ss/DuJINGn+zWEk3xiJkX8q32GL1DuVHQyJYvL8OS48IBIQeuNbW6htyzWlt1omm6IuEg6xa1lW16y/BwYShUoOfbmm7WXICIw+SZU23UvKwyqVwrIC3odznLn53IuLZJ/gtRzrRbJJ6AffhqrNOnCwQvOzHaUiyMg6Cq4wxGA0hnVaLEZuC/r08j9bfVdhpD4bIjw9GFFCS73M7zpFaJ65t9FBGu7y2ume8rhBMRCVHbUxefdiRyemoQsWm+vi2MI9oP7PB7ioSLAV24F/vehkOeL0rt6CW+Vle4fvgkbdaYlmTpVjJPSD33QOo4fj8LW7K8QKXCWATBSX6w6gG5li0etjBmcUmCJEQ8Y20YqCRcOmODR+aMcwEJFxWd64ZffOAqlTAx1P0MUbs8DwLnpI30/ahcjWQUlo6bBOx83nzQWMEIBla2aD7Hugd87X3hbhF/QSPw6ysfQBkzSteyCOQmXodql11Ddk0rw4+b+pfD0iQeIYOxHDLy209Adz9iAq/F7kYCaA/8zXx1uRqy9AcmG/zZA 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)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(6916009)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(66574015)(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?S3ID62OXS28dm0gYhn/5f/2Zsjh3?= =?utf-8?q?6dJvcRPdGc1w9hqTqSFzcPZ7Qy1v82sa/y8V192AqpaEg+chbXi6dHgvN7W3s3EEt?= =?utf-8?q?eypJp7AnVCvI5I4oKhiNKy7cCZIG8hAUZM4b3hRiCtlPxsezx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T/Ju?= =?utf-8?q?DYqI9oUEAApneWrTeDmXWXox6IcPhjgRrzQ6hZkfJoH9X0IC07ge3HjCZ04Xw/YSL?= =?utf-8?q?012bUeI8WQEcedbcMLN7uWMfE8AVlwNZPNQZgkQbaEKRPOs2xXsfD5jRfTc/P4kyw?= =?utf-8?q?IcLprkEPREq3EOi3iR8DWy0qUnIJ6X/eYIdcTzUq8E3tMq0Rojiy/V5PX/lcccPMD?= =?utf-8?q?Gh1uTEYEb89djBcEgsfYA8psCx+xfLatBRgtwUPBTjeNYCp15eIBGUZIWzqxC4vbf?= =?utf-8?q?6fMsSFO8h1DWtwKsmhknyOilaSIqQRrfDPOuG9TSdL/RUYrXCwjJfC/2VxeDDs5Q2?= =?utf-8?q?kltQT7EVDZY7Gf8oTZLO0XbkRNbHPT+ZZke52PDdQZ+j7/LjPNiGMtUSTvVpKNpUq?= =?utf-8?q?/URszfItQ70J8nxZW6/g7A08EoCpBHvpCbRUUEwzWuagE7ZeeN3lE8Xk7rSke2Qfz?= =?utf-8?q?4+cmmAcDwk2PXA2bvwOAuDOfD0vHHpf1JUhULrdDgv/M+rYQ2zFvGS5gGaGYZDDsV?= =?utf-8?q?x4nFgBLPTeIP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9716d6c-682b-46d5-2ab7-08db8d8d2144 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:02:29.2378 (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: agMwEnhML1yrNA9XMj2Pogt+i15a2snGGJwRhY9/gJxR7337q7K9N2Q97SrhL6PBX1bktNn0zbXn4DgGuHVUVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772460438093222834 X-GMAIL-MSGID: 1772460438093222834 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/mxcmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index f3a72569dd1a..133127e45b81 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -1163,7 +1163,7 @@ static int mxcmci_probe(struct platform_device *pdev) return ret; } -static int mxcmci_remove(struct platform_device *pdev) +static void mxcmci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxcmci_host *host = mmc_priv(mmc); @@ -1180,8 +1180,6 @@ static int mxcmci_remove(struct platform_device *pdev) clk_disable_unprepare(host->clk_ipg); mmc_free_host(mmc); - - return 0; } static int mxcmci_suspend(struct device *dev) @@ -1215,7 +1213,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume); static struct platform_driver mxcmci_driver = { .probe = mxcmci_probe, - .remove = mxcmci_remove, + .remove_new = mxcmci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:33 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: 126073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp169230vqo; Tue, 25 Jul 2023 21:28:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFQeX+7sewzTJJKmcvN89+RY5H/0uLFaLItUzU8Bx+etOZx1NHOTtfN+FZFEJgC7iKtZw4 X-Received: by 2002:a17:907:2672:b0:993:e9b8:90ec with SMTP id ci18-20020a170907267200b00993e9b890ecmr578352ejc.22.1690345726579; Tue, 25 Jul 2023 21:28:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345726; cv=pass; d=google.com; s=arc-20160816; b=GRH2E2m70JLi5DVdHI03FKlVs0Cz7faSZRBP54zq044avhfqAyp19Z8YJCvHBfl6E5 IYY4EsPG58AQu3fuL0mVfqdE/mJJOda2Z2bUqEZ3LOkKZ60C0sXND6CcOE0hcGCW4cFN NnNzntRRQf83DYabp/kEaWnGthAVfVMn02tw0xHDXhlNy9zVlyZSGewHQ/OK3dpL4+dx nD0SPUVoD/gSGkW661pGTU54WfDcLrCPvspRA+OpoMyFHJY/yw6vHIxbrqJ0f3hePwnZ Sf5FVNr9CWNXMYQ7Rx/pCLs7e8D8G3ynwll1Xy4btNYYldw1j1m1pLRZLgFizMjlJlKa ziEA== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; fh=WUayfhwsFyI2R0meOGTXjXcOW9Lju/3B5D3r7aLramk=; b=1HtAZfZHmjWkFqFXOCgvwdwNTcEPajy1j0bMeMYOxcfiAyTNUH48reoDOBvI7RAM+G AloJlNWKdNDsRmOWXlmqNMwNIrCmDwQTJpoNTPApS+5vb/hhbCtRFNDc9tSPM0f92W1N a6Vvb92IQf8inwa07b2zrtMh4hT0Kq8zC7lMVYt1HsduJvWt3yBUhToU3vm1GWSJZlZe 608lJcYVuq6ba3jF+V9jFDDMtf5wb0oUHoRW7A1sEJJFa6k7+jB4xJqsL207r8J/a4IY HqYDPqCudeWcnYlGI0JJd5kxSoCSq6zsMcQJOglZJux3jwFxQD1WKohgbZ1TPkYAJhSx eNKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=htPkndb4; 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 pv13-20020a170907208d00b00997eac101casi8484631ejb.509.2023.07.25.21.28.23; Tue, 25 Jul 2023 21:28:46 -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=htPkndb4; 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 S231866AbjGZEKj (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbjGZEJu (ORCPT ); Wed, 26 Jul 2023 00:09:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::705]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4DCB10FD; Tue, 25 Jul 2023 21:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XtEYlxloX5axZx4BeX3VCE5WQeJC5Ipybp16FlmIw/MbiL2c1Oo5VzTgZ8j+tjTNzawxBF7CM6xhlF9eIZVvK17cgma70H11M1kAC/swl2HtFnjZO88tThQJ61Eq9H0cfaVCnS1Jg04mIscNxfAF2YMAhpSrl/gv5+rezZEL5V332xz/P2KZB/7XEXKHoJFfx8ulqU6dB/ym1M9jdVDW6tkK8ruj3ZiBnd8GwdnH47RFAdlPFIA48GyotAtT5OnW5hqdpnVqFfpF7H3fQJ1o/NmHnxQ3A/j5isUtOzLBCbkLhsfeUlUAGr/s3wltnrRIuLaCohmvLoJMbFXZudWX7g== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=Nr64vaYahLzjogNYX5NJOebtpnoP/kQjoeuZ3cP5XpCM5hao7rXF8RxyewqHwvWPl+oW3CUfiItUNgRwdF9iB3aUi+E/1byo2jCJRPoyFto8zcskY+W7g4VKyGIBr9vaOEO9jCFb1806+ZoukHEJqH0eYAfmdqcFF0CP3rHPMl1FGpTXyy4YKHcrUVzrwLqQbKyPIpRt0PIPbJ5rWfAC8XiuAQeg5an781W71N4jQTr23Nnu0gEsziTxPmjw2onArqU9V+Y+Qp1e4LtU+0pYnO4SnQqm+/hdWNVC7gwTdTbUW97dAwCj/KwdDbgrHIxnSJcj7nGIj//RKg7EgtL0BQ== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=htPkndb4I7o2fT/YTB77qbP6kGRXk6m33JaTBiA6itx7BD//IW5kuxRISiNArkZibAhkgq+FJhMc3h7UqBZby1g6oIfgq9PpuPT+TBFKQBh7Gr9ho8L7RP9H705TJRadN/3jrKliQPLQS7ZNx+Ee9nVosnQKTuYDrFmKaXMTxH3A57QvkTjXZxaNuNqHM9k47G4xhLpCadg9NxHHwjS7sA8eb7PEMBg9KE1P7ga6RC26IEFF8diAxNQd6qDusvyWtSEu8IUrkE+M0+e8DMoT9Krpjp+alD0BjN423qNvvZYZhWKFTShTLy++MBWEko0jbaY36xvpmAbpezGQqDJa+w== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:34 +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:02:34 +0000 From: Yangtao Li To: Nicolas Pitre , 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 53/61] mmc: mvsdio: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:33 +0800 Message-Id: <20230726040041.26267-53-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 9048407d-38c0-4672-b455-08db8d8d221a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w3RgvNhkKnTKokoDxonbEs1L4gsw6ZU/kmyEaXlGCROKEqOOQ/7YI19OBgRKkLpYh9SOv3Ylnq6cOQ0Bli9uJt12dsLMiSx0eomNcJhVW/V7TerHrNrzAROGUzdYH6RnyWkoFjgATd06yy2LPwKn+hNgkwl4hHEnrzaJ89ajdii7Cz/xc1ihoT0wz0xrr5QC3d+3KrW3L1LPjRZhVqw/mSV/2AzgDcgpi+XWngVCIJLJwi6aPH3Pee46MlI+7NPl0luYmv40TNbxpkZbgQ0iLVeXjbrf+kmExByxdF2djuzHYFTDnCvyIZdwM4lEf1IzFsEc93OE3ThCnfevIiPSrJHjMNj1gPvOIsX/bdT8x18hj4b5t+CUhghYYUStXwqkLB8HosvaF6Ldi3K0i1lC3m1Bu6KYB7l66U48xveX4gdK5Xn/6+tJHfhB0zk+jcviRK8GR8DkAs4FZxdIfGNY6436sbBArg1NdxstTNmR22u6CjBv0c11om84UgYrx/VHBBMoDZuDZDsnAgg04bK9pXQ/X3nIohDJ5PzKM7Da+zd9JrfZJ6Xft0kpP5jx+4/nxk351o4S+kGS4FrPLcN+emAki3vhBL+MDITD3ykjLEsiuICZxfBeVL+AnfwtoWwJ 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?3QuqZSzt+o1CQeF5hUVSZCe4QC7d?= =?utf-8?q?bUsQcI8zN58KS+bOFR054sY+JEz+mJIFxZ7jJh9VzOpDNlejt4Ilyc4gig7bPOLta?= =?utf-8?q?Zk4+HuRXU6aJIjAB3POeN/e5RhitWib/y9MzD+xvMYwadQwr5pp5uWwEBuzlZpTJ5?= =?utf-8?q?EEebgmITQxHxl9+MYf0auCLmJuwAbWoEtiy4nb5c18XPEKlRPKDhXyTOKgQvKKJef?= =?utf-8?q?+66v9qv/fZRyOAV4xFtA4yqko4amDw/Ne2Xf1EnSk0mQO2JH70qNnySNaY9KMHTcb?= =?utf-8?q?po/2XVA/WKv5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-8?q?IBodILM8bCssM80fv0wv1UYMNDQhNuwNzugtr23qN44s4jydLHzFvOVpIgzNrIMbR?= =?utf-8?q?dVzdLzE0zkAYpGipqPqyUf8HC475n2oT0zFhzcw2JVBgHLasiXaCn5o/6IGc/115W?= =?utf-8?q?2y0YirccoxFndf+pcZWr3IBhwD9T7IAtd7EWRkFxsFQyyWjuKm9Nuyia8sWkmJwPL?= =?utf-8?q?7+CJPGG2DZx0D6tfcVH+UQW7jGbvGnDMhlke4LRrOkezUCShB2vFmEBKH6fnWQL9i?= =?utf-8?q?pa8p4tSBGW9G+REQrV8/5Klqufdy1AjBV9KlDJWSCwuRzwIKrhusvfRmqXJNIitp2?= =?utf-8?q?1ooUEONrdXDRCaXm3xlyvGndxmRaptz/UM2ILlj5XABIKk9d29CgdWg+PsiieYnZX?= =?utf-8?q?16rhHRYK1+Hs?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9048407d-38c0-4672-b455-08db8d8d221a 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:02:30.6317 (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: 15KPZ/xfyuXs1zJFJ1sTNqY02xX5JwDpN12Wf4Ji0njwk62BHHZK6FtO4yN3cF0gXYLPfc/OP3s+axp8L9BDcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772455960696807423 X-GMAIL-MSGID: 1772455960696807423 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/mvsdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b4f6a0a2fcb5..ca01b7d204ba 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -796,7 +796,7 @@ static int mvsd_probe(struct platform_device *pdev) return ret; } -static int mvsd_remove(struct platform_device *pdev) +static void mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -809,8 +809,6 @@ static int mvsd_remove(struct platform_device *pdev) if (!IS_ERR(host->clk)) clk_disable_unprepare(host->clk); mmc_free_host(mmc); - - return 0; } static const struct of_device_id mvsdio_dt_ids[] = { @@ -821,7 +819,7 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { .probe = mvsd_probe, - .remove = mvsd_remove, + .remove_new = mvsd_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:34 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: 126094 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp180707vqo; Tue, 25 Jul 2023 22:04:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGhjZRyZWtBfaimHTGg+ZHM1vGjcQkK5AMwhW1lYz2GxCM4rzUUj87PVfuN+Tf307YWBw76 X-Received: by 2002:a17:906:11:b0:993:fba5:cdf1 with SMTP id 17-20020a170906001100b00993fba5cdf1mr775319eja.22.1690347895769; Tue, 25 Jul 2023 22:04:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347895; cv=pass; d=google.com; s=arc-20160816; b=JNYlVsV2O10YbgNg4Hf4mWMsC66fXjPGgNUvwaTMQZEd35NJaOaB/G6L0TflPZ0X5F XscsMdBMKNj1/W8/2pqLfFw/oIRDxCY9d0xN3s2MSMXM2SsbZtlVJklik5zz1B8bpYLk Vf2RpPHoZ0SHzYZYEnguxXXm04bht01w/76ALym0EkcXIMJ3z2TZGedv46tA9ZUoAHqB wj4hv1EBZ0Hw8eM+2XbQzZenR05M1A3TACjkU9DTb300pikvV4aXdiL8f91f911VFc1e P2Eyql2kJYg5KADKnkL1yrGBnsTZF+6LmX28QZx/1Pvgc3uHnql7552kLpKZuXr/P7ao Fr2w== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=Dbbr8KDxnCk0x/EjhQFPxHsWk3sUVbk6E0nfdBbwDAXL2syCDHWcWtxNsaT3OdwSf5 6cGvJsUXCOTnV4XVI1e/AOY2oVMC0VLrE17lpXFhi2GS21OIabEpzVvjmRHNSFLITDDy jzsD2D9MpRnVHZ3KPkH7aTjTa6br1nmJuVsiR7A8jo468xsA3BAVQhg0+Bfxn+2lylog cw1MVWfi2vYw8YJ2xjwVJXYLSg1xHJKdsxLUVrwyuR8bbgoTAH9vFWgK20dq5R3VnkGX yl3pR4+dmu/A6KiMqrsIkHKsAibMF27jrvM6IdL0cjYLx62NDOFxXoRjTKowRQtpdEoK Q6FQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=G08KKUJn; 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 g7-20020a17090613c700b0099bc0489b51si611685ejc.28.2023.07.25.22.04.32; Tue, 25 Jul 2023 22:04:55 -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=G08KKUJn; 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 S230205AbjGZEK4 (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbjGZEKJ (ORCPT ); Wed, 26 Jul 2023 00:10:09 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E855597; Tue, 25 Jul 2023 21:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFmMdUfZcer8QCUxOwK2nMC9rxtXiQhg4jX9OU94+CQAAXGu52sdfrDmCAMjwlOBngfoFjl99FkNIBdW2zZWKLK7MU8I1BAHTzLtSNZWjoPwpdOSELgjflrq7hMF6arzpCVC1+7Yflxt76PpgG+QJNRmcq53MD1D9K8RE/BmLuVI0kNFP7MM7Dr8dZDJIBg8dMBaqXXdWKl4k6StkDrXdNh3MY6tuPmp4WYyb8vgSEGEWFFYJN/mrwXbl+S+JhqSnuyoNFf+Yk/z09HuEiJFMe2d/yCFRh8sL1PktCq4nqoiVKaoDS6NKoU+CEYfOEKq9OdVjqjDOC9bh+uigH5yXg== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=GWXLfAG1S6kESBGdTD9VZmWV/kMShWnFnDSSMUWg2Mrvy3hjfZYpfjf+R7c5P5cObDPyG3Oumwc/y8vswg3lOoKUzFbRQS+o/FjZP06UPZ19ZE5AEq3Qex+pbGRSbc1vPM7lUH2srvED6ww5PsFzqnhveyQqw4R0Wf3feh8kAJui8ZzKhb6wYY52RIiUhz6G2US2w/BIYYGpItz25PZXCLB1TyrIxOGnFulm6EuWSLz5zHJ5aaviv8I/SsMlRw5riLmsMn/D8bHtNZrJFRh+ZG2aDc0WJ0OsjiV5J/vQ7/O+qazj3V39AU3yXErMT613uW6VSCUyPDLVzD9DiT9joQ== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=G08KKUJn+edEq2g+ZE6HEBzCRmFbjsoKZWhPlgTtJ2fo4oa/Ug+pzBKzkDAVU8YcrRMQjsOoxTMQzgkfWKGQcYNCPVu8pmdBrXmmNpgY2ba8c4cdJWfEby3mvpFY/Tt3tJpFBXdooBIGFH4dwoMNrR9+MqLlBv7QcOjgnxPv98Qo5R+D/jl0nylY7FD4/QYYChrRbDY6dlutf9hiD6nz8BHOinaYx+o6fZ7Uw+oBkjSC6+/oynt6SY3JFsXT/8AiizYiG1088500Wvjmv/Qrvlx1ML1qGqvYyjB3OR7Tf6r6sVVbtHOTpI9PHfLuyYGI/4Omb7Ok129SSPmvAcEwNw== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:35 +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:02:35 +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 54/61] mmc: pwrseq_simple: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:34 +0800 Message-Id: <20230726040041.26267-54-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: be08069b-72cc-4222-2be0-08db8d8d22de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OSCh1UtellOofNo+Md4b8dvXahhYvaU6WQE3fxrtQzkKIsuRjaqwXcHJy7NvamCBgAxpmyZp9+3mYxPnM6DgF71bJzKG/xXjNdFAHVFmPpy4o9ahkMCQ7ifTDC8eNq6qkL4OlNooqhrvnzePnJ/CJs30XvTcEM9c3F/EFfxmUmnpPPUuCM2YC4XNP/S6GPSN9h+BatDGqkZaxlZo3L1qCzsZf26YPbccMyyJ9c79/jDNqhgnDckoDFOX/U7Dbed79Tcu6HeIZUdYWhGzt70x0jKnkYYAtUomB9JDfMwSGoKXzlIhyGz2RyA+BksUDzIf/JguWmZ3PyV4csJzMBJ+AL/OMNzXJ+JcLk4KtOPHBxJRO15LnsQ3K4NnbV3vQlRLieHKnVn1vB4I12kaDJVoB9cVQ0tCYVw46j5f1WilgYUnAXaxvrtXjsThFglVgE3GPD5ZBa24ecK70ndG0UFr8R16NpgAyz8l3sJC+9E6gPBOnU0lzsF0aEYn8IOq4cFaHZyIyf8kB+iiReefID+n82M7mbbqqq7dJJORaBX32Cd7wUVUGdxu6B8XkmZfgbWvZTnLtUkk5ERW4RxGjUcAUf4e/TeNYDPD6zWx0AFwLFEYIsdcCAsiogxQsUWy1Yty 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)(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?XDOm3rZhbqfNfaTVzkhXHr3WlZHK?= =?utf-8?q?SY2ayM1pXEli/zZCSk/fGwyrdeKmYFayW2Fa/4xIedWrF2oZmdEfxwzo4TCesNeFi?= =?utf-8?q?Gbnl0A4zKrspku4TtrDpMf8xmZ4BcHi3jrxd6m8lXBIgaN8Edg3zIsLSKt1vS/YVU?= =?utf-8?q?hvf0/WuT8CLuOfxOOG6blFWj7u8HQhkq9xiwKX0QiNPsyvRzd6Nfd5A5g5OeZCFyQ?= =?utf-8?q?x1la2F5tvxaJEH/bf6bdY9ByhDAOPGuRiwEfbXBY9vy3y4rWjx44toldXb1Rr8b3B?= =?utf-8?q?lLVpXdGSWRiXLUYQjoK1OBMvavNDH4BJB5BQIGfGM+Gx0FowLt1YhE+/i06gBFFTP?= =?utf-8?q?CYpO9gma/wMEgq41myKVMVh6A1K0Y41T6UHLe2IUJ+HZY/kHvuLZeTxuxO1FvxU8p?= =?utf-8?q?pYE6B3YNGyZZb6tO6fStg4+BTi73JaLpedxRSzLycN6XHM9Niq1EY357s5l+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CH2PYAwh/9VchnRIY86WhM95E7LNY6RihqYe45DSC7UL/Arn/EuUINKXf4KBz9?= =?utf-8?q?/SR41YhTw6bGO5s41aZvA7t3188mTZ+i3dzNXwhqcb9sYoCIP/MMe38U0xWx4M1Bu?= =?utf-8?q?nZ0au9ZG6XTmk6BPiWiWtKiFJZHjjceZEcCfMIQyOC7acBt2qv/aS/RJjHkqJkTfm?= =?utf-8?q?KSR58+J8uv4B?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: be08069b-72cc-4222-2be0-08db8d8d22de 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:02:31.9691 (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: /UBu3dpkP/kDBx+xLlulznCMYQH+G4PIug1L7UHHM6qDq+mPZya+W/m2VofhRHEsJ0GxPLYK0ZAjCmG+jQHHgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,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: 1772458234951948347 X-GMAIL-MSGID: 1772458234951948347 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/core/pwrseq_simple.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 3bac1e71411b..df9588503ad0 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -142,18 +142,16 @@ static int mmc_pwrseq_simple_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_simple_remove(struct platform_device *pdev) +static void mmc_pwrseq_simple_remove(struct platform_device *pdev) { struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_simple_driver = { .probe = mmc_pwrseq_simple_probe, - .remove = mmc_pwrseq_simple_remove, + .remove_new = mmc_pwrseq_simple_remove, .driver = { .name = "pwrseq_simple", .of_match_table = mmc_pwrseq_simple_of_match, From patchwork Wed Jul 26 04:00:35 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: 126085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp176150vqo; Tue, 25 Jul 2023 21:50:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlHqxEpXNXNq+Zajr1qUwwE+7SJ4wy2fidbQcjD0egJ3U5WuIhmsZOdO+pkNmQEzhJjaA2ft X-Received: by 2002:aa7:c6da:0:b0:522:2d1b:5a2e with SMTP id b26-20020aa7c6da000000b005222d1b5a2emr522997eds.12.1690347056920; Tue, 25 Jul 2023 21:50:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347056; cv=pass; d=google.com; s=arc-20160816; b=IMhYycufyI/CFrOUOgEI8oGb+wgdqp5ruhqlKbqYOPpx17FyMAqvW8B6heRRzkCxIg nvl778XZmoJp/AI+wmRIceZcsvu+gLRGwgmOo06SdSPhU+mahslWrWb/6PXOOoOzDC2m J/YpzIMpiRcHJPtpH5M5DNUUdFDlb8GnPNFVMUCiebB8LjFSjjPcglvCmbNMthgeVgo8 1LPg9x3u2N8MFw47iEXJlO90VlFKWFtI0+P6gTJhMHneq9faRoyqNI0D4qfhm4h04acS XJNy3ICuHW8DWcT4eN2cOK1urX4MGb1yyn7LOtj5t7MVFL5ai4fyq0t9Z9v6bvr8enG/ b7hg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=LTeWmqfo0rsk91QkofkMD3NDrrQ+SknsLkY5QjYlgsUiIwCfz2RPIWc7Ym6FsgVQZP yGIzDqkLhZS3F/t4TpdK6A3GZ9mXZP/dxMg0VKu6nvBrOLguq8atT8nAMkL7Yihr5PIe Byg3SbX2tUai9OWB/NsFVeQntW5dPQB3Z0uOM2vV/stlkb6KtmuZ2His/VuTYNRnP+pE Aaq8gLFOPamHMa7mR6jsJu2YCxx0nU6PlFzSJ6N+jwq/6n4g/2ZgNBrbB52S0xnAoFje JWQ5Ey2cTEGtNPunblo/tjccnGLfC9RObnRDypcBXHNOOBs/jo/RrfMdLM79qD3tKnxB cEkA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KSlpnL80; 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 r20-20020aa7cfd4000000b005219e374aaesi9059680edy.119.2023.07.25.21.50.32; Tue, 25 Jul 2023 21:50:56 -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=KSlpnL80; 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 S231560AbjGZE0g (ORCPT + 99 others); Wed, 26 Jul 2023 00:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjGZE0W (ORCPT ); Wed, 26 Jul 2023 00:26:22 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E452D4E; Tue, 25 Jul 2023 21:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j1UejV3v2AEQiJ09rNS9gYc1sOsD+Vu7fvDS8RG6PpK5Uxi4WBNscWRC8WvG2ruIBivz7b84+FIQ6mKLUqfrHG4FsMy1r24LklM3K7jtO1Yf3+DWcNmhJRT1U8t1Ju69bk7DbbrJaCG6n+kB9AqJNYVPyIeiaF8XH8Xgrw/WWB4oOvPYQCtgelWqfhlYAgf5h8ODFSefdnpNEZ2qBFP7jZdJgUn4iISAORucq4d8JGw2T9wRnNyinCSuG5IEMNIucLe3TbQP6nbHQ+081GVNtHxlmxK4L7uJbhSiCcOVNKPUw6RWDvSKK6QeB7jn4jOYg0hHsexbRed3QqVB0fgJ+w== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=ntrm9Mte0w+lcs4kNSj4JzpgLGr/NPUqLZNc7235JSvCLM02e7YZAWA3Lq+VSJRlKxY0CqBPkHcLgQH+KQnhso+kMocXMnpflrEhKjpESg+fKgiB5VToUBbzHu+IwKERZCLUzZaVnR5N15E4xL9j+njv2I+hx61HGNe8FO0pfNVpmrWdz+dmaTkU3yRrbtz8yyUoH0hZUhP84cU/37TVxbKNV77uRgi/nujIDa5dEC8svQPw+xJeKVYcBmCcNLqFUJIfROlj3E7LvxK4vd/gHOjlQLWIGKxcE35YGxRib9i07I1ycJMs2YyM2sP3CgauLnSleYrHDOI9E06KY1Nahg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=KSlpnL80Ds1qQgsKgYNYxpQw6TBbEhNLTaOabXhckUrk96fUC1n0R3nHjZFMbqDNPNPX9EFAFm+LJByDlX8RbxKQEi4QO1n6sUnQa2E9NKqhoQAFYCTtuq3AXnhUbLjoLHIAG/TXO142Q80stlcr45Qfzve93rerM5Xmt1+wRuStMEisHznUXKp5IzV4pkjVA2bBdMas4SN6Fi/R4X8KMzuJOoswGCcDO7m/0DH3n+gjHYX6S3x7NHhhL3yf9svEOwuM/KhaOJqqmR2U989ET7VKEjsNFCiXmJhUrcZ1nQbEP99sqS9yM6xO31dJrNaxlQWObHc1X1xHvlquvIW14g== 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:02:36 +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:02:36 +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 55/61] mmc: pwrseq: sd8787: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:35 +0800 Message-Id: <20230726040041.26267-55-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: 8be28dd1-428b-4749-2c76-08db8d8d23ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J1mo5EVCdFo236QSMPodFhKA8rsfSoTg6p30RlExIh+NDV7Wqi67qxaxlimvkmqwoWjS1mBFmUR/HFIk3EM+CZvsBCdUtlvMLPwE0BPvFUuDy328DBO3UGot22q2FaDReN/bjayJJgFo7lJ7ONJkC2f1V2VD1t+zGdHsP3S/DnygE3jmxHn6g9SvTw/yN6tS16OU+tw0zkGjbERec3Tz8OXNReJDSqi6q18xFodApzVThzkkX3OCrZZXiaTsfO5pVwO6VQRlP4U5kihaHd6xYbVbWXb0tZt5qeCocLZJDrw0NMgn3brD9h4CB7p5x6y6xAkevcSV41dC9D+0LC59jZxRrM2vUZ5b1Jmx+s5DnL4LJ5fz9xSKY5tyg7kNA0mqjiXPH7x34M/T6NYOfk+dOiou9fZJiaoGRZ/s7Zk9IFdNj9QL1xH65xEved3hAgrSxDfy+Sj3km1vQRfcboZuKjOGGH8E9vTV7wSbR5LOEhPmztERbOjfGxuX7gTdqHvFwokusJSVT/19uUB+wRxKWVeuQimaztzhDClXeCiHE8VBvmGSG0G+RGvn8PG8Qt0iuSXzf8hId8JkFJO38rrwBaKrJX0erLcFJna28apSkeKdePed+fkJHR2NG/aXeL3y 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)(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?QJ+dagPWWfVCP7+/Ssp7G5+//hkJ?= =?utf-8?q?LoEL4kszFvDYhj92T+zdKJV9ErVql2NwwnX7LdCdKuLNZeKd1KnINUQWnF1mr2Su3?= =?utf-8?q?kDoT1eu2OL4YC9Q7zGxE3KRLFwTlW+r21++bL20u0n3tIZ1AjdQmTPJY3eUv1m9l6?= =?utf-8?q?bzgpN9SGDZfAC9Dl/1o1GCOsmMI85fVBbGjhyasxQafO3WsEBBgqjaCOgvRmi8koA?= =?utf-8?q?bBIutTXk9LE6kx6hn+41NIZr+323Usqz8NoCXrUYTaQAiuWRm2wX4RHT21rpjgPrO?= =?utf-8?q?Ol3Eykl27rVo6azjZoMWVqTEv+WzN1ptJSOBuG3MHdFNXXAVTNYTn5+EK98Xf/Wti?= =?utf-8?q?0zLS7KHcsZ1+El+/eJaUwSSJuh2E8RstT3hBsLhMfN6T0/bbI7HI83T4cPtKVRQ2V?= =?utf-8?q?qd4Gzr4zNubxUeMavVdkA/nxtt/o1wZhfLgTQVqj+rw+YDkHBw2NLgyP9vPxbTP+7?= =?utf-8?q?QFMC80gyTqRXefgL42TORWYAYYNhSsh4wD5CCGTXTuk0/rzCA91hpZPYC/8wiZqQ/?= =?utf-8?q?d6R11AZrN69p3nBUcxLBiNi7HM+b9ZcMFRxvPDCtBcxNRwtu+KTmzG+vWEXWXuqdu?= =?utf-8?q?Pqa68Zvv5GtBS0SBKQjDFZfcwdgTTH32BjxF7xciIdqIgpYGl6LX0lHaO0Qp4qyVx?= =?utf-8?q?vOgwkzwA8ZsjhmrQfCUDj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orOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8be28dd1-428b-4749-2c76-08db8d8d23ab 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:02:33.2627 (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: ecqiw/2vD4/pnogHtkukd14GhnH65hU7rP1wJ8OSNsQfenOKA9z6L9/IJHvQwKfoRC/gi1DR2+84+FZDDmcilA== 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,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: 1772457355427663965 X-GMAIL-MSGID: 1772457355427663965 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/core/pwrseq_sd8787.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_sd8787.c b/drivers/mmc/core/pwrseq_sd8787.c index 0c5f5e371e1f..0c5808fc3206 100644 --- a/drivers/mmc/core/pwrseq_sd8787.c +++ b/drivers/mmc/core/pwrseq_sd8787.c @@ -113,18 +113,16 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_sd8787_remove(struct platform_device *pdev) +static void mmc_pwrseq_sd8787_remove(struct platform_device *pdev) { struct mmc_pwrseq_sd8787 *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_sd8787_driver = { .probe = mmc_pwrseq_sd8787_probe, - .remove = mmc_pwrseq_sd8787_remove, + .remove_new = mmc_pwrseq_sd8787_remove, .driver = { .name = "pwrseq_sd8787", .of_match_table = mmc_pwrseq_sd8787_of_match, From patchwork Wed Jul 26 04:00:36 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: 126123 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp208643vqo; Tue, 25 Jul 2023 23:26:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlENqgDfIkilxKKCwatnUTX+rjZEVmogwtpioKnS5begT3/8EQ5bKMJ64jnY0WOx56vx0rKb X-Received: by 2002:aa7:cd50:0:b0:522:29b7:a95f with SMTP id v16-20020aa7cd50000000b0052229b7a95fmr726240edw.30.1690352810581; Tue, 25 Jul 2023 23:26:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690352810; cv=pass; d=google.com; s=arc-20160816; b=dJvjHQZaTVi6hoRQFuErK0AlA8V40UUDIinSrAThp2PFI0EVCgIl/JmXkaJQSPSgm/ 9VpER7/V8PF7uXinKSHkoG1jV7LUjL4gu1BWRVDsySp+ejlp8waXxVyRsQJd9PzoZwJ2 UkzNN2ZTsPRbUIlfauQvuZ/nUdCDf8PpfduwMfgFZZfbjeTsz3PBbCGZ7FryBDYfXyyl cDATV6DWb1ViRTljSOYGg1Gv2JHPY69xENZ5blNrUFFSKqLKs+D/dywcr+5G4fHsdVvT 2RCRY7Doe5bWqKqf35Tt7WhWyGZns3bLAgGLcl0NZUNJQ0gHpK2wbK56AawiHQYmnz6M UMUQ== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=cZDfnsAC2uXPYSrsMNLCqdkRi2m4POfHthLBnZUPeorUqB7FkoNvxFRer07o7Z1o5p UWtA/c4A3fOc1tE6mDpkg3UcsP+Z7AB/TP0zFHPhAyufLYPh9Wgny+wpc+ns10akbXLW 6ecFNHKWftkDP310tsOxsPFmVtRaQFQHYwrMqsEoyTq9nGRGjVPapqNBII6lzEolkFw1 PsrrGpb12PnzUO29eE4bGDkzoDm7/Ye+WN3F9qQLggMq2qG/Bnop+Yjx05MJpb+5PDqo d06LLmfIUWWzX8dJFvbx3GEB48KSF7L+JuKKMAdyROwQOzDcRxHQz535z1bc4ZJ6fFnP LB2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X+QYr1rw; 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 v8-20020a056402184800b005216d397e43si8876565edy.494.2023.07.25.23.26.27; Tue, 25 Jul 2023 23:26:50 -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=X+QYr1rw; 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 S229798AbjGZELJ (ORCPT + 99 others); Wed, 26 Jul 2023 00:11:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231803AbjGZEKN (ORCPT ); Wed, 26 Jul 2023 00:10:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::726]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D25B2706; Tue, 25 Jul 2023 21:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ClzoBSL9brjrcUt4PccevHiac55DZ1/sKNIeZWjrbJr8xEgM+ajbxRmSZ3ccKbHOD128mh/VRVu8oPp5ZY+9RBdO7bvETU5VPx87UWPs6rW3lMQX9fkmaDtIjLtleUofm4aNTIW7ltT5U3NCILp2Ri9jMiOgZMAPDaa1OmbQMkHsXBEtvxNDZDerIarD70HrPJHLLQ2rxG9NFHvSz72jq1IZf9iuchazNuIp8N9McHIeQYLUPDxt0e3lSfIJXDDhr557q6GIGye0vcR/ZFgQW0eTaOPaNYKIpRU6cMR9awHr83Z5TEhj2ad8TyJI+9xOdBRzuGMVooBJnTmxdjBGJw== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=QuCueWqNKCcn1oVIn3P1EvkMwydnH3t7wthN644aq9yab0AKxcc0Hg2w++XqHwbFmrbIbKplGxRgjVsaru3uiontP62uTveEkBBnACEi17m2YdcM+ukFIpJ+KozEXsRhfbEg0+rRBY0sI/8IZcqQOKPQnKgrM5sKcnoFHU+g5mJ8rt0LMzkHN8+vkucqTknjsdpcLqfMQM1OcGZ4OAdq2Ip58nt4ebQGgGy2qpgORuBYJk0mrkeanZRsQL5Ug3T0JLDyS5kKhUS5h9nffc+JcmOwYq80vWOaM3Pt2ZWzJhIW/56M0SkFwOktCRvahvWt2GRRTD1IOxEKO3QAlvKkfg== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=X+QYr1rwFc0DhiO58whUOCKExCTX1vAhVe6Xndglb2Vw8kkKMueFiUwWYi3fgJmCIqFM25HcZm7zbJTdS0skY9CH5nOvcoyYkJXnKlbBWbdLKTMhaQJAe4CYaYKEUIXhxWXynEGkFFYDryRhcVr7SW/jM8e6dBlhjcyxK0TMj/KlY7ACjOyK30Dj5aW4rVm2NOqhnSZKpTGg8ma8iUyU20Dgh7nS279tbYDYFe75Sj2h+6cms7Mf7xBux3dmpWlkOI1G36SU8yCk7pKGEfiuR9vj5d+rk5POQqvoH5ub8FcZmG2Nl6bKdhV8VmNUaFyBprohdxhuYl7CmokAaZiNFg== 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:02:36 +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:02:36 +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 56/61] mmc: pwrseq: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:36 +0800 Message-Id: <20230726040041.26267-56-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: 255304e8-317e-4ac9-0665-08db8d8d2471 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XDuo4RgKKkmlz4DpeqahPkRKYddJwsJ8XM4dWjwXqNv1KsgpA6aGgn9y5wtc8hb80cY6S1srGYCqEFD/pa7c+GSgLxU80XpTnASgjDl2GyJamXM/Xprur+2I5GZlEN9efMb43eEZD21W5FoblBDYEZCrDWa+pFgmHbeMWPpEty+az2J7rDSUNvQNyT5eA/J7kh9Dsmtj36CV28U6qIChfBlaj+xMDWX43B4/VmMUSsctxgjHYo/JNb0g1uMBAeUtNNLvMjlwXS+3Ck5QOBeeaB6/kPk74QEiI0SKCJx/ceL+zApYD2i6hG8aNgrA/6QG3fBpoYH0XDQ0OrGFmWD1O5xGH3RwzczuI47AGBBcbaNFX5/2iy8ojRNyXKptu2YcUIGEmrXQ/LO9VEYc7ys4yYNvscHU8grymsNm3j4MPjg+zCa2vqXGfE4mZi86QFOsW9pL7HJvlF2dJrlRy1WszH+6lsA8JwXX3/nnECV4TkVzllzFETWtavv1WribtcJ8BZJv0sTSzWJdlMODIFcJ1FO7bfjUnv02hnM9gAPWmvS/O2vwKVzF4iR9ojkJUfnvRGxmYp/NOGmBXfoSnqggIX9ZNvC5lYuDIycdNQmm+rWA5mx71dzbo5N3Zpe+ZlBw 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)(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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Kwz0Scp3IYgK5LniJwYvZFXqyz?= =?utf-8?q?gEOKRMzi6vQOIprhzI7+kvfH/PKIQJAr/n4pYtv53lVNOw/Pcf3w1rSz6KG0eNtKB?= =?utf-8?q?8Yfe/wHllmKFHMqWomVKCiaHaedSNrHJkOp1Ah/wvRpSS1uATjV86AR2Rn61j9+Ac?= =?utf-8?q?H3Fm8zUfwe04G2+Y+gtK9RB2wf5K7pQb7/tgyGqgLplRx2crNq1jOItjmPGSO3F4B?= =?utf-8?q?/6kdOo+TOIlLviuIqHiSa7ibZGWWExK+4AIxqmNm2gFTaEQZCq4HCMx2hG5KnH7Z9?= =?utf-8?q?YTV21ve3sDNdgxwl+7yXnrOLnliqlp/+H6w1Okai5vZkXpNz87Ovj6A53gKXPmkLp?= =?utf-8?q?O78yqmJIs5rCKROpe9VmpqN+/LGmbt2WsFo8DOzq6HSn803O2lynuNic2hiVU0iuC?= =?utf-8?q?ANJYxntT/sa67SkIMcXueHtVzKvrCinu6+awICk3fJpWrEgSG+H+GLLnS+RRGvkW+?= =?utf-8?q?HvdM4ccuuIBbiNKmmMTQzp3dG/QxQLLZhCPOxdgqT0B0tfnQ2/DMkHqqErM8E6eKe?= =?utf-8?q?f8E8K5KD9oMAlAHtQErhsMvcLYgX/emN0R/M2j7DvyaFr6UTLxlpIaZvpQKurHHpP?= =?utf-8?q?l/zGWXFmw9spZzuGRULAVePCmWEcNlub5tTRthUhO4ADdN+FDcXn2SpCIwxXqAHNm?= =?utf-8?q?fW+9zrwqbOH3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 255304e8-317e-4ac9-0665-08db8d8d2471 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:02:34.5672 (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: +rSQuygig4aqXYqv+R4AvGmDGqrURJVVwSuEQTSc5LaHpYELzGfZKP3773E1Lk3n4FMV8S/5hHCe0CEndPk17A== 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,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: 1772463389039850985 X-GMAIL-MSGID: 1772463389039850985 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/core/pwrseq_emmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c index f6dde9edd7a3..3b6d69cefb4e 100644 --- a/drivers/mmc/core/pwrseq_emmc.c +++ b/drivers/mmc/core/pwrseq_emmc.c @@ -90,14 +90,12 @@ static int mmc_pwrseq_emmc_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_emmc_remove(struct platform_device *pdev) +static void mmc_pwrseq_emmc_remove(struct platform_device *pdev) { struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev); unregister_restart_handler(&pwrseq->reset_nb); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static const struct of_device_id mmc_pwrseq_emmc_of_match[] = { @@ -109,7 +107,7 @@ MODULE_DEVICE_TABLE(of, mmc_pwrseq_emmc_of_match); static struct platform_driver mmc_pwrseq_emmc_driver = { .probe = mmc_pwrseq_emmc_probe, - .remove = mmc_pwrseq_emmc_remove, + .remove_new = mmc_pwrseq_emmc_remove, .driver = { .name = "pwrseq_emmc", .of_match_table = mmc_pwrseq_emmc_of_match, From patchwork Wed Jul 26 04:00:37 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: 126086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp177365vqo; Tue, 25 Jul 2023 21:55:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlG4612K/p82d/j8nFbOCoUCGrTecYm4H5YqitwFFQffkSXCg24yhULGD5ZY4GJ6xeGJZ3Q0 X-Received: by 2002:a05:6512:1106:b0:4fb:89f5:f6d2 with SMTP id l6-20020a056512110600b004fb89f5f6d2mr746191lfg.47.1690347322133; Tue, 25 Jul 2023 21:55:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347322; cv=pass; d=google.com; s=arc-20160816; b=A3SuaDQybzwvFm1ob0iz9HRTd0oG5G4/xtkksRb1EfixLYkFofPo3BU/xcWuR84r8Y GqnCQ0YcIadKwtsLTkRrEGv4MItw5KfytMcouYAl6hLaJVM9mzHga8fFoCSYYALEsXKy Nq80PkZppNMjSEuOJif8y7BrvtsK5GpGvegyDv4WbptpdosRRJKkoV3/sLpCrYBvaBjJ rW4r16D4YkuI7lt+o2D632BYJLfSMlBb7Ke0fhhmH4X3wAYktJ9otcY1sb+XlrP9PQyK S0K1V9lwbcPIOsCorTIzr+Hd+vyBjnzn4bIEMc2svMLhSj83QFAceVG/lV4ektmcV7oR dZmQ== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; fh=qaoyuzCS9Qfot0ptYzM89NjDvwtd+S0K0JfQxr5yr94=; b=PRpkFYyCnNCyEK1Mtm80IRiVrvMjzvf95T4urad94aBwL2T7gyu5oX3X/r5D0SZjMy lwF9viNpt6dG6x02+6pxL7h0uunm/PblGTslp6wyplIW1/MYXvFRCh9ZVA/y3rSytkzn /cL3sk2jOSkHCe5VC8hJQ+OxYpi1/MFvwq7dEQ8xwhfCtFmNsP0qEV1bF+7S0maBZ8HO gT5F4ZHAxT3fKxlNSZtafWXa1WuM9d1bMmGvawKq1ZyQpgRapSpf6fA9gG++gQxNCMYs /2f9L0rCKY5RGfbp9LHKnYAMZsQBb745v+D5BgIwg4U0xPYMzst/HqrJpqGAeda6IyPx QlLw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ftkvdvKQ; 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 e4-20020a056402088400b0052256c7633asi1418433edy.9.2023.07.25.21.54.58; Tue, 25 Jul 2023 21:55:22 -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=ftkvdvKQ; 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 S231561AbjGZELZ (ORCPT + 99 others); Wed, 26 Jul 2023 00:11:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231824AbjGZEKh (ORCPT ); Wed, 26 Jul 2023 00:10:37 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA4B955AF; Tue, 25 Jul 2023 21:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RyNmThcm1kSscq25OqpvnycHq26a4Y3cv7U1pytxIQEQTlBYBUGpFTFVgBjvUOxhPZ6zxKRg6gOoxipB3ZaaehmhIS+VlZLUIT+UWXY5MuuUqKFYBoTWirN3UICCdgEhw6GeOHgQJXLRgeXBHCPWkQGnQoJk9nuK5t8QYb0X6BW5ybzZL+UA+QXAcLCMxOmemA0idqHiWnmyNLAr0Nolrjj8q/oQd6JQLcdccz5vGo77YPW/BjyYVF1/kue+nNPrCgLKWhu6jJ2s7XgywIhYdIXzsEF480z9cS3WRUgwd8NmOHmYGZ/XvaerDTuc7UjyRNFwU/h4wcF8Ubmipvw2dA== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=HUMc24r8VX30CIhGXXDYczYM7rBNjzX8EnvSxkreGUP28PpDxXs2lzTfRbg7Hm88qKmQcAmA2yERb8R3KM/QRR/N0hSJQo6Aw8tiqwYDbAvrLbcWKZ1sLOoahi2tX34kHFxDv4NnmU/EQPQ1gdFnmv+JGU/KQC8ptA5yT3z4/OHpwxRn/C+KVX4wlWQaJ7q8+NSSNAirWu/p8GH4fCr3/sFeBBNnnQimkhIm1pPo6yFW6ehxtWLWZYzD93scHL6KbT+VCJRQVj150dNIzsOzSB14cOOC2uWX/uHFl1L+Ipcd5886ur2otIWeNABhar5GETaRGbMWufy+FTOK9MPzBQ== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=ftkvdvKQHITpamX/abaxDN8AeZeZRd/b/LjYBdiCNgSoFMKUeNgjvRz+VSy/nWkQ7kic5O7yuptqnLIf9a3f4hcS2yQwprIbADPGREnofAkFZreEcgYkOzWndtzhf/JzvPRZ/w5GzXh4YxcZeLa9WqrIG/vlRjLEOSRhxNnGcpWKz9xYrPWJ2SXYpzbwGrH8hc0XgpHKJHwqq0Zsn/bc1N3l2kG75aitHOtQ2O+Bpc2n2zo3QiNCWzMHb8oXRbc7f0bp2tNXxVruvtUdyxx8FTd6s549OKu3EpQKV9pRkFDt+nFfjtt/cB7rCe+0mHtxML65S0o69eRUtyFbsKYeUQ== 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:02:37 +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:02:37 +0000 From: Yangtao Li To: Wolfram Sang , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Geert Uytterhoeven , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 57/61] mmc: renesas_sdhi: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:37 +0800 Message-Id: <20230726040041.26267-57-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: b90602b0-d6f3-4a13-875a-08db8d8d25a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QHIaRm0sT/Rt7uqWItjN+37JinUhAOict0ZUhb04EfXXhzvgUNAWzEXReDWDsSI+jkbz/hEdfV+fhLBI+dsn4/5Fa3nIAPtgdzedzrQvPvgILqmiIMUr+qd5Ocal51jZGKqC7ElPNM6d6IeiejWMTpVw6netn6sAWbIIlnSyTRP5IvK8utwWx8TP6h6smA6Cr9LAWcUmPIRJDVLhxBGatQhvJ7fShFkHd+Kb1PXBqFAN2DOxdEM9o9cq6bAuh5o3xNy8DcxsApEe3G2vpE6fR0cQknfNugB2MlEbhDlHFA2Hv/0dw9Qc+ICgCdow3rbJIMn0hsRtTJD7b53kE2HFMQbAfYd2CpQ/JKCMFstWm5sZE3l89VeKQZQgCniuLJj8xjCiRU13PXTC3VRmALfkC53V/v4+BxVTtYXYch6vUZ24O+i1vcFkvfqwpOqW3YimkprhitH9B0h3ukklLowIJhglNYObvE4OTXK+QtZfynkfzxWaMm16ZJ2VcYsuPDSEq4db3z44gPOpLO39gX5gkunyMH0OyTj2H+kdsRGH8OgyTm0pVHSs5jPFY91oSqywp/oW3gHqaam7dbcvwRNadQevooajjE5ll3yOG9co0g1PYag3eRHtctaojywio1Bh 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?dVYS3EQqBuIEHasOYNlX9NZoNFym?= =?utf-8?q?DCFplmQQYaZFv+dYQbPyIZLYKQPKhvfhHQhJDdIGle3wsFf8fBjLz0bJOf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c3504jcklgl3LE?= =?utf-8?q?ihk0062fVP2IeUdEu80aijrn/kohC5KrpB5w+1B1FaLHrqR+GqjRejncIhKLYy25x?= =?utf-8?q?NGoRuhIMxAP04xvn5Mot5OqtcHC/O8kvdO3sLRs46EzS7yxZQLe2gLD/oUilrskQx?= =?utf-8?q?2C+tFFarKt8/ld/90iAwie2BN7FQqslAd+mv+y+YMeshpKaHDqoH/6RB43bgiWnce?= =?utf-8?q?uDtPRyDU0DF42Y1UoDBDlXeATzrELg4JR96vmxQfioqKIsYBOKJQg62c/tAPU6asN?= =?utf-8?q?iBZiL7DMuLOBWe8OSqHo8/GCo7OTqn6zHl7FalHOdnDvP+5/sIILgNtjT343cp5hZ?= =?utf-8?q?ZhRJZJILiFasJcxO0JcXyRx+QoYrMfQErQpWW97emWyKcBBNKCTr+hka1/KykdCeK?= =?utf-8?q?QjMmCg+jYl63F8HJpwEtGidHwa4oGa0baZesaOituIA6sQVBtVIU5vJJ4Qiw8ITzb?= =?utf-8?q?WBrZMxWMaMBqg/nSzg8UxmhYIqp4IPwLwRQv1fHq4WQk+b7GLz0veWZgfpeTwj137?= =?utf-8?q?/PsjkckwUprQfxla/a1+kMhubhP2k1op6FtIDPnI+UMZrXEf6sB+L/FdcVxhTxQld?= =?utf-8?q?XFf4CP10QyAK?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b90602b0-d6f3-4a13-875a-08db8d8d25a4 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:02:36.5731 (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: rCqGkKw497mu31AtMfQiwIG1rAYpUBc/i/GD+y7Uu346FNYLXToBlpyGCO0ELRRWl9j2NrW6Ii8b05lyh8PRiw== 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,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: 1772457633700099296 X-GMAIL-MSGID: 1772457633700099296 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 Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 4 +--- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index 68da3da9e2e5..c1fb9740eab0 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -101,5 +101,5 @@ int renesas_sdhi_probe(struct platform_device *pdev, const struct tmio_mmc_dma_ops *dma_ops, const struct renesas_sdhi_of_data *of_data, const struct renesas_sdhi_quirks *quirks); -int renesas_sdhi_remove(struct platform_device *pdev); +void renesas_sdhi_remove(struct platform_device *pdev); #endif diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 10dbdb4abc93..c675dec587ef 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -1149,15 +1149,13 @@ int renesas_sdhi_probe(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(renesas_sdhi_probe); -int renesas_sdhi_remove(struct platform_device *pdev) +void renesas_sdhi_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); renesas_sdhi_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } EXPORT_SYMBOL_GPL(renesas_sdhi_remove); diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 9ab813903b2c..d8efb8035b1f 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -609,7 +609,7 @@ static struct platform_driver renesas_internal_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_internal_dmac_of_match, }, .probe = renesas_sdhi_internal_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_internal_dmac_sdhi_driver); diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index b559ad38b667..248dfeef942a 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -470,7 +470,7 @@ static struct platform_driver renesas_sys_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_sys_dmac_of_match, }, .probe = renesas_sdhi_sys_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_sys_dmac_sdhi_driver); From patchwork Wed Jul 26 04:00: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: 126088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp178278vqo; Tue, 25 Jul 2023 21:58:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtDGhqTPUekYKAQ+Z89GMcIA75tK4mv/3eqhXENBFwVceRaFs7mEM5ZCyqcfBt7+NH3zq8 X-Received: by 2002:a17:906:5db4:b0:993:f2c2:750b with SMTP id n20-20020a1709065db400b00993f2c2750bmr637693ejv.17.1690347525291; Tue, 25 Jul 2023 21:58:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347525; cv=pass; d=google.com; s=arc-20160816; b=Ug19JntDCJoOz8nuushXpEl9n1OigYnYiow+OSB0DUx01vmz/GbPuWPoXQFMIi/Rqh a91l8mmFIh/rfTcE19Mq+sRiFC+Cj9wTb0c1xOFIZJw5q2fe7MELrW0iued5Tr/2eUBf xi1eAmHzVSH4egeTTaihXMzRdERaqHdYYxSXEDspkXOJVoba/H/FRp5upW4WYbhFXTWE hoYRoAB88vlpDas/MML8fW2EoaHSmHWMjqe0o1Iu2pJEXZMP2V3Agq0ZbcP1koChkZmy yAI4gboXqUq5PYuGxZ87Uks4FswpeQhBdJT6+NdJQZ+RBLWqZuO8bXdrmOerJiivo91y CsBA== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; fh=kC1CexfW9ltpXhMXST8QULziLqJSdvxMWdq29YdIdiQ=; b=AieA9S3ctHiHs6h/aAOxmPmw/kxI5xzd/OshRYwiq/frJscc6i4OfwGIl5219zglkP oAIldV2efMFbH0+g07vGCu8sOmv6CU+MSDz9m/fKRZZbK+wUFJgyDgtY2O66TciaanZh WF4JbU9pGah7kf3KdiMP6RmH7bHpkFzjeLpRit9xCLirX7opu11r2WJ6EKgpVOAxelfw o9/KMKSNjbWKdS/mNheHabS5sPuzxmlwTxGpau89xO9gKIVGk6M4hc8LSSffxI+VZ3t0 cSJ3K8aq8+3nXs7SvUc0Xj4SrlzAWanX7TzcuZV+rg6Y9KV0lhpx7pyjUI+h+x0XvLpY cCjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ItmGNLTt; 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 a16-20020a170906275000b00992d0de875dsi8774160ejd.912.2023.07.25.21.58.21; Tue, 25 Jul 2023 21:58:45 -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=ItmGNLTt; 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 S231871AbjGZEMI (ORCPT + 99 others); Wed, 26 Jul 2023 00:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231354AbjGZELW (ORCPT ); Wed, 26 Jul 2023 00:11:22 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20703.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::703]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E7B52D5B; Tue, 25 Jul 2023 21:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z3AbN0QgzaeMjss4YI+DzmixpQtGCFjJ1cYVorZaClZluUQkaxPDdM9Iezwkt8vdJ9Y5nOKvz4hWo0yVkIIoBH3zUOU34HXLzdjAzdO41FezFNtpx2sDB+SOfw1RC5o0aRR9NOBnZ4n+7LqrpqioC6guSBLdnOLf7MucOPYytGvRx/gKAFL5Ara2Q3fTmubaHEUy+nLQZKnU1VMr9SsctjfzJBuzoN+s5jp4lW5WqATas5j6qWwcgDb5C+K0V+Bd/FizTfKzDntTkZZEsaJYrgR3Ikel+iFmuNsCx8QahW77iuO72khv4M9pUCRmm8ZNl62wCenuM6PTmigDyZyn4A== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; b=DvU9+5juewwbyvdqauPEvvXe3cvZcPejy6kIiM2JM6BeqWyyvEYK8SkItDA9QXktRjqT84uP1jqWLaqZ9KZcmbE5bPWD1WsPyUgbkCm3xxfPDIQjN0rxDT3pIW053ohLBYHmm2xONluWHfHlmq4qHiqiJ3r+vUCH/sXBVPR9I3h8vs/L1Sr8hTPIMKuR7R/Vp8QdfPfC7dxtsxO7200ZojaNEbBdv5dA6y3NLyJnyKFOhy63aoQ7KsJ5U0rJNurP/AjKNMMFz4mQQk1I9Mai31CPnDB+6S3zoLR8iHH2v+fuHtIPvjZ5tMcavK7Xt8IudvRzHp7CqyttiWYKDOATmg== 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=mMjCvFA1NPvX3oCRuaryE7iTIS0yrHphNTOEU7WI1is=; b=ItmGNLTtcpbA6wOpQ5Tfe4oegCIt4ni3H9W0euiYbH/b5wbQIK3Cb0IOyrnAzxcOg1aQOeh/UXejeEZVzIu0a5kHEDGF/0+EydlKQgtMLX60v8d3Wh5M2McTAlB86MtU+3XKC0WmPyk6iF3uUxdz3ozN1vj4azF0aj2URQ5rLcgpEuIhFsIZfBGC3QpWbhjrovmMRlAoTOLdaZ4J7fgtO9UbAHymftMBS1Y9K/EkuUZX/NMrIbRW6rWCaPybE6uKWaFUTL/PS8j83tdRsy6LDXlvSuQqG+XO5EH7lSI84plHlDDm+hH9ObB1/47gHXuawFVGfRKYsSiAxKerYFwQoA== 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:02:40 +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:02:40 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 58/61] mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:38 +0800 Message-Id: <20230726040041.26267-58-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: 79bc713f-d05f-4569-5636-08db8d8d27b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JibFWY4yCYUG6UvfGGLZ38FJU/9OoFLqPNbxzsLHfCZL7BYGLwgcdBGJpJ6irir5EAKsloyELJrvEEfkt4V2zGG/hS4enC1GGJHFJftEzNzbb3bHgiKYzhRJxE/lhakj2+Miwrbd0ckmOLgrlmdU5F21KV34Ubr+K+BJKzd5HzzFYHM2/YJBC9tP8WW2DWueZpf8fwVHDZnjTXOBHY5Q7yi6l5Do7yLoAw0FgThPrXgDKAxWsB/dMLkIAGaFW6/e1XFpz/iow+Y9VumSRJizibpYVRs5qwQv+bwS4wGXZlBDtU01Lh/ypfsvEOviMf8YHxJ3Oz6Wem5iLstQP2KE8YpS0GTgjQkp+d/CusNAmApyy/GDO50GMz8Q1PfRLyE3YJyNIy+OZPiTyNDlyUDFa3rBfeMdWHznDvxfIdVYWfRSp0uOlKr7GT01sGRal1F/7U0wWxpOs/02WwaEEbm5lMIzkqPiseLFg8B6JA77rKdG18vImxSwLDJTHpWm0jyinR7ka2cvvY1jcYs04ISqWYPvaaVsbm2PhsYb6FaJOiI6/TMXxTXVerh9IEkkMOBPZS6rZpSY+ccyE9pq2O78JJAWf958mfDvoC/Zij0K52rJjX3epzKlZYCtcKyo3ZH1BwRw4dMXAXo3S++OITeZTA== 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)(110136005)(54906003)(38350700002)(921005)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(7416002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jmd1wfiwUlOm41SSlJi1jErnHQWi?= =?utf-8?q?SqgtkmRWQI9+a2CTnxOuB0uS/giqPkuy1bMUpOwKZdexrJLOtWLNq+u2IQvR/gXsG?= =?utf-8?q?BJXUl0d9S6X9B0Bm87N3morj+QKyG8E0zBZIXMprQKTyqxPMUhlCAqgza90ntuMZ3?= =?utf-8?q?gOlqybX7/duF7gjTCVkElY3Y8yfJNyzEy4Z92HXVJGo4YUsNs/Abup+57uLhWjl4N?= =?utf-8?q?KjdELB9gxNws/WW2RaY0/5v1ZLW6P3W+ECiQ57o74egE1fgTGgHnTHcAcYIYmsFgA?= =?utf-8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LB612kcE701VRlI4Rm287vkneIiOcrv8sFb4mYl0K?= =?utf-8?q?cE0SvtbQ0y6W9UJwz+LdySayCTO0Am2auaO0rROdHvWFYavCtfatLptcaPuNNC+RG?= =?utf-8?q?MOI1prsqjMhJdvNBPBKYjsz5PPX66N/PqsLYilEq5mnU/6sQKfD0b0dYLTOAhPnvs?= =?utf-8?q?KGwdu68r7tXYax66cyo3FQ+fxeixGwQ4jI0xZt8b+BqYAaCMIn/VDsVjQav4XJhZO?= =?utf-8?q?YO6yylvE76a2te+BNDEoeXV/YZSfufPahTKxiym0GWOrlV4sPNJtfpStDS70nb5Va?= =?utf-8?q?N2qwa9Ccx+wH1QPJB1JMTIUjSs1FRd5tmQDNV2xxPX5ZDC4yWGj3ZD2e92E1O/7nP?= =?utf-8?q?mNQQcPe6RwNH?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79bc713f-d05f-4569-5636-08db8d8d27b3 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:02:40.0342 (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: fEeO0mk9anSvDQ94xBTOJ/o3TBUlip1Hhx/NebhJOgi/JfCnOqgEosoetnuDXrSQQcT0Di/ZfsarxM26d1ajqg== 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,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: 1772457846554353808 X-GMAIL-MSGID: 1772457846554353808 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 Acked-by: Florian Fainelli # Broadcom Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 2 +- drivers/mmc/host/sdhci-brcmstb.c | 2 +- drivers/mmc/host/sdhci-cadence.c | 2 +- drivers/mmc/host/sdhci-dove.c | 2 +- drivers/mmc/host/sdhci-iproc.c | 2 +- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- drivers/mmc/host/sdhci-of-sparx5.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 4 +--- drivers/mmc/host/sdhci-pltfm.h | 2 +- drivers/mmc/host/sdhci-pxav2.c | 2 +- 11 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 6a93a54fe067..2e3736603853 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = { .of_match_table = sdhci_bcm_kona_of_match, }, .probe = sdhci_bcm_kona_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_bcm_kona_driver); diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 4c22337199cf..a2b6d8f2eeb6 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = { .of_match_table = of_match_ptr(sdhci_brcm_of_match), }, .probe = sdhci_brcmstb_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_brcmstb_shutdown, }; diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index d2f625054689..1702a499b36a 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = { .of_match_table = sdhci_cdns_match, }, .probe = sdhci_cdns_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_cdns_driver); diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index 5e5bf82e5976..75335dbf223c 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = { .of_match_table = sdhci_dove_of_match_table, }, .probe = sdhci_dove_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_dove_driver); diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 86eb0045515e..0dbebcecd8fc 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_iproc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_iproc_shutdown, }; module_platform_driver(sdhci_iproc_driver); diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 48ca1cf15b19..5072b59f6165 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = { .pm = &esdhc_of_dev_pm_ops, }, .probe = sdhci_esdhc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_esdhc_driver); diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 12675797b296..cba3ba48e9dc 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_hlwd_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_hlwd_driver); diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c index 28e4ee69e100..26aaab068e00 100644 --- a/drivers/mmc/host/sdhci-of-sparx5.c +++ b/drivers/mmc/host/sdhci-of-sparx5.c @@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_sparx5_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_sparx5_driver); diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 673e750a8490..72d07b49b0a3 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(sdhci_pltfm_register); -int sdhci_pltfm_unregister(struct platform_device *pdev) +void sdhci_pltfm_unregister(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 9bd717ff784b..6e6a443dafd9 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev); extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); -extern int sdhci_pltfm_unregister(struct platform_device *pdev); +extern void sdhci_pltfm_unregister(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index 91aca8f8d6ef..1c1e763ce209 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_pxav2_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_pxav2_driver); From patchwork Wed Jul 26 04:00: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: 126084 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp176010vqo; Tue, 25 Jul 2023 21:50:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlE03jNq1gh+urJpXT7aYp7rHmzoODRqhoxT+l+8VQPSTs1slfLFMJwU4WC1fRVNjXmRGiAr X-Received: by 2002:a17:907:77c1:b0:99b:4668:865f with SMTP id kz1-20020a17090777c100b0099b4668865fmr667303ejc.10.1690347021199; Tue, 25 Jul 2023 21:50:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347021; cv=pass; d=google.com; s=arc-20160816; b=Yr65nQ1Q4Em/izDb46mrewxucmCHjjOF940LrG3oBh9blHcqk1wqVnBSkVhdW9PM8D YRvyT8/bO56gkVXW4PSvQhpkax6M6Ld+cw/7pS2cFSuuHQFPHt8N+mYyjoj7dyZduhKR slTo84bugYGSfcTJ/7bGVuVFWmtIetck+S4jzcesCDb0aobhTTRUI5gAFfFLXUPhicOD xPhUFmvehvh7QiLRG1XNB1436BmdiANnDkMJmIcpYqOlf+Tg2MEJjbzIQ6o/8N/stdnE W5R6l9/adZJfpro81V9eOcuSJCGXtxbfPEh/USN9SJveV1hYQetjMEDM+iqIFOgDg3At iu8g== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; fh=7b0Y5Cx3utyrzaG4S8aa3Mo2ByBxutW+yB8187lmbIY=; b=fGTufV2YFgbtkjHTdcn7fT++ezWtLKmjksMTSUnw8dnMY54fywijPp1GYDUnr/4zY8 LrTjVpbQMq3xjGbMuuCucV1Un6jVwQc5S+SB68UEAelMDMqKDaX4jyM2sqdGqZQUT0vn 2+CdZ6ZLALb99yBhFl8P0lghjQIisSf7aNIaf9/RNZe6zpZM9mekFfQKd6jf/gFaSzlQ gRy7Rd1s7zHIy0yXd7xBSfNfTPAS1Zvs5qJF1koNrrXF5iekzpSvqyzmeoFKlp7WccAw P/EpLZKy7WQ7+jniTXP30SbGOg0/u/bJlWdiY4896T3KYHC1bqw724fx3h+iLDKcqShd y/9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=p1LexOyj; 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 k25-20020a17090627d900b00992e0f4e85fsi8880768ejc.229.2023.07.25.21.49.56; Tue, 25 Jul 2023 21:50:21 -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=p1LexOyj; 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 S230356AbjGZEUm (ORCPT + 99 others); Wed, 26 Jul 2023 00:20:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjGZEUH (ORCPT ); Wed, 26 Jul 2023 00:20:07 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20723.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::723]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDCBA5B9C; Tue, 25 Jul 2023 21:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qra3j3Y2Bt84uI9mArcwYulDpPtgSh8BY0Nq0eQDFGfYsmlo2IeCjdus6nUnAwxeGQJWnUjqRz/hMAR+6tZDqi+wt9L8r0trm520BXW2/omfLjgCmU0SPVc0tbfd3nTtSVH2icfpAl9XJibgXmUs7+O+ffeBdjMmhoybhv9XhUOYWLBsAzKwAmOmc4KOdkUievD1XO06+UPTgL9u7agOomAuVdrmowKT+MKnXV5m9LV12DHhrkHvo0q5tORTytAqz8RJ7P01O9Ur37TOmjLcISm77++oBQ/o+Bc3TYhOXF8bDsrVOkWyeda29IYqgg1ImfHCSmG8U7lYa/imqnEqgw== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=F/14DRGxIniXezdfgCrCpsVo2hpRtTvEivsLcjiwAUg8q6RziN1uL7BA0VMbomdzcPcHXzbXNZOO36Tk418fEcKe/mixzZlZgCnkRfP1Dgkk/ALHUK9cppW1JSiOK090r3T/zCC9RZtax7Dgt6VHB2okAZjburWP3FgadWRnE1mG7c0+utjoxNL8yEYQmNq9IkR20bIiztYG87RsqydGApi3Hnipdxugs0CwBCDyYFyjXauHxLnSGHAvrJWVZV+GXHRSyvvw78X+OBvo3drqR0rOEZHUIWX1v+UNPE+B3djW0EuhF6O4GENQGw2zyoB/HXDvQTtDTfXKsn9m/4WFpQ== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=p1LexOyjqnbBzq+FoyYzcoSDgywW22IRtWTdyv7SbeHEirH3FL36OYoWH91hMeTsAWdZD9h46MhKKMEgWLLv4yifLXvuFIqvs/oSz9lkYQx7hpze0akQ9VPXE86oYhr5UXLsWOlwEJaOwNTUk+gTh8FMccNMBZmeqOkuWx/DOV7p2bcC1KSEz24CgV5D/X4xbyOpoImkr+YGK++eH3MO6TibTy4yTI8wcIasfVgQJZunSgm93sH2wtcAWcLFHYp5ljDB0kNvePy7dBLTD+xL5Pk9TSSRKftnIaU0fFbSaiCSotj+29Cy+hgogRSWqpJBAo4X4fS+Ya+HWm05MJc0ew== 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:02:42 +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:02:41 +0000 From: Yangtao Li To: Ulf Hansson , Kunihiko Hayashi , Masami Hiramatsu Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 59/61] mmc: uniphier-sd: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:39 +0800 Message-Id: <20230726040041.26267-59-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: 77260e1e-3cea-48bb-c51f-08db8d8d28d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kS/072Ljm+QuZ3gkGCffYjgIRNrcJ9DcHAz9hpUY8S14vurIsNoYhZOIVoMjx2H/FJmjhH7JoJxtFIiV2/i4MY6LRHIWuvlsqz2ELxyoNHBTwUm24g0Xg6vy0YT7yN/VQiNlU50h1Gbjqsl1EbONEVRdgQWeaDT+lU9PkvkvQBe2j+7sDAU3M7xNfwy7Py3zEe66L79Tw92mNoRYHuUCGs2pkK9MIcFDO7GpSMEJCt0DAqnvbsde4/sC5SsAFAJyI48FbpRF80jVFbe3UAAq8E+9czHmsXe3Jadj2ZfThLIAzUn0x4apw49Xk3CUzIxVg4TdsT1/H2U8XHzdA/vy2pQq0UBg42WNpVpRz7bodnDou2zj+ik0m4OjjNyOZi6/WKyZ2YbyrLHGxd4Oz0opXCk/MUPPNBJRmG9fdpPv2RDOCMJQMVz/KsAUjVeSb9/T/FU4IB4nn+YGVQtS3iLkUfVtKBVpKDUBoqGAdNafGaIxuZERZjTrb2CFvNA9VhMmWGjgvlASjaJuDSqNdERM+99FgxbOPmaaj3+Y4tyimnNDWaQkuA0RQ60udgxiOIQ1g8j98o6J0eaQ7FXtZw7c+X65aTrHtWHaIoMyQK0paB1Xxj6wifssXTsqytYanoX8 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?kCVy00+Meq1it1j8//9zhbHUe8p9?= =?utf-8?q?jd5BnBK5PD3/LUwJGYcABwHzw+kOuxQHeUEErmC3GRYed8UUw/yN99/0WKFBTPolu?= =?utf-8?q?O8W0bNmHKMm+78IO5EYi2tddaA6uSZraW0BudMqIDuMdVwRpy4qfMMRabJdNrFBBc?= =?utf-8?q?KzuIlg32Ngh24FPKSZObVXmmkIlrpO9ruuCImiaCFfK4Sz8LdABD0l00NLis11kyL?= =?utf-8?q?5JYIj/izNWNqSyvdbmsmw2H3bbjl2awoZKrdykpZs4Gw2HkqRepsSAuA31akhSaq4?= =?utf-8?q?5z5wRjqr4KiQ+f+4Atk3DUmzdkoXhVHERtrl6bpt0BmzBi/T2Cp9QWm0fB6I4NtlG?= =?utf-8?q?bE8HVuxwFKJ4vxbKDZc9EfBc0tjlMve3ZAlEAVUsTc7lIu0uw5zMbVsZbn7wsaSaX?= =?utf-8?q?312K03XRqZNzbRVaPQH9WMg+HVencpP8o4XdSug/jXwFQMEx8HPjLURHr9Ixv9upu?= =?utf-8?q?BCIthyGNR+hatqF4TecXh58V3PdJ1NXB5GVEUP//N9E2OTXmRj8bG0LpNEy0qK9Z5?= =?utf-8?q?VIaBMy36jVfh+cEBw8+auTTNR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+CooLjF34mxRet3SKvoTvkUVLz?= =?utf-8?q?SAdg4UGYQYVqX0s5BOGIL1isElMldbyGYNoB7NdFuPATjx2KC/IchlZ0igw1KzA0Q?= =?utf-8?q?HUYnGiVIyao9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77260e1e-3cea-48bb-c51f-08db8d8d28d3 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:02:41.9288 (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: iA9diAx8kMtmcQ4RVlwGZy4aLJ48rKAME1kPN2SBTEr8MC8Me2QwinKFdTF6tNNZpI/03iIK+4s6yyl0veVieQ== 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,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: 1772457317949793953 X-GMAIL-MSGID: 1772457317949793953 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/uniphier-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 61acd69fac0e..33a4d1c6ef04 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev) return ret; } -static int uniphier_sd_remove(struct platform_device *pdev) +static void uniphier_sd_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } static const struct of_device_id uniphier_sd_match[] = { @@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match); static struct platform_driver uniphier_sd_driver = { .probe = uniphier_sd_probe, - .remove = uniphier_sd_remove, + .remove_new = uniphier_sd_remove, .driver = { .name = "uniphier-sd", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Wed Jul 26 04:00:40 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: 126092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp179782vqo; Tue, 25 Jul 2023 22:02:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlHQ3yFojbJromfaUE+P30sRkYmKip5JWGXTVCj3n+PCKi/MDGUQiyHu5M4qHA1Irv+VzZdx X-Received: by 2002:a17:906:304e:b0:99b:caba:b029 with SMTP id d14-20020a170906304e00b0099bcabab029mr138225ejd.3.1690347757675; Tue, 25 Jul 2023 22:02:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347757; cv=pass; d=google.com; s=arc-20160816; b=na25YR+Dd6/qZhhMcNmcRLsxzsFDTM3nEwg72bh8ZSnRxTIshLVaoeuLPKyPI/SPiJ RZ95Odhdow2NxY4luLRIs77f2Hm9BAMEoES7EmBIhWVXtpFE7+KMCHb7y3kzfTqIx47B +Yct5PPBCMLLkkj0bEYLBHep3EIJJWJ4XGjwE2hyttyVXBzC3lj/EQvGuHt41/O55bIT m1KxVXLhybxe1PEOabV0jeIxKhk8RoWUJuTDR2UuA7wtPtiLjsoSg5vamdPz8t5BwM0Q DoF7WS6lkYzGajvZqv9vekl8qGVLOXThOEhck303uKWvC1s8m6lQl9P/NMoV0P/OJhDr 2enQ== 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=E5kSZGu3d+Pk6TuHZ/mAu3D5XOULVl2/U1CyZRthij0=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=PBrPcwUh3tYboagYQ+cNtYKxm9F2/gnnB4B6YmpHCyrjNSX7i9G4P0WIjbX/owTLxJ Xj6ma54yTk7EpBqmp+fUUghXerFE/Ggrb5ehqJ3ennfq08rTCugutG798+UMub355fvp sri29HHSiaGSMFb99isuvGVsik35mQxglHMkcmqXXjzNkV9Scv9ISZRyohbMBEXzvOpS 2oIKXJmlmj5NNiYN5GnGyCxw+Ysb52DF4xHhln+WylZWQhVtbxrpaqoFOa7f5g8TRlqc mPH6pqy9Z8+VKWkT+HBe77Eu5QK8xq1RUoHjQj+LUZtEWVhm6Mravus2fXK9RmWKhOI4 H5/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OcfGKrzD; 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 a23-20020a170906369700b0099396546ffesi8590041ejc.768.2023.07.25.22.02.14; Tue, 25 Jul 2023 22:02:37 -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=OcfGKrzD; 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 S231837AbjGZEMA (ORCPT + 99 others); Wed, 26 Jul 2023 00:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231672AbjGZELS (ORCPT ); Wed, 26 Jul 2023 00:11:18 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::726]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 206B22723; Tue, 25 Jul 2023 21:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LZzz2k23tY9E9DkzcFRmbjaNpQrBOTGkJRenj75ZDKzKnDndjCmTNKIVU7/4XAbD6eFXQwut8qnbDrRokFHPaZW1zfKD/+/1ykS0Nt2y2Fc5zvcbqGdZhuhFKseMvlC4vhS+ENQXD2yEeZW4j94XDEidEM8tkYfKdH9EGksnCSWOPga04iLO2QRZZOSL4UgSBr3nKzr/wbbCae2QcoWu3MYaubo92NvQdo8tJhCv/9Q1hZnrIwrVIeD3rGy19YY7pAFa1pJEiRYxFmGEUuTn2woBkQacOqbS0upnMrxEFwqyRi8E/bKfFrIDKV7lLt2eewdGBDWcxWzkM1NuI+6jPg== 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=E5kSZGu3d+Pk6TuHZ/mAu3D5XOULVl2/U1CyZRthij0=; b=V3YF1yyS4ud2582uxEVjvzBC72F55wDH35VNgUix9Pvmcz4jPVryupf6LISrmNIDGBRTmSHxsnKxNLUdWtAwvJg1pHTfOSMn2k+OCLaoA49M+XXTiL64N4hG7/dnXaPW4OUwPwL9RD4X1Kod9IkDMCj1Jv/2scL5SMCRbNlxEXKcxXaraguFak2Y8XzUnibzzaI08YqXsC0wcYVnEtWHdw+FOdUyvyQlchblJDkoHHOhFY5whAgVv+P2qqXHbydL5JRGHBmC0uMLy8GHOsAoTaQ3HzeXAoShLZlV+YdpntTx9/Y7Qf+2fezeQ0wewByQavAO6qPFTEdYWe0e345ktw== 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=E5kSZGu3d+Pk6TuHZ/mAu3D5XOULVl2/U1CyZRthij0=; b=OcfGKrzDfFmG+sNI0yjO9px+fioRXDMmfy2PgFfKCu8Yhq6zCV7/bD3hl9JE6LPYTW7wyfOhMJcBU2o9Da+TGPq8hdsMbCcJc1E5jlrRQDFHGP9m617f0yksojjO0VoVhTE1AO8en1it1LG6AIDoVTEKLlvCYlEjjcmdK0SHt1KsBecEXEgqYqHLdLS74ODlIMaoiGgRmMVaOoU4k93Lk3fd5Wk2vx4yAp8H8e4FSJJ+e0NpyTC3pmqmefYORtBS7wlAjcRFCVvuDkRU1j1aXKdibJlWUU3NMqq0gqYtxB2Bkr+uOS+C/VnRURuJtWjcx9Ybgg8LGxVyu2gw5hvfnQ== 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:02:43 +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:02:43 +0000 From: Yangtao Li To: Adrian Hunter , 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 60/61] mmc: sdhci_am654: Properly handle failures in .remove() Date: Wed, 26 Jul 2023 12:00:40 +0800 Message-Id: <20230726040041.26267-60-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: 299dbdc6-bba1-4a3a-b0e3-08db8d8d29ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BjGX8+A+3DlKQM0PJnERwdyS1WGD5sKBYnpy2C48ArFo/Zez1KoBN56+dBIFjNU1ZqSR/M0PW4vtE4GOX1QFydUcjQOq9QISNJ/wmee9dvbWX4mnDIzys3G6yBa2I/CCarwechGswChtj9X/RjhsWeBnXWyMIQ74BfIp/1LzdaiAl3Yzs5hErdsMGnhOtWr6sKE2WGPnEG+OEseDQo53bVX50Aaccuyy7ZUS14gHEgU6rfbWBAYC7uh+4ONJxgZVDCtTEnQ0HE1A+/IhcMRHdbQq+m0Niz6aHZwLfyM2cHA0p54FVoVTFRwBW+EjrFmCaBrRTI8T5R2EayDxdz6jG9DPKNAjM7+My3f7J3eRhNVsBxx3VhEELMwzQ1hceYRPb4/+p6ngk+wRIYV2dyhOEuCNG3vblxUUYQlunDp3tM/FVtmNvsqjz5CZJ5CeyONbRG+UOYvkpv/fxGhDXC3D9XVhYiWhaThxzFYN6QTADzmXVb5uwilggNFBI6jdnw9CeuYgT+ZU/8nThEF69PDaB/qmsDvWg3lu3iS2N7RcZXLt3rq0QZj0DWKWQtpZKeuarXpwhQAquZV9B3iVX0rxG9oBjkkZ6KwUQZXDT7UorMzqTQ0Z4shI/NLytFnXMvq4Xflvf4syEWDQUO+QLU61GA== 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(4744005)(2906002)(36756003)(142923001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vTYNiWug5Rh3swS946ANa/1ZsOdw?= =?utf-8?q?m1lqbFET3ClSQo8Ro/GSFAbovWaMMa5KL2+DRT0hkqmn0C39kA3zeRTRtZFO52I52?= =?utf-8?q?NeswSXat2nA1kyStfS4XhGvqcVoQj7RqDo0/7s4PQjQEQwcXvh272fXlvCc3PMmBV?= =?utf-8?q?l5yLa7bMjyJeZxSdxY2gODQSVFrIqBUp+z9ehdohL3e3XlRKN6q9wkN6QJ9M1+Gu+?= =?utf-8?q?YC05vSmZPBM6AdJb7RGafpUBRvEKvgSHBlzg2w6Mg0/WjslTdNqdelu09Ky61BqFP?= =?utf-8?q?OvnxwwtXqTZMWfhN2vk+UoF7sgPxEgJgyEnrHqW3mALzH8MDI78BtGvpXmzxNHSye?= =?utf-8?q?lHiVPWs6RfxrxFoj2l2z3a+MLvhhxgeVteETJX+TgeWnq7OPizwJTcXaTX7/pxv0Q?= =?utf-8?q?zJUUkKtm7+TM29zuxIKuYuXG2PHvLFv2Mv4RJAWuKKA8dGxJZSbQJemTgpxOf58Gf?= =?utf-8?q?CsZqZWh61IBBis3iIHxsgwtS3TJSfVwatb9FmVyiyUAOU53Bsdy+AMW0Wj3B53JoI?= =?utf-8?q?X5gbzWo6OrQNz2noPttUtDw+evOUgnIq1uDOzKNI/LnsgNvFfszzrYgv3imfoN5Mq?= =?utf-8?q?30QsbUONF0gC9EdEOrxw8FE8uDiHeP2GjX/oKW6BSznKdPLedpTFPy+wfh6/6+jFh?= =?utf-8?q?Hbl8JlO7kh3maR2z06SfdvQ8iSqZdzm2jWRk0AZ3LA0fMTrOsxpLlNcJhIkeWe4yW?= =?utf-8?q?L7VOOKkeL1xCu1FuEc8lCUNtrtc2jyu1ZVic0B8kKucf0mt5IXiT68w2tgkxU/+J1?= =?utf-8?q?btCw3G4fJgHuMUhHegS9LtVIlg9o0gdo56Mfb6aNM1Xgs04OEE900S2kO9eXfe7Im?= =?utf-8?q?T9pgsA1BV982lRIuQ9VsAyuDlfvJRS9ZqUiJFNCXQh2j7gdLB1NQpAHkevxXuFvRL?= =?utf-8?q?DIuhZHWRxpi6x8KgZiyZ7v/2n9rctKAiRtszUrYx5YNvno3aMYwuQjEnA7sRiE/QI?= =?utf-8?q?FfjklP2iD82JAvy+bFkP9X1QDPSzinUMB53Bungzv/jRu/SpFuGHInbXpk6wI7E6v?= =?utf-8?q?Fos91AWVxjaEgtihe1xBvE18WKasntoiO20WIc4WwQ2nwPmJcbVP50+bgt2WFqL07?= =?utf-8?q?3Qlnd/in2is+q8IZf5u437Jfoib6oC6aAJis+Jciik0VLzlWBaLxyQGHhVsN19uLo?= =?utf-8?q?dsPa0+snX5yZPjsVKmycKkDJj75HsRJ6xA1ReeHIsNW2WLc938KsxP+9snhBouL1o?= =?utf-8?q?8r0VpcaVJPePbbFhgg3k8AXqjRyXEmwpuSOUEFUBC7epy05Aw8CBa6dktjtAm3l5Y?= =?utf-8?q?Dt3mf8cB5QcdEecOawTp80FJ85tMyRWtnQ5+r/8bCFznEfl+uawnsywBPsoScfIIz?= =?utf-8?q?3V03p3w3iTZFGc2pYG5wvNBr3hmB1AojmaxFyF4lK1iiIr6hy00C9w1MfWNOWzlJw?= =?utf-8?q?cTCB2Zt1sXthhu4/ajNCo72He2piV76aOe1/n3ldVqdHyFIyUjWF5brTMtjQPyMV6?= =?utf-8?q?7bC22L37D866Nsz7TF/i1yLJe+wzGVqduIfNruVwk8tofhapwjeEAN8bemQeWwPBA?= =?utf-8?q?I3ZUihzjT97w?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 299dbdc6-bba1-4a3a-b0e3-08db8d8d29ac 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:02:43.4139 (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: nzmImaRH4xntLXGWw0CUzhdvlLw31KrdFlRZ/rj7c9dTox1fVRrvKlo3NVKBaaE16qUcard734UTY14HwK+gRw== 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,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: 1772458090559113637 X-GMAIL-MSGID: 1772458090559113637 Returning an error code in a platform driver's remove function is wrong most of the time and there is an effort to make the callback return void. To prepare this rework the function not to exit early. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li --- drivers/mmc/host/sdhci_am654.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 7cdf0f54e3a5..abe83736d396 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -873,8 +873,7 @@ static int sdhci_am654_remove(struct platform_device *pdev) int ret; ret = pm_runtime_resume_and_get(&pdev->dev); - if (ret < 0) - return ret; + WARN_ON(ret < 0); sdhci_remove_host(host, true); clk_disable_unprepare(pltfm_host->clk); From patchwork Wed Jul 26 04:00:41 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: 126080 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp175654vqo; Tue, 25 Jul 2023 21:49:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0+UAPL/3P/EwB7+x5FhUgmiW89XPvkXqfbPaQQ9dJB54cGZA9uf8N9MnJE5vbTVGxstRm X-Received: by 2002:a05:6402:2037:b0:522:3ce6:4473 with SMTP id ay23-20020a056402203700b005223ce64473mr589938edb.16.1690346956869; Tue, 25 Jul 2023 21:49:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690346956; cv=pass; d=google.com; s=arc-20160816; b=jTXGVFVEauhawobiE0q1hB+t1901Gd7c52+82TFLONuhcNJQeNya1hvjGkBn6Sv9fd RijyEXFWBSqdt6vJK1wqk/oz0XFhMvZ3knfBV/Gi4GfuJ5gNL4x8SlQPSzGxWLa6DFjw BtvdWy3FCrkurbUR8Shj5TkX2hy+1tUcisGpEkyE/2i1spL+F05/EMt5I7zsEa/vk/vy Y2kkNt+WWhj/D2LEZXFvjGtzanAkXXnnRcTq32Dw7/yNb6vyl0h0lgGBPs5NhJKYnfU7 b2mQjb0FXWzuHgRCS9GBr16HLHeLbDUhiRwv36j0n75fgUyt9aPLNv9Qz/SmdP6yT8UI BLRg== 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=cJjqUjgHWeahu5kEIR/X9k3lXldr083Lgzi2wWxD1eo=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=TTAqsY/HjjQHZygtg7JhjDCYJflkVNiwJHwjCbdOFwiuUw3CFLxU1Jeq2R9KIZNza2 +tAgs6gmTabFykDRanYWyRQ40y1uNdkm2MaXX6XtqRPJzottDy7vrE3onrWtTvQ8WJ+f fXxiyaBv7O4hiYLGFB2RiTt+jiqZ3GWbtKPPOyn3HxGwaCC/5d5chiSlXE1N5A5c5bbC p/Dss8ZLGYHT5WQRl9e+DYnH5DNma2fF1KVXYJgu1RNBWvR2wVtkV8HN9Tcgs0nh5V/Y OuLG2uvDM/9Ojmfi0aUfDITeRad85cqTG5x9AJsLCpc42rQITZl0CxuQgqsfdwLB/NBy +W8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dYCKlaJK; 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 e18-20020aa7d7d2000000b005223a28fed2si3181488eds.455.2023.07.25.21.48.41; Tue, 25 Jul 2023 21:49:16 -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=dYCKlaJK; 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 S231730AbjGZEMT (ORCPT + 99 others); Wed, 26 Jul 2023 00:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbjGZELf (ORCPT ); Wed, 26 Jul 2023 00:11:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::715]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60AF759E6; Tue, 25 Jul 2023 21:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgAsCjfdC/TUybPe7ZxwmyGgNKzdlDO0oxtyHwxw1C2EnQqX2kGjFrsGkFCd4PIHLW+6FsYvJ4CaK3FW3RrPM3ZSJlHbJO6f61Lbb0nTH4z/Oi4RrY8BPXXPL5uhoK/XKkTM8x/k+RMI9HwR1sx68Ok1ipk1pBAATl8L70bF/tL0NkHAaOG/0hb1ZDQf78TRhWvX1U3AQ9lHSvrQwDVYAew3pTFhOrQ7kC7WB8ceYoiqqQtsZ8c74wOCIszujg2zrfpWpr7US7it0NjcIGCOMIEB1/ME+Q38JsNK53O2GtgUUwD3UcKz14y0Yng8sz7KTuYUprXl9qO6cK+xe4UXmQ== 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=cJjqUjgHWeahu5kEIR/X9k3lXldr083Lgzi2wWxD1eo=; b=DejwugKGuIOnjmGLkiLQov4/9RwJa1yW3zMn0jeDYg/tW4JM0/5mYwWoWHbo7GHTmjQIeTCXCVKYx73H2vL654ltkgqGntZi2s6or5HlsNHUnOe7zX1Dwl9wYND3iX2GxgD+vRqoDhcs5fNIsaqi6sksMgLAK15dmO0wvTYbQ8QSJHPWWQdnbkhSXTiikyLvZ8lHMKCLTP70OduovhC/jDLsNwWGkC26GKxKC2vNwp2ktbHtH+OGU4aUFo0ub1V0NHhhTLUJif2yEfQpDHz7ZPQ5WSLPTNdfMnFjMA+lIjLIIZQ2mN+ZqatnMS3rXd+87uM0cQmxotYZmqITiQaGWQ== 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=cJjqUjgHWeahu5kEIR/X9k3lXldr083Lgzi2wWxD1eo=; b=dYCKlaJKIj8PCUaW1/Pn4s4RQShxCdV+PdA6BdZftg2Ym8SSgbeEbO8FLjCFNfEPK+qpS83sCGtfzBqILy+4VMdZB4b1AgmkeeJy3/INu7/r0Bz88vCEwFr/vQN6j5dYOitoqCDNBt4G1KL7i7qV2vL5ZdGsyCH12P6cAVo2wJL+WY4TggQFs8y8rYCUY/HhFgXVbeg+j3oKBpfwnNEzWCnJkDC7mcq0rQrx8cSt4h+yt8RcSEebbYvjmG9xRMPcVKGhz4Nj7vBiFIhZK+MAJvFt/7qm9jcd/1xLTvHJYVfLz4cWAFScqps/7akjhY3SMw6u8vf+XUcmzmrn+b8gzQ== 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:03:14 +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:03:14 +0000 From: Yangtao Li To: Adrian Hunter , 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 61/61] mmc: sdhci_am654: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:41 +0800 Message-Id: <20230726040041.26267-61-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: d0bc3305-0b5d-4b90-25c2-08db8d8d2a8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n63cqTxZRuX5C1c58SSmh8ZcPuWf0F27TU04u7WOrmce7VpeXxft/bWrUlusJr9UUI0+5Xq6LzAsEeLxwkqxkwCA6ITl4IsCzoVOSNp3OC3ZwCpsjjMWhlXgiJUj2L1HngkVuMdTWWit5InONPFEkq4alA4u37oxPFJGXEvXfttq6HAbFT7fgrjX0nSLrRnEo4AfgvJo3kGfjts07n1hQvWbQ4rhP/BNF6Wf7z4ww+EvjKU2D2nKiPvfmdG7UIsIE/NCkgtjboobQT6zklD48+q5chyWBNtBovO3n/JlNynir64ph481Dss6Wv3vTCkEkguHokqRoDw/YXX+CDTYe3/Du2Xla+isOhyOvV89kI2zFDvbjKntmDkyDeFomz1CbEpRHV0+CSDWib1tVqxbJXvc2n8Ir7awRvM0gWDvjbknhkBxk643KDbjoc/rDs1C5+Z5u9NtWgnpJ2k2ZJzeY0pCtjz+KUt4Un/fSlTm/Ec= 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)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(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?6xnWqi13xKh73B56wqNTpGGMfkoM?= =?utf-8?q?E8vP16nVi52aO71Nk4dpfMa6I/6BYJwD2PWjdBFiqbdOLdOb/t4ti1aO2bV9yIE+Y?= =?utf-8?q?nXmYaY30dAi4VJZTrtkpkkcbcv92t5OMtc72WG8UJnINOrY7HjnaM7n/YlOleyBG7?= =?utf-8?q?tQk5t8GCGOqB5bqSOLS6XzPmqIyyc8jZRlWipNE6Y2yJxOhr77DyWwyWrYOFCrCLA?= =?utf-8?q?4b+BLE7IqiZfEJFxftC1h+YbWInoRiumpGKiZBzhbq6Hzswi5mxG5jdj9Q4DxKibo?= =?utf-8?q?y/if3RusYRC6VRzeNIwc0XxEMWTHuPnV4iTxhMKIfWAezo/4gWP2JcqWQquoAJkl4?= =?utf-8?q?U5X3mYbWAiojMzDV+JZATnKju29oUcMKXC7NwThlksmMjFal0IPUxTtQDYp0LxJzT?= =?utf-8?q?IR8otMxlC5Bot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+jG8WAGHEB38/rhec/bbBhXT3Oe1KisGpv?= =?utf-8?q?wsJMd6IiwcktGkfeUOhdso/D1BlYu+OqN4tmsf2KVvzRutzbgZtas9RX34JwhCzEd?= =?utf-8?q?CH7EbYhG1TnnNFGFReOhUe/of6UR/mko8jqGnH4QBx8NVkHFx8RoQU8W3iVgaH9eG?= =?utf-8?q?HFCYnDmpGpHlp6mGV4/+EnIcKaVDW5MLJkYSeEJKxMsicB/IZrtooymwm7zNeO2of?= =?utf-8?q?hcaHHYxz7CPk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0bc3305-0b5d-4b90-25c2-08db8d8d2a8f 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:02:44.8292 (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: fMCkyedP41wVUv3Adej1EieyyD7LzSzNalaygVgfMYvYHfpKuhkADKWJ0va4cNYo+b78S11q6GNFPv2l5Kb+Pg== 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,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: 1772457250761408478 X-GMAIL-MSGID: 1772457250761408478 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/sdhci_am654.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index abe83736d396..a6ff09ead28f 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -866,7 +866,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) return ret; } -static int sdhci_am654_remove(struct platform_device *pdev) +static void sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -880,7 +880,6 @@ static int sdhci_am654_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); sdhci_pltfm_free(pdev); - return 0; } #ifdef CONFIG_PM @@ -992,7 +991,7 @@ static struct platform_driver sdhci_am654_driver = { .of_match_table = sdhci_am654_of_match, }, .probe = sdhci_am654_probe, - .remove = sdhci_am654_remove, + .remove_new = sdhci_am654_remove, }; module_platform_driver(sdhci_am654_driver);