Message ID | 20230726040041.26267-52-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 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 <rfc822;kautuk.consul.80@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <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 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?eypJp7AnVCvI5I4oKhiNKy7cCZIG8hAUZM4b3hRiCtlPxsezx5mgP8SIj9TWimIH8?= =?utf-8?q?KruIisUdRVNQPYQCFOYOGq5dJmzn+vwUzQq5X+8iHcg7Xvw4KLUzlFk1sXhvpeOJu?= =?utf-8?q?riL2a6MxsTy+BZtpENOg8f5CQT7q9kxgWiUhw405FRam+t40gcu/V/ClorCq90RRY?= =?utf-8?q?Nkla+LwCvrhZa4tU1ZzSn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X/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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772460438093222834 X-GMAIL-MSGID: 1772460438093222834 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 4 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/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,