Message ID | 20230727070051.17778-55-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp921727vqo; Thu, 27 Jul 2023 00:38:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtGvpkQW3nLgCSXNpB0A6Q8nPp/tm0OYuSBeewrShchtBH2BjFWRrtVb1SebPpp6OogMGg X-Received: by 2002:a05:6358:c20:b0:129:df95:f9a9 with SMTP id f32-20020a0563580c2000b00129df95f9a9mr1541851rwj.2.1690443504107; Thu, 27 Jul 2023 00:38:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443504; cv=pass; d=google.com; s=arc-20160816; b=nj0pD9nOVk89ocQaaUhGeuXQ7Kb42v2RgVCFoMaKVRmo6QpWJj9P13/BIulI5YKp9J qsGZ64FWDcHATKppjR/CHprE2bBocyN3M1cmQ6g8wa8vt1kaGhuFrYBa+sIjX4XwmPtl 2zwtQNx9mEQpWvN487b2iccKu3b7US2NwGQgdvBfyImYDyRKGG62kBcK/Zik7gZDEMUk 1zAqTNr5maJAYeJgLjaWNNBjFv5gm3ca7jq8uqtVmSrA0a7mwc/dwBYS6T0DGB1H8IUI WazqbO07Veeg87euhW62jJl9T4BkZmDS9rb9KiSDC44uBISSjLl8AfiOuhjP/B8Xqj3U t7Xg== 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=ZDaco5DVwJhyu0/RLoYojuydChMMzZG7OfRiZ+nOTmkW8zrKPb8ju3wvMm5riGkuZ2 XFyOJy3gZQBM04zYyO4aQG4bzUids3u7f4E0+oQ/L8tVfu6aCrXR+UOYTnpqh+s7lzDg aRW3k34B/XPE/wClWYEEZZ41cTlBbXsX75YPYep53FoMxQcsQHlfMqEWhXBHBBG9e7Z0 QM7V/LNHkWYsHfuZzXve0N54Z/nLMegQCgk4DnlDW6viuyUQQPi5EBPairQU4oWYICbj cbxZWV3ajimqdByIeD+B9jUDmZoIgHPs67hPLw8IF8bRi5OtqkI7p3P47B5NoSeSH52W dByw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=DsK6lYUh; 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 bv188-20020a632ec5000000b00563ddd55c6csi864543pgb.115.2023.07.27.00.38.11; Thu, 27 Jul 2023 00:38: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=DsK6lYUh; 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 S231618AbjG0HIc (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232480AbjG0HHR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:07:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28CC230D3; Thu, 27 Jul 2023 00:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJEPaObnPj4dUfnTti7hg3zYkuBsuSRjQl3K9r1T1cfLxTZ+ObTdnrKLBIrw0nRVuCrUN84jrm0VKGKk10bBbGXaw/vguLCwaooxRDrX5VWJqivGBOCvj0STSNK7CyeAp4RAbHEWYX1sCbM6cSIaIdzmKobcNtSbL/pIBK2ikhXnS+somy5O9sD0Zljv+GyLyhjOfNnp02VpUQmTnD0mzL/ApjGzxEU5C1AKTLzSVYXX3W67Fuwfn1tNnIOMLdUyObMg5/XdG1Ob5rP3P8LynjmyEdJtxxVBIVsY0kC5shiXrY968zB+PyX+kIbcSgxJEwbYSDFf0FDKDLTdspcYsQ== 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=GyDegS8k9jCpoX9bjfV2gl6CV0fu/Dny3qTf0GRR76K5oScUERcZK48u6pxVFgDI4ncjLP/kHaF+ZMZs0VVYJFa9OOxdKm7PLyTxTav+tV/HZCJZc0a5qBHTplVjZCnS61cd/cxUD0J4xdO28ql1UkbgGtZ8S1mw45nXaVk1t6zraEvVi3QG24OR0fOs6VTgq0++lKLxFpF2USc9aGcBVT8uALUsiY8qNl07d4ZoDsz0LXDLZ98mWYFTc8frh/aBdbfK0fw2spMnq0/bUXX8276l3kxAxIYpf4gnftfPAOzkpxgCpffE1ZUUiEBnPMRocXDzDN3cQA31Tp9E4yibIw== 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=DsK6lYUhYdErJ/jH2AjAKGnJhFqpasNL5QAbBhGjbyz9bjXZBlH0l7eRKsyPlL1q+nFGQUmZi/RjkrpRBjyX3IvIiqkJ+wthEX3T1z1j7RO3pNLqxLaryX3U6TFVO6HVrbQGq/sKpzH2rr17mz8gg8skdugr+hGKHPWNKH2jDxZNg6okYJnE+pxTR7u5jvk3GBU2G0vXOR1+TdgHjvSOqXx6/V7Eh68ns40SMXWjhMCH+2OQpoDPIaqP72SeUZS6cEfEwk311y7fL9NeWIfMo98yC5RT+K2NRmTgeBozXsiNqOUjh6LwmQKn3GMNQfYtY9WqSmMYrnhuF3ecy3YkxA== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:45 +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; Thu, 27 Jul 2023 07:02:45 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 55/62] mmc: pwrseq: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:44 +0800 Message-Id: <20230727070051.17778-55-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: 03f7b106-0f34-4f27-6dbc-08db8e6f73f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Tbw0nkQN63OYFRB2ByhL42oIC521u8zv3qM971wfHDkMPirHlxJWhBAp9S5Odn0wNc2uWqvraU6TtdDrqOg112KGkpjwkc3ocAsqarR9Ffa2Tfr7u4OLv7v8r1Uj9x/6uDFQ0Qad1gx+wRPrWyI1OjpPciyyFaXZCBgCR45TTjq1UZCFM0gBcbaSFkdaapdcvLZimKGfmZbeb6fYUiqCc0QykPvC6uKd/I3+DnX0UoAo9y5pIjE0aMpvl5Hy10hQvlnZD2UOn85W6acDAU51AHeRzH/KfvMNEYiedhKacG1vwov5JiQjFoJXRgUYagXm9ZXlwJy+fEsK2VpF6GEWlU4GRhqxBZdmCB/hZ2OXkdJwEfY1HuvMLw/Wf0bKVOSgdb5lJ1wHUVHOtF4dIJJi0sQK0RZRL6E1oIybugvWlqmXS+a0wBa1a7Sb6FR18lfzuoDux6Jqa2ej3alRFVf8aywOVYVT879OyMXlSB+fvDlaDr83niv5ZNlorVtQVWJv2rEuRzt0aTMdeZKowoTKKfBoHulIHYI20+zGEQ5JvXvS+hnTFlMm0L8pJ9VCB6R5RWcKcpwJu8a3nY31k8xh03wDzL+ycVWT3/QRN98mQJJHlVUx6zOx3HS3QlSNiZSQ 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)(39860400002)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dI6lHusV8dzP4EoBXTVfU4GuIt8c?= =?utf-8?q?CXhTOg9LyLzk/0+X1KB4jAZKtenJE7/mRUka8SeIjS/hnmcyy4cmf8Oox2M6xgboo?= =?utf-8?q?1w0ZT8SccQMJD06OcuEhRMAAq9J1y6K7JUx+eYxLSDgVH4hm17lju6TmVtR3wLowx?= =?utf-8?q?Hjwj84cq8M4aeOHS1OOKKR/2Pp/K7tmf8BvoFGNgHq9O1beIac37Ol12rwk6BUzAk?= =?utf-8?q?7eGTW+Frke5UzpzqJI4z/GytJpe50gBE3W8mYnGMZHuJ6UpLvBdLIUX0Q4/72OaTK?= =?utf-8?q?ItNKvFX69Fhx/AvVRe5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Kf8aggZUuW6gQ2Lc+tMlG5afzF79S1?= =?utf-8?q?uWAW/E+HKVWW0j3gRebMJu2aWVxeZbQVa6LSl3DdcEHB9294UE0rLeTygTOvQmgs/?= =?utf-8?q?i0cdG9lgoKuApXDG7kfooJ7jCJkEJsM8oLm8zVN8+MRWNFpWXB+vdLbeH1ZmHlm02?= =?utf-8?q?nM5Pnkpih3shgmmY2lvCN7BJ+y6UGMT5xNQCQuWH//c+YJK9KQyZefmX5LMFDY/Ix?= =?utf-8?q?0DKjZ03Hd0zr8MZUpAp3nTZsSoJwtRGvNQlZDY6SdfNWSnxs2v2g65QHJ9VSUAzDq?= =?utf-8?q?epTexk8eIdqsbLK7BtsGNGXC0GqMO1UBU8w/cQSIJrC35Eqyoh3efMH6w37zdREm+?= =?utf-8?q?nLCZVOtbn7mq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03f7b106-0f34-4f27-6dbc-08db8e6f73f9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:34.2614 (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: 2mq7O/EEHX8F4mf7C6dypowY0WDP9ooKCYv91/agnRphOzHzRujblEZJ+vghVhdfYMLSKT7R3s7uwd0S2jiPfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558487755575143 X-GMAIL-MSGID: 1772558487755575143 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 a.m. UTC
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
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,