From patchwork Wed Jul 12 09:33:15 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: 119035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034436vqm; Wed, 12 Jul 2023 02:58:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEN0AFLKa6pK5NgpSEAdEXlMOYmGkS1WAt66wlM8+diFORIpk7wugQxmF3cHXUGiNPC5/BQ X-Received: by 2002:a05:6808:1923:b0:3a1:9540:feb1 with SMTP id bf35-20020a056808192300b003a19540feb1mr18969339oib.14.1689155922135; Wed, 12 Jul 2023 02:58:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155922; cv=pass; d=google.com; s=arc-20160816; b=yW2BRuIPm5mjQ9WPS+vLR7XlUFSCSij15yAD9RCiRpgzwRRQIPhR90TXeRI+xcgRiH flntGkerwpR71gjwf+fza0zHWFqX7xTTrzUs30vSeheZSDBngxAxz2pKkw6t5YbENVdm qHEcgAbrcTQKQbplRYyLBFmrjhFgOUWO3K7WLUGp71w5d3Hbun7Zc3MQf53D+nYSh89f x+VJF6ENlkSUSIP4jhHUPYvGVQ/w9Hvj6i+DJaiwdRIrMzheLqDsJZXTyNrA/r55A4e+ IJfRtN6KOCtLSkHoXm705y82k3GKnfC1WCTUudmiw5L/bbaD2rOwY+b8nLVD8Sjed7Gs DSzg== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; fh=hWEChrWyK1DsQFR9vyxyrkJen4ppa6V9LyF7T4/QD0o=; b=T0Y6Tnvdb+SmRt8c9bGxM2dgOmvYKLH6xWMCrnxip8avNRM0Lcsz110XLhFd8bHZUH Z9SMWGmYGMWMAUhuk4xSSO+tRrtejqRijIipr9jaH6IgJdFliYlu4dujnTSTVLDGwvqi mxLPDmqLRxKSWCF1SrARxBdBzWrFU8RyhEKYDNNT+yzsVVMM2lFNoUj/UL8+bjP7rwgO TJYt4hIUIZpkMKtjOBZeQhtap+0qfVIJ26paifG31LAi8sQhXCj0/QnufR9ph9w6pjgi Brjw9rrE1DkOXG18/EoekTuPy966VUCxSFZ2zP2DcpWcuTwrfoLMZuFX6blLxEYRiWL9 J7ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q44B7DOg; 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 c5-20020a6566c5000000b0053ef469281bsi2811201pgw.474.2023.07.12.02.58.29; Wed, 12 Jul 2023 02:58:42 -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=Q44B7DOg; 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 S233011AbjGLJfA (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233318AbjGLJeq (ORCPT ); Wed, 12 Jul 2023 05:34:46 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2108.outbound.protection.outlook.com [40.107.117.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4433B1FE3; Wed, 12 Jul 2023 02:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SnWpmjT+Zqp6EAabjbEYB2WkFjZN+RCLh7gVFWcIeOHGdabivta+uv+FBNHyRaPkiUEeygmqPxCtH2iWFh9V2yImNN4CNRynniQHV8mHGYFCngPWx59hBOKoOvBirmqP414QBDNozkZUAkq8kbUqjM3M4lNlXi274gkWbuwC7GAfP9vIICogpYPjikiaSCmVsmlvj2Sfy8kh3hRVwgXCdOK8jpDRUUnvvp4hrofs/lB+ERNnsHQP/q993hoRenMDlDUvvZdkDn58+RuXEQdkrEuT4GU5PygvpcQGJxMf1d2FW38ZOVYwqTM9DZ0wJH0IXBbJZMcl/xZ8Bbmq1rUVbw== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; b=INzyd/BTzbyEQk/FvKowLsOGmGvy0Hcb52TRbgYhlD8oCVqGQd/ub5XiUu6GyjN7Y7BbEFxDUsD1wP+d8293v4dGoq01WUFQshSA8nOu3HA6KcT/Ab631u1jT/FJgi848u2t2N6Tj/ICJUtrkN/E16FLGcIF++YxO3i/SvMuzI+QWNnztDcAEB6NnJGAozh1oA2AglIHi9CCGdyF/WEHqMfx0zeWi24v6rmGTF2n4+Gp2vOlgwDg5Q1WJr7UWolugyY1Wu4+gZ2wYIiSBJTgKtbDIwLyDgFxbwtPdQWCcCjnbEu2RNJzXqulYwvpZLrM7cs98PQRIOyp/ofm8uaing== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; b=Q44B7DOgyIs1xHvfngKdSxVjwRWKZmCjdvouBXoCSrASCIoASTrZxPx6768/RsqBrIZLsR8qel/IKssgkT4HIyeAlla2CkoXyuuAvYnA3vPTIblQj/UxKBrFpXwpd68O6r/VYlUqJV5ocNj1ZNJsbAt4pz4QkBY/V3jMYPHSW7gPM93YgAEs362rQcXEPGW5xu2gm8x4fqqY8GL4Pdi0JvbSiJRELj1nm9bTuwCFbDZ6RwqnMkOQRvlin2jbx75BcKJ6oMsImuHKYTwrCVwK1wPiqGSL27J1MZPpFNQux78jQKlsirIRDv2zS9mICSxXazvHPUourApji/EJCdrE7A== 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 SEYPR06MB5985.apcprd06.prod.outlook.com (2603:1096:101:de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 09:33:54 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 09:33:54 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Florian Fainelli , Broadcom internal kernel review list Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/19] cpufreq: raspberrypi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:15 +0800 Message-Id: <20230712093322.37322-12-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712093322.37322-1-frank.li@vivo.com> References: <20230712093322.37322-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0172.apcprd01.prod.exchangelabs.com (2603:1096:4:28::28) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5985:EE_ X-MS-Office365-Filtering-Correlation-Id: 123b8d4d-82ef-48c1-3164-08db82bb1c3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FN5Xuuxp7ea2O7fvbZ6yyYSKGHrNGsF676HMetedTy2WIC6cuClhg1RVC6Gsnyg3xz7plbw9agiErnKTmxrNWn3bokQeqLxnaDviq5baz98ZwEx1FZ3YHltivfef08U7bkI9xoXgE+DyF8p3EfSc5CbALwlNgYB5B3jiFqlYrlEMZv1yIoh4mRiaWMyxQMp5HdYEkNN6pBj7iYxOcKWcO0fWZEyrME8HVoe/a6lHbXdbLhKTPLP+J/kmR1Za1CmCf/LL4xfKFZx/L4aOAGQ1DVQ5bGmWAL34KFuVCsUW0tkPECIwU05VtP9w0AyUFdDQS2okWRUTnwg9q0D/gCxMcR6qeCBN+/gIdZWZJRzXOw2rCifKj73vqRWvUQuzpxcDnBlBP+6A4G9dyvPo61T3qPi8OMwYxFiCQsHOcjBoEdqiBfg6IpRBUQ7zOGO4FR9g55wl6Gd0PTMcXC8Z8SY1l9bOPbPzfVE93G2BbFLULnhebrY/gwCf+U2n/hIB/seZAGIlFeMoBTOxT7HHr68WxEHEpjRn5Sh/cMNHJ74YvTIT1MV9xC9+sA++T8v3ujwt1FvAFt16s6EPBpIzwBgG0wMYGmlWsIWSyWopulfL+doA7C9/B/U/iXj4m7VKGgvm 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)(346002)(366004)(376002)(39860400002)(136003)(451199021)(186003)(2616005)(110136005)(54906003)(38350700002)(38100700002)(5660300002)(8936002)(52116002)(6666004)(6486002)(86362001)(8676002)(478600001)(316002)(41300700001)(2906002)(4326008)(66476007)(66556008)(66946007)(6506007)(83380400001)(26005)(1076003)(6512007)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ggm/6bPIk8PDwo3cqlK9yCxWDC9p?= =?utf-8?q?wecTOoXd1BbWVVbmtFwHWanaBosDoijHx9giR1VeoPTQ98zgyf3R0Qiv6/t+18eXt?= =?utf-8?q?kQAshyY2K4Akn6puAr8RpWadliAC1J5M87X2u2RVB4umampWF2DN3FzRarNvn7wlg?= =?utf-8?q?claGvXd/9Nv6YQ2zpowAtFQRknA9L/95EipYi44S1UoNsbIo83xU/EYYbCr4PaNMf?= =?utf-8?q?33VovRC0r7jNkWycRApKF8GruZzzPvrSQsB2HqqCR/kTS5MMXQEitIRNq9OItF4Nj?= =?utf-8?q?BudbikTuzAdzPbmlpSUCbH6kyLHYkfl3KOn9PR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xO8cW+NgRFgdnIk8CAinl+Ast?= =?utf-8?q?3MH55Nfc5MDnurc6GIC9uzy8FqNEEa3/Oro0tq2dcaGmGbjZ8CdKzxkyIjLPb44Kz?= =?utf-8?q?LbtEjz5bxxYo09i60dqXMTwQSZcnPwVpMPfqjftGAE2jtvkddSTI+xoHtrAIXhJI9?= =?utf-8?q?iFGgp2uLEniS27geFsHEbqvMPW6qMlKSR8DSzVc6UW8fvEyY2cxMk0tJgwjF9VOTe?= =?utf-8?q?TyHaxVfrEShg+c6DnHtfrjBzgjXeZizyIWCjMs3IaQ45iYtkwB44ofmvWsvA6l8Wo?= =?utf-8?q?KLOGGg9uUOjNDGNpwDoXm0yTwx7NvsQKIxiqtyEiZpSaSQ0/xhLq0gEsV0jCpgDAV?= =?utf-8?q?7AoU3nRLywaJ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 123b8d4d-82ef-48c1-3164-08db82bb1c3e X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 09:33:54.8825 (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: uDRMIcZfMtm9zTRjfCU8aTaMrwFUZFeasC9w+eRYEMpDs3YApps0jKihcEgJg+1VFAT3uDxi8fZSKUK6QCgiVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 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_BLOCKED, RCVD_IN_MSPIKE_H2,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771208360047764221 X-GMAIL-MSGID: 1771208360047764221 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: Florian Fainelli --- drivers/cpufreq/raspberrypi-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/raspberrypi-cpufreq.c b/drivers/cpufreq/raspberrypi-cpufreq.c index 2bc7d9734272..e0705cc9a57d 100644 --- a/drivers/cpufreq/raspberrypi-cpufreq.c +++ b/drivers/cpufreq/raspberrypi-cpufreq.c @@ -65,7 +65,7 @@ static int raspberrypi_cpufreq_probe(struct platform_device *pdev) return ret; } -static int raspberrypi_cpufreq_remove(struct platform_device *pdev) +static void raspberrypi_cpufreq_remove(struct platform_device *pdev) { struct device *cpu_dev; @@ -74,8 +74,6 @@ static int raspberrypi_cpufreq_remove(struct platform_device *pdev) dev_pm_opp_remove_all_dynamic(cpu_dev); platform_device_unregister(cpufreq_dt); - - return 0; } /* @@ -87,7 +85,7 @@ static struct platform_driver raspberrypi_cpufreq_driver = { .name = "raspberrypi-cpufreq", }, .probe = raspberrypi_cpufreq_probe, - .remove = raspberrypi_cpufreq_remove, + .remove_new = raspberrypi_cpufreq_remove, }; module_platform_driver(raspberrypi_cpufreq_driver);