Message ID | 20230727070051.17778-28-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 t5csp921541vqo; Thu, 27 Jul 2023 00:37:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvFZk+zEUiyrhb/2OAm4a7Dp52ykeJZuUhQJbz/bP5wOuY5Id/OlGDplvN2mKdbA6hMoNN X-Received: by 2002:a05:6358:7252:b0:133:b3b:ceb8 with SMTP id i18-20020a056358725200b001330b3bceb8mr2322326rwa.20.1690443478978; Thu, 27 Jul 2023 00:37:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443478; cv=pass; d=google.com; s=arc-20160816; b=ILwBDCwVWTv8LTm4Ds+6AfJ94Q1RMFinlnciyo2TtjMYei5T6T+oEUdscw7Tb5NPJK RV++nH+eiUnG8OiXr05J9CdhFy9Ho3YfxlPInKsHi3FsmYRDsyLa5gBwzpaRluJ9ebYC CmdO1wb11iuj/FuqtRcm0txv4PnkiIXB1T9G3pB4AzP6L/Q9U9X8nWMNMIEj34qvKguZ s5ODDPEPsplXPi4GIYA851mpqFuZmphXALBVE5R3t3yGQQmYVuIz4pdXujxTDo0q/SkJ tmTr6ohI9nk5jKE2tN/m1jwOdZJIlFnKop6eIBAkmKvjECJDjX75pPV8qrWIes2nyRfo uESg== 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=Y9IUV7J/kFE9MFDrsyanvrQH/s5FD7OGx03vZc2HdSTTnmXZ9of8vjsfhnSqbMwlcw M8X+EXgsA/JoJlbhhiZU1uoQ8v08FQvGi6b+zfpIJlx2RzvwAv096hideM0U+1fr4QHg 1Ab4+Yx9FrF1YFA5hSAEA34OSiU/w5saxw2Ft8wNSDX4OwHjsPbRiF6egIyivXt8UIbC ENp+WFpa3Dt2a3YYGaeL4aFlgVK/v4ZXWXt6RtgCovyxjqwTAUOQWcraPTbRxNp+jqyR ZSwmZGdzzwQRhLu7brSgxhlBEqaHNdEUBXntCQCV5b5EROU6oGWRgBK+R+R2e5cm3J9p sjew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=TRtFk93s; 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 x63-20020a638642000000b0056387def1d0si834183pgd.396.2023.07.27.00.37.45; Thu, 27 Jul 2023 00:37:58 -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=TRtFk93s; 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 S233049AbjG0HEu (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230480AbjG0HEG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:04:06 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFB53596; Thu, 27 Jul 2023 00:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L0YusM+X0ZlKkSISB+77eg1N4e+jpbdhPvlKfFGMpEusXNVvDb8QHE0jAU6fiW5HN4+Q8L51xBkvWLRCFWBjGCOPUWe7BaKyQuXOzxK+BtJDezm1xSe653NuNsBGWWwtZCR+i1cbo5U0MgBRCBgArYp3SHRngxbMBewFxq8pOBaU0P/sxlnmtkf1j35NGnrpf5FpWRoI9a2p7VmndWCJiHNk4sreHwP5VMLKImf+LmpWokDkYS/J2kVI5uTqyShafJLyhdsDKboFM4FPmtnU+eTHi9h039lwV12n8w167MS/lrE1Wrrwi6B/GVPHeqnRQR0yjnGg0D9bwZz6Uxx7KQ== 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=UNdp/U06KWGz82ss8T2gCX17DsxxqLkGp1+RtKnvCKrb3QKWPSEoZh9FrBA0cpeQOxbzdjV67b5ZUWw1BvPRccY/OS19l2zhfKV/v2dNhxMcRlwVx9qrD5j3+GLd5IWGsXtwH9NiKBQyK0sPpaLGBwIrU9VS92QGIkF8bykpkPLRy3XcJTYMH9lCcnV8jnIo2iqzwD8MtJq0E/jvY7AeL/F2/DPBrgwHFDlNXomwCTCokbVeVQC5rjJT04RrXbOLsPRqLRj8petQO+UdGd/qbfzVz71mRjdEuYRvisI6PH6/MxsLpWxxEaGFBgf2wWz1iPO4bRF7pF5+kit57aua2g== 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=TRtFk93sr8BUc9QyPUpgB3yTouZh00XHqPdCKKfKHR5w+h1I+NJKzXkKEpwQj+SM/x9U3e5oXA7C8KT0NqJWIc7OeT0wjt+ahhkkt30lJSHXqL5d27Eem63PQkkh52GcoTQ2BbJ8EXgBz5hZA8O3osL0dPb8c+6BZreqoqYk1TdZ1bzsQ/XnYleTVRw4Z0kSd/+QVaHKObGqoUHgvc7eWqoebpOZnwaKXZ/0RTQyyY/hwI4cr7Z0zuFetGHu1n6asZECfd/VLQMk6ggh406F9kepxz9I0s47x/IkCAfTK5LnQrfhiHAKKmD56QLAC8n8cxFfltq0IXWVI8hGM6nRrg== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) 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: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; Thu, 27 Jul 2023 07:01:48 +0000 From: Yangtao Li <frank.li@vivo.com> To: Robert Richter <rric@kernel.org>, 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 28/62] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:17 +0800 Message-Id: <20230727070051.17778-28-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_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: f5b5364a-6833-47a1-d558-08db8e6f58b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UtYvURrR1STnu4+/9sZaVcelMh7s/S1dbM2ivwJu7AnsXJOS/3caGtAsHMrmcSaoTcvVjaqO4K5UTejydt5C5lKTjqRGFgGnyu+C0PcDIiEu3UdQwjTg5Tmwhi0pkudWrZaylLNmY59AQ3HwtoFlt5wx9lryO8PRchQNbhD+GOFOvKlaSUxpgPGCFf8Esg9cYBfVtpwQc6J+fbpON8JYxXlD5HUf5+yNqAV+kLYNgkC5gcgrfL5LDO9nwLT5HwOnQD+yL0SrDOgLCQ4WrH5kDYl6IyUpuf6K3+tX732x3GIRs0TXsWaHravIYf0peHWuXiNXtqzmjv7DRUOTmddjyuuaRyoRY413/3PgHyEfkvGVfiaSmH5fL4SwR1XFYXSVUiSQlLMp1zOkGTlfBWB3s527AdXdIlx6O1nyhrnhcaeyhbVCZ2CFIQDNlON66fnJW5ELauqW+o2pLEIMldWwVvYn/HwchUNdiyQXNNE067PQuCkKaTtHrLValpZ+9UnSqfvT6OWnxtujkVW5tWE0tou82lTuWDvtGJk1AFj+1Nx5CXjCM/ZrwBkq2G85lhvnhcZ0riiwLLZCK/FTubFTDJqerkSQHQyyHiJxHE9YUsEn2AS5ws64lc78d8LW0Oxb 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kAbi+L0f+IbZZjcE8XIHx9PQu7/2?= =?utf-8?q?aRAqHICZz6VoB94nvFRvPSyvJ2Dllo8wylx99FKNppTWH2+eIkjjIN91zvUV91vap?= =?utf-8?q?+vySoCSrDBvgyWQmoowyKnUKTvrvPDCYtQwn4yQJR6kY5yFACIhF2CPvmY9VnF+Y5?= =?utf-8?q?Y5P88utJF1ugLvZuTw14BBfBVMOV9hwQIayf3F3D28NGcJNgsiWWrjruGRxWIQZ4N?= =?utf-8?q?99Od5G8QhSL2O/icVB7K5B5zk3yKh4P7u5pBAGeWDFNiqn5p9fJNDmouGiIQsqhGt?= =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9lxMTh5bwv1BSci++QjHoqNeLkssDr9SwGcHKFTQ473lEolUrFR3dH/XQfm?= =?utf-8?q?LT77iRDMH/xepoqpBOqBxx1dePvkCnaws31xvooSW1oKWH3SBb+NlEEY1mKLS9hXG?= =?utf-8?q?RLOy8CnToHGi7tc+tqcbalyFsOeJluPCmKWK3ywXlxX6xyeYMSytdV6gx/mznAF/2?= =?utf-8?q?ruOj//gezaWmHkmj7/p5aZq6rM6rfXbGGz9cBm7FmxvjrSRGpp5vkK5E0HEVKmTZh?= =?utf-8?q?ImeyPQCwhj1FX73usQzOrWdVeWUUP68xkWfJL/aXpR94vDAuN6XGrsnL/DVPkC+Ar?= =?utf-8?q?E3U7VGy6SKyzH3rvJW+vjVEOY6OrSYDlAaUQ/iPDPMWSRVVDE5B/0mp4pftmhIxU+?= =?utf-8?q?aSYwZa2c7i+j?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5b5364a-6833-47a1-d558-08db8e6f58b5 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:01:48.5703 (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: jbVJ7C09d3xje6lJP+GR2m+XsMAFlp9QX+npoXhVY8IcrPFKrMq4WK/bW7/PSyOdop9+Z7c1RoTIjNQj8v4EOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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: 1772558461034294946 X-GMAIL-MSGID: 1772558461034294946 |
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/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,