Message ID | 20230727070051.17778-45-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 t5csp961205vqo; Thu, 27 Jul 2023 02:08:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOWJ6ms70pEyGMUSyYrtAzUvxXowDoobuajjMvhjmRDxRYVxEUpSw7E3+Qk3WdPggIm77l X-Received: by 2002:a05:6808:302a:b0:39b:a87f:91e8 with SMTP id ay42-20020a056808302a00b0039ba87f91e8mr2763790oib.45.1690448920297; Thu, 27 Jul 2023 02:08:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690448920; cv=pass; d=google.com; s=arc-20160816; b=zm8GObtv59hUedI0E1ZYygu0YAp5rVq5t+8n+HNy/lZgj2S2UpxuxcJXvKhUvl9OFa FK1PtfDw86m3bQNhadoj6rtJMekQA6CVmeV5YwHUvnrvWidaSslLYEe8ipiB8YZUDHml rG8d80Oq2RAy5ETN//I4o4kGQPVXfthiXY4rgt+EWYpDQTQGYYqF5DuvnXTG3FhBUlVg an37Ks9clIYl4o3ZPuZ2PGP+Dhv/66GBP768a5BWmrpw875shtnp/3qTWJTqC9hVq1Bb kpRtXWd8lBTMyGtr8WTkPmbgcOr6bsIvmFDg8EJFBsyEQhz3WIgK9qAiFfkJBWZLFEBN dVGw== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; fh=oM1Zd0ktKl5FNilAel4zgra9YhN+SYjIN4vt5uDnwJo=; b=vlVUX6M2iPQhBAXEkHRfCcQA6O2Kc2c7FRT3PR4ixN1Fagh+ZdI8ERqwE7rAznMX+c UvsAQx1MZYo9MRFR+6GVnd17ZCvItXhl1br2Hqxsgpk0aIo7Y6WHCqpNeZ8+r5oDjmDk LP1vyA9eSt0skSGFWcengM06RyJbhDVXiSR/p2nQ1PR/chD1pGZuCKNOaiwqMyivoeGq 6I49++iSHnS7Z8Wlpx7Aoq0dObBV5AAoSVJggmnyWR3z1XDBOK9qIV2D3aXaTVBK+r5s 64H0oYxf3KoWVHnxST5p2ykC+c7bsM4ICOnLCoB9ow1hTHFEBA64T/CcBw+MIRI9X0+y m6Tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PcNHUFsd; 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 y191-20020a638ac8000000b00563e13802e8si941964pgd.753.2023.07.27.02.08.26; Thu, 27 Jul 2023 02:08: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=PcNHUFsd; 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 S232480AbjG0HIj (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbjG0HHp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:07:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD91D421F; Thu, 27 Jul 2023 00:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdMpu7/1Vo3J2bet4cJKHrcaLz00BozX2r+vUTbDZ2WTjZh1nPYAqZsn4SJLfYvv+iXnkyBcr/dr7M5B1UYDfUkfPkItmKt7WeQdaoWv3k+OhaxggND8KIJ1aEdxLfWzBuusw5W+xFNEbW3Oe6bM7mqmWeuw0XDuzIvGLW5bgYrWapl+LIsiz+3MSXVVapSssrBi0c1flxKn7VZLooDs6PQ+3prDO+2RVsaNGged0fQb4yizDQAaaYgzPHJJBq1vyGAQTpQAwhYmdPizPth8UBoCgq+mguBnb20q7dkaPNP3Xl3NsmMHZVEh31cxQuz2OnK0SmS/S3dyMjFKoc+UBg== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=RBPpy8YPSKIOy+lZsxBvGHoztLCSaKqst38YYodkE7wgPbMC+E3x16SYqQmA4p7itmQWHqLeeGzGpPc+T4Jzt/m0Bbd01doYQCGejgxVvDXxnVe6EYzLwFTDwmXebMfNsER5CwgzZ7TgJ+in9eLUInvw2zu5PsGWJ3rvlvOXOi7gVtueEiXMzfDJC5ENEuqsbUGkxp84+4qkn2bxI2IwpLCyQFOZB2ouhhDu07xooNUtJJ+SLbgZF7pMmWbXtkrFGcuHCZ+gqQlhqhAdpebr3POecDlvb64jzJJbY2OhOGH7Jikcp/4AoJFqldcqgjDxHWNxTVMHoIiD8/3gelghYQ== 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=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=PcNHUFsdriGLO2L9WjhTQrSrdnLUKa9JhqOZqB9+srnTrL26io50Dqlrh7+7oUrzC0mdfA+5LewTyzKY2W1SuRVcoa4vzxWRNJWrtOfDOK5QJ+A5yl6xPNwGQJ8htDXJDuFidO1BlXUSPYFNp/ag6M514Nqfn1PAlFmuCizUPIuZEX/VcS8CPXGLhHLjpSeyNiYzazJDAxMK8BnumcNof0jtsiN81NlJwZYtgBQUw6yaUqQcR8U9oYPGOjkpPQngL5skXnS/ytccEkkJaCR1STlFh48wjjdQdzi83HVfKIbU1hIfWqIdUx0fN3ExHIWr6ixn20rIJVX1GBbFpt6J/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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:41 +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:41 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ludovic Desroches <ludovic.desroches@microchip.com>, Ulf Hansson <ulf.hansson@linaro.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 45/62] mmc: atmel-mci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:34 +0800 Message-Id: <20230727070051.17778-45-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b105bba4-5434-418c-9566-08db8e6f6af3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Y/vM+abh0U6LcXQosZ+/PIZmt70CaZiVtG23gssbaDqsvFu9ZmSDtcnIJ6EQVlQiwinbLbZAxbiMLjSoLrzoZGKsI4nXkT40W+6pBzl6IaNFwfez0MjJ0gzGrH186vjWm9ybJ4LmGO9zohTAbkNun8vynfJDJd37jRAK8YhDJhdU44k9+DPF7hWwKIb638HO13Z6LAkw7E+bbf/Tel65pMNqHh6S11i33WfBmHr+pLh9DVHaZKhjjDvLrRJmONia9t9cpKqUFIz+qy0VKZDkdlAM2X9n4mCbg8fbSCg//hpanD6fYF3DrXaxOYLfZ3vans0VgisFj8rKCPt7u61k10710vgOtvbpKL/usII3PFipPoZ7aoPg891aREfx0L5+gLoP+IeaV0eriJOreHXVD9Y/g+ktNX0LZ4Ry7ZbVKCpoJJBbteGQ7HfhZlPIRw6OIxYRJ3ZdZoQXLkWC61CYh1S46USWKc5yOfuLNnCMC3eQ/IwPEjmchCBPJCWfir6ppYFSxOA/IEOdYszm9OHYi4uFHIC2wf+IjLEA1KW6YNHFu/WLYNSLkJR9ajQxsG315xZOAHQT1H5/KN8k3iTwMQZHX5f96iK04vjLT90lx6EVo49Kj8/OINduStv90s+ 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZIPtq/f08B9rgRJ/ZOy6IDypVxPS?= =?utf-8?q?Zw9Zry9W5HygXbrpXdcOZoVP9CF54s04hhZBuvxrjH/A3yECWSrhaYxgaofOXIFIu?= =?utf-8?q?eLi5JcpiAZMzv/H583gM+NA5cu9JV04VXpIPzCq27+zHYRJuJ5Tv8+xrkgFLN1JeC?= =?utf-8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tt8AqSBGtF79NMV0/qecofquyh4P58RRr5nbGkhc/too0dYL8MradT0MoGVq+Cng?= =?utf-8?q?nz55auAqv16Yh9YjOVjBwjQ3RDWKDQRYobxCneQ583MAuM5iY/XDhIXxsd7Ya/ihE?= =?utf-8?q?MZ5p3P6o1xs8u/abh3esks9m2+I9h74VN+4OUBx3zSVLPWgfHTTa6JD3wz/Cw9Zx0?= =?utf-8?q?9Gk6eWaodvAVgXchry1bpfZ1azHTTbaNrCx6AZ7YIAHjwczuEE1+32oEmrNukroug?= =?utf-8?q?HlF2wyOM9iTw+svv0KU7rABXLeIMYc8i8GZD3nd2ub4CK3bukWYvFHSSTT+IqFUfB?= =?utf-8?q?M45Ws4U0Dbz6ztctRCt30oUvqSCCIfKulsgaojnHYIGXHNGUSau9DGYQOy6J3i6YK?= =?utf-8?q?N7I7q10y+e9FcKqYX7RoHWn5Jv0l6htgh+ubwVReFBstmXhCulXbNmssAuEvPuCc2?= =?utf-8?q?sT+kK+6OAbMKwWuaGVyBiAoIc9fj0ouuqaqoIFS5O5hqNVSOcMYFlrh7bAbpxawUe?= =?utf-8?q?37bXZs4er66K?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b105bba4-5434-418c-9566-08db8e6f6af3 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:19.1168 (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: lxRkLBY7cG/FuHd1Uw5ri5T9PQXV6whYh43faoL7Xm8bPG7No7GvAn3eaETHzd8fWgRalAhFtmjywiCHASIKsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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: 1772564167137465196 X-GMAIL-MSGID: 1772564167137465196 |
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> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> --- 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,