From patchwork Thu Jul 27 07: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: 126769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp936473vqo; Thu, 27 Jul 2023 01:11:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlG16ayurYUpVInKq09DX/J/BwZWPwsZbpSf/Eag7nbW/BmyS8+BtcyosbHSNEKlYiTOdeh1 X-Received: by 2002:a17:903:22c7:b0:1b9:e23b:bb6a with SMTP id y7-20020a17090322c700b001b9e23bbb6amr2676548plg.11.1690445503730; Thu, 27 Jul 2023 01:11:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445503; cv=pass; d=google.com; s=arc-20160816; b=VBuPbZwKJLD+k4ysUNtCKNvZPSLQD7J8cnoW0XMEQ7KjO2eghFoX95Cq+FK9Yhz+dP 5uJ8t9QTkJnsLW4nFcMNvp1xKQaUldrCB13gCRqMwNqxeFFEAbkQ+snI4u+Wm8MGphXI c6qw/LsgK4ArdMixmoFN4MGn3TjQc/nYvJiS+gSFjNow0eZKfhbZyis8UmDa1OXeAuaT iUmr6eBJvfnofwCAyxMxiohCBmB6DtO12zQ8iDkdN0LYpetiEiNcYHvSF1PaCkTlVpcD 5SiljB4Figwm8adVicKKU3wywmOqyrSLu62hS+6VQbMrWNVHnmSELg1g69Ln0UgkBncA kcBA== 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=M/0EO2kf2Q49lRe2VCBObcoL3KXt+PNTo3hlLkqulQp6jzh2xRDlKVn3uH/jCrhE/t jSxt4g9OBRN1nEJjkVR5KVdBxv5h/Na2rlXOc5/Y3fnYDTEl2CdGeW9gAaEf3VkVcLzH 60Iv/j25bccoTRqgBXduT/LRNXrU4zkDxjPSduRqsV8Ke9JMTuHkfPO30RBn5ziB3HjO ZHJBNcV0o7YgV9zfuoKN0nqibFvkeOqZ9+gfAf1R24AjE81RFLVJXytwb/Vjq925vB98 1Mj3L5JIWeJoI4ZKT8YvLZO++C4C8pNEwX/dMxzEgCXycgyXnvCoNVJW/b708DDFkp6m RKcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=RFNIOrLd; 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 jz13-20020a170903430d00b001b8920564cesi911703plb.17.2023.07.27.01.11.29; Thu, 27 Jul 2023 01:11:43 -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=RFNIOrLd; 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 S232974AbjG0HG2 (ORCPT + 99 others); Thu, 27 Jul 2023 03:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231896AbjG0HFW (ORCPT ); Thu, 27 Jul 2023 03:05:22 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE223C1D; Thu, 27 Jul 2023 00:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kiy8fpqcp+uNTV8EGISWkzfm6FYRJqrhdHDdxc6Uoc0RfOXCUKsdJzeZox4RV9pED9gWhv/VW0R22qGhNVOImeFd83pxs+Th2eyfxSxSn4vBWq97f7FrzoaMveQgTxTOJRFpL4QSI4rK7cKqjN5g8SuRorDbSB7RpKnybnjVIpy+AxHIj5s7OIGPBadMGWcF4B0KxAAKki/H0eZaTvOZ9iUd3MC2HhwwSbtub15MQPCVZ7tZmdlhJ3ORxZykJ5igfC9zOSeUep7xcL8WwEyf3aBSPpqDRwGq5gBFOYrDX8KzBqWwX5swem3nmG+pfmdsZD8tx6b3YgIe3vXTs9LDbw== 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=C/8wYarhD0g763S+2R0YVLoA8YWma4oSOAa6lSGF3wZ3Jdil/S7vy2epA05lHEiRIgiVYsMUAoz0Kv1K2vslF/g5+k3TyQT0xqjuQjDRtO3pLd9K2suSlG6TLK0vnyryuQ+h+RRxkZxNTr75M1cS0r6YNj6qlVSU2cmgFArm31tikDSOv9Vvy9CswROhAuPZjdQiXy48Nr0hh0ddQHRbL7SAx8SZApWCcrEk0dbQi9ZiYsfF6kQg5ObPzfBy4KKiIB5cf+3u8Kg3XcU31lmxiB4ulgeNH7xITCZl8jVM+iOQabBDt5RxNmV/ES5v0iCRfB75fuFhAAkNLSYS2NhjLA== 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=RFNIOrLd7nMRu6PF734qYE16QISHRovR/ECDUObPbc6D7CEGfg8T2OzknJdxboJa1X5M+B8rdCQMnSw2Dc+Y5SZUqz7k5CoXZE8Hvck9utSiO4S8u2IoJ/CNlZ1yMuQGUQ17ejRP1G7+0VqCyB7OFPvh/4stiag+9lx3MSrQvM4k4jr+2x3sOqTfHdsLOH3cG9ZYnehqcrfJor+c2OA4p50GzJMpBrCD4a3205HuYHI1XRzcB6jJgjVd/Ra2O3ykJWCJPzS59bbBGIow2HV9uW6aDh2wv350V+4mDU2xvQMYPUZhEtR+G0pIXfwZIQlYgDm7wtxM0hwTT00H0KXncQ== 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:59 +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:59 +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 v3 34/62] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:23 +0800 Message-Id: <20230727070051.17778-34-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> 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: 01ec279a-c658-4fbd-3b46-08db8e6f5f20 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6XoQrqFprSoK1KdhqPVLq7ymr3BXLNLLfQzFhp0fsXsQH3EjQp/hSaibvYZEwaEzTekM5eqHdrDotP9CK5S3S5miiIc2Au7jnRsmV7D4SUodym8TQW6/wBCc05bj2TTF51fXga60ze6k0J9q3ubgkujUmRTcwaFDiojbvke3sr+wPOGHjhSWn3Htjla1nal8MQ+dwBvQuabmOY80BIOpwbzXlF77FpNeEzibbLAPTP1KACCc07hsVLLKJzwUJxrRPRg4y+WE32jxnE9OpE5n/c8oowxvqQZtLu/J1i3DKNy8oatYfzmJRx25xGjBEfcjSzZg7RRjc9YNcMVG+xlLQCHLI/4zeuW0lshxfmXAebUbRfgtZhVByKzotu47qk5+HOnMCL47ILsjjLVozLBnwuEbqVnfXAX4YqS0rPVDobqIbO7ZZOyxL6QuKnsg8FvRG0Da8ogu7evhcJKKTJbQYJiEely7TjOpFNTXeoJF/tUsTKT9gosawC8+rlvLEllKaVLaJwESpZhxKj7vqtdqV76sE3j3EfiuRfnMGIbD1JyedgdZMirzByawLRIsIy3z9K0fOuf75wrEc+Y4VSRL8yZLqk5y7M30lC8Uxk+B9MVUB9G8M7A6VjSu/O5c5Ze 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)(7416002)(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?+Nn6h5iXTLuKFFmRnKVFXfZJfJrt?= =?utf-8?q?09+uKovAqVp+GoHS+sc6xdoOmdIHkLl0rB6KRiV4gX+kA8be5yLCcTEn/4cp4IkaX?= =?utf-8?q?z+1ahoVC30MHgBPge1FGa0WT4uCd1EZ5kLtfVe65Ev01nWA+GjFiYtOgjR0eXS9UF?= =?utf-8?q?l4MT2wZkP0y+vheG5FQp/Tr0nD1TZBD2eNRWwudwwA4P5zLH1ZpWQivlnZSvJOZ8b?= =?utf-8?q?AD99L5YT6cMp45HtNzFMzyg3DeMCvfWhiAJ1spWeJ4ObBI5QojoHJq5dlA/TIYXXZ?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SEcx6MCNiBOUMyPybcLWne7DRaY9kbTh8xGmLrj3o90u11z9txnSiiOz?= =?utf-8?q?M4cb8jD8q4Tysu7Egr6gPH/tkuZX90ZVNmpTmJMKuyBPjkS6clyfl0oK8AuX0TSvq?= =?utf-8?q?y/gz0NTQQ8SBteP3p0ZQmbcOkThce1T4P3IiYhk4vlNSRY71GTwncam9qCdpU5c70?= =?utf-8?q?hVYbrSM8H7iJXV6k8LKSMa+IufL5nwofZBezWFeyPwhLKiG1Z7H2UdArZMzvDPLoZ?= =?utf-8?q?AcGWjvkOBlnWhdccoNJSgGS4ncBxAXsSDkpVXJ57Lq1yx/aI9pmsSNCustAKmhxG3?= =?utf-8?q?F4t0EyObQuAut0WkSkWca+muInp9n3Ua+lNqqvPJNbK+hQf5jX6+0KHY1zVQmN+CI?= =?utf-8?q?itJyMhSOs99D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01ec279a-c658-4fbd-3b46-08db8e6f5f20 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:59.3414 (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: 3hzrNXyFfTDAKTY4M9mihnw0CU/7Yx41Mu+vb0rLBSrLEStUm2fN15U9PUijxzFSsbiM0rabtqPgDoODjTrJZQ== 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772560584697588450 X-GMAIL-MSGID: 1772560584697588450 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: Martin Blumenstingl --- 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,