From patchwork Wed Jul 12 09:33:04 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: 702134 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD8DBEB64DD for ; Wed, 12 Jul 2023 09:33:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233015AbjGLJdp (ORCPT ); Wed, 12 Jul 2023 05:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjGLJdo (ORCPT ); Wed, 12 Jul 2023 05:33:44 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C46719B; Wed, 12 Jul 2023 02:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZBCjqnEKkjqPGZu7mNI5v7kG0tFMaro+G01Dy+pWffww3d9p/ixIqb6paN3c0rxwXFv2+v137RHRZ4FGgwoWy72/yHnoyJ6KHf85sGCZVFWxWCG0qu3VYHMSBODkYWdoebmevKEeK+ig5d4xtH7MNIIV8xdEoSk0LPzUdHPI5kw8sGRAq8yzICIHwcDAaDbUqligXnMQQShE/0S4EW5nFAhNxLgJMGoBs8oLoVW0Ktp/fgelcpbx3oK4MH5UXh74E7yPyjyHoJ9bWaypvXZGTQLHYGgdL09GofrrwL6MwbFSFIVnAwUSal2YuYbGfZ/q38M+nQDRmb7qnOMd9szUg== 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=mqJOSTWVYvvDD/0geGFqcr4P4Y4fddEKafaq1JUVAYk=; b=JKIMn6MPz2aNxoEU5KSGFob5lqTjbZkXWw7I7FyMmi2ebBgB7ZjquUxuxSim7s+1P2raBMPB4pHqvztwwl7R7wRMRTOknbqE8OUyIpc7lkjxd6/8+iP/JDZQ8Zf1/Wii/VE09t9tkSt0AQqjZkfS3BAUALnSl38vC8Zh6TlsExqiuZQWOtxuP7coDR5ut/fE7l7zhnblS6HfI9zIxfvvPbLxXJroiKBhsNpVL5fgXwzaz30Z02tNvjkigkMg1fBsj4uVKCCLb4uKy8G53BGrZprPoLJQHfTkci4e4zSzMRPK+Ftk7PNb1wAH8eraB/h6rup7kXjOaoYsrjPWcCqc0w== 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=mqJOSTWVYvvDD/0geGFqcr4P4Y4fddEKafaq1JUVAYk=; b=aMRTZYaIX9MDOXsPxnC5Y8EkFmgPJaqi1TSLpzZ4zCBg2uJchEZtFchApL1qZK9JwKD3YFkpFj5CjwGXcvgBmF/2WQkqWfTwGFGq8vnstwkfkVXfxrvJ/GgbyG6I9QiXWbExQkk34n8X9RLCT/bAcVEh6bI/vF0AocvLAB6fiCNaa8nHnn5y9tHVkROrism8kImH+Wu+EfAccU16Xv9SQ7/NNtjEwSrCaAoghzmP1JIxfDDZ18gzM2Ucw7ZG8U+ljvu4Imj+bsViPlkfueK7lNV0tnSkGBRJ6i/JPJcgHOzbJScyM1tXRE5A215wrTtcjK8Tc8E6gN5V7uaEUgrLBA== 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:35 +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:35 +0000 From: Yangtao Li To: Yangtao Li , "Rafael J. Wysocki" , Viresh Kumar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/19] cpufreq: sun50i: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:04 +0800 Message-Id: <20230712093322.37322-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: abb97346-b692-43ff-67c5-08db82bb1036 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KlSF2NlGYaFhyBF7oPR/m5aBn3C2xck1RuvYPvauruVqSRp69wsaMXmcI8oSJiVD5YFBE5i8d6BPBqWxkU2zBvj/g6fzGcagsrMSsgOcMXkpEWIMjf972gJ/zJlS806HCAq2DneBaCAgu8oTP+Rk0qLhlYWGOWEnxvI1wD0aKRudS37oXnSz6fgI4+GY0o81k08FxU66LZEyKdlvuc4zi3z64/fWqeL1tZmT7gVtHgi+HoeEFw/uxygTMw3OV0gwkx7bMbM8/9gJqbYrXVN+mWPOXbQg/vkTW6RQnjfRytqrPj84L8BiGYKYStzttgnxrJ1vqVret+hHCCpkPQUZgIDK7uGiZAkPe3oloQOJ3kI9rfLBaFNCyfRxLovii5MLWQN2K9607HXo9tjooDyZPHGtC8W5h0sHIZDHR6YhjmVBhjeQKkw4ls7PApFCg+SPvDWWkKdNi3Q4wuu2sR2aR9+5hSHwVuUvLXwtsPs0WXhyoFP1NYtmJMNLb1TFUF8rDxpvbTPxWKhLobx6XGRtBMFzmFBtJAvb2+bGHZ+U8Cnzi7fBM/LNmckPSu/fKMNx18OcbsbXKE1lRgnC01GtT6g0cH1zcRtTvlM0eu5hHsPkImjWFADheu5V07hBUYlq 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)(7416002)(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?ZAm2T3Lh07bkqMApXTMWLHkORoUS?= =?utf-8?q?cCVd20gjK5t5qa17pq4gg2EZ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mzMoBczE2uFPe5+msrE9poB7Sv/enGQWMXKjrDGNK4nC?= =?utf-8?q?fN1GEhi87h/IKn8wYGfPBsUhMazkUExe8qpUAenW+1Da8p/vgXMJmZY97nCNuV9AL?= =?utf-8?q?835/RqtEXX6At4SbnfK8hjTFbcrq5uTRoB1ydJ2x2Kq6Kvvycrvvpr8NjTmJ73sxg?= =?utf-8?q?/kZiidRNvwf87OutIwZY+Nv04oW2Qv9Bh7tJZ8O93fYn4Mtc5tEu6sMlB43W12UO8?= =?utf-8?q?PcFovYzBwLA7d2itn/wNk1/PJypYvKE43kRGRLAb/gjRhINd/E+kGHTPqnV41lPvv?= =?utf-8?q?J1koGheqaMJ4u3LN8Dlj/II24W6OKXCZUyRSgpkvczNPCyecK2zhJ9uk/yXZCZ/4F?= =?utf-8?q?SbQK/PW7Xtx39gUXMpJ1BWI6rdFGR+11HqyjmCuI8JUkG941TG/TqPLa0bJG8+tgX?= =?utf-8?q?TBxwAg6PKF0oUy7z531EV2PjQ3Fyq4XeSBbFTiThnbls5wr0iM5Ni9PfEeFwx49jp?= =?utf-8?q?1jS6CF8c965bC25TNg2TZg41m+RSsryF+W4vDEUDsYt54EV7uR1loLaUdwpv412O7?= =?utf-8?q?QN5MdKrKpW+UNjobImbjaqYkx2lhJ7Iksep5uHT6WgtmRsqKB2Ac/BirUUjPkwSvO?= =?utf-8?q?mA13jRXDYA72?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: abb97346-b692-43ff-67c5-08db82bb1036 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:34.7587 (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: jMB/XgQl3/6i4sNuDcRILeYY8dVIgeOlruUIx9vqBi8RToakzs5vjXlhCQMHOoTHkYyz/tyNntHbyxb/jdWf1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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: Sudeep Holla Acked-by: Rafael J. Wysocki --- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c index 4321d7bbe769..32a9c88f8ff6 100644 --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c @@ -137,7 +137,7 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) return ret; } -static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) +static void sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) { int *opp_tokens = platform_get_drvdata(pdev); unsigned int cpu; @@ -148,13 +148,11 @@ static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) dev_pm_opp_put_prop_name(opp_tokens[cpu]); kfree(opp_tokens); - - return 0; } static struct platform_driver sun50i_cpufreq_driver = { .probe = sun50i_cpufreq_nvmem_probe, - .remove = sun50i_cpufreq_nvmem_remove, + .remove_new = sun50i_cpufreq_nvmem_remove, .driver = { .name = "sun50i-cpufreq-nvmem", }, From patchwork Wed Jul 12 09:33:07 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: 702133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE4B3EB64D9 for ; Wed, 12 Jul 2023 09:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233167AbjGLJds (ORCPT ); Wed, 12 Jul 2023 05:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233113AbjGLJdq (ORCPT ); Wed, 12 Jul 2023 05:33:46 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B940F19B; Wed, 12 Jul 2023 02:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HBE9Qk7YJGs1OBR/0XBBh1Cg7wRhiu2juLH3Mz55PgDo3FCLPkhh4DKpNUwHts1ejLbzsBt4U46ajWfec0Pol4PloWNS9ZoYahtu65xt9jCh2zaO0n9eki0H8ttUOmzyE9hu5heuHACOhrgmfi2EOJU8G2lNzXcDzZ+oXey/bdc5+IEPhsZ4kdelloso7ErUR7zowgEibiSr2b+udJlF+v6ZUs5BbYvT+5Tcqk3N0SKhlC3jDrGCQ3LE9v8eKZ6e7CiPPinWWoUDnlW2A0zDasGn149dSbeXPbTd2ABxklhVUV/6xp+tsg05uBkPbPLo2ZIumcQFB11R+7OgY+cx1A== 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=c89Uk5+QEiVyGy9EW+mO0csGCw2tVCASv9GKv0BtYaw=; b=GZ9njliHIQPf2BpZ3CYCAjGsk098ggsyiL7JkzdcNypCPiGtJXS9eU5MheZux1Pl5lH0h8J2iN9IcBYJCHFl835spi4SvlPRCXqNcuZvnf0xUqvmLSPWryvsma78HQAaZKtpF6bNRQPq5Iq6VRn9VmzDVb69gzQLUeq6Uxd5mNGyRgssvs3K4QbYpNNHtRsKEmWLt38pP3lLaATnSJTVezcgSz3nf2TUpnch2W9aFcLlTwqkcAorC8seMQUZFkEkhqhOeZ/MXJXHMlJ+DV38sHKEPiHyHCiT8Bcc5wuvFfqLxT7gC9BamrTVIn+hMKd1wVZ6fcpmaGzEWXLSWn0jWg== 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=c89Uk5+QEiVyGy9EW+mO0csGCw2tVCASv9GKv0BtYaw=; b=Tqt6qNhDZrbvGQcgOS2g7l20yU5DZhr8gklDzJyu2WYxEoS7f7PAZAV7l1lalPSL98J3Tv5uv/f0xPmdh9Z9WCvQOdJlAOzYaCc1jWUdFrtiJ7IB/P/ErYI7/0GpEuSUBK7s87Tvf/PGw+td3Ap5DalXY6x2abxCOfFP8hdktnMCvpg/gKJty2MbNgwpcokmQDlMWkb20AqIfqB4Q22Jw+9caA+KCZMiaYhAEsxL2mLwBJFlEo3C+aM4rXSXr4e9daUTotjxW+g5mn3OVipqpeEkXH89QxzC2564gDcS8TQeEAlEPxQh30jLCg7wLofUHbPCvc/Px8L2r/gxTKKn8g== 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:40 +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:40 +0000 From: Yangtao Li To: Viresh Kumar , Sudeep Holla , "Rafael J. Wysocki" , Liviu Dudau , Lorenzo Pieralisi Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/19] cpufreq: vexpress: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:07 +0800 Message-Id: <20230712093322.37322-4-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: 9a9f5f7d-838d-4fd5-e39b-08db82bb1360 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WL71Abv15elZ7rOB1HiyIKWzdKUIQ0hT1Dlv47eHSvdhQ/2i8vYM1LR1W5Iab8VKzrVtvy95L3MazEwUOMa7ngp4pFlmzNwQVBh7GeGLtk0eZ060vILRaUFMFl7/Ru3YIXNyhRBdDUdhm/0apu7P0Dyt1GQ3KFlywcPvYLCbOpqYRvYVVeZA4wojdWzemGa3DudW3SfMHAsnsqSKl7HScHJ/7TkDmi14hDD0vVGFqHOWo/k+I7VpkegkT1bXGyccM7CSIa6Vmcmh7uz1M/S42mGNKhj5+POT17r+4sU5PiI1Dw/qG02fgh7VcmIHZbZ9q9D4TMLoc/rnYOsKrwx3MfA2Xb9EDMZR+/xYcd1FC27y4qYMhCNSAWgQM7eW3BVsF7gCGXdCntGQH9QxSAy0wdOGxqJs/SXvZ07KnfQvMChIPE3bIfjH8BmK4Ql89B6sC664mXXwXsgsAPUm+JfE+wbcgU5bsu2dLYf4pPkc/78CMs3onvDaLtOOfG6phDEpX+sUo18L3ESeACpnjQBu0pUUKKyCE9kgiz0wy0zkpqdbwqn3OTJ4Po1g7VCsJ40SWdMepF/kVjYCdJkh7XWdefe33WJoqsBj16qejkuWGRduZEUsUa7mWe91u7DdWJ+1 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?msISTeoFZlZyuy68YshwYVh3+pJ+?= =?utf-8?q?6Qni277NCouLIs5dWuBUVk3LZymKgLjLmSu2i3kOD/Bap55To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yYk6pDBVEH84m0K?= =?utf-8?q?So7gAx52xfOhOv0a4Pvfd5jQl0P7TrWQg/kin4/fNoeGUWhLuU0m4NdKL8Qn0cOBd?= =?utf-8?q?y2hUJy331p4GOkIv7ITvvzz4h70emJXY93oIKYaihBP2iie/vNKqETnKBOZTYQFoV?= =?utf-8?q?02Tx2vw8RIeMQBMY8TQnoiunLgKCvGoKYVKi+mEjkg/5blu1AH6zGXezkhPsyr+FG?= =?utf-8?q?V0fJfxdxPSxFphORyQNKQXE/7IMlGWPDlpG5t2wHj6xbTC+ejsBZQvEiLYGgiuQNt?= =?utf-8?q?/iSFa5EGbih2QV1f84yG//yvcjx8iucOsqrHwKCHUPZ4hbxqmDJMyPO26ikVc4fVy?= =?utf-8?q?jjLbF3CrbCxGZsmdxXF6lcmK683UwOkZKy4UEktJ3NzXwkb3eH1xPbUZYBsjRClei?= =?utf-8?q?tjfvD7lvTCvo6LNcM8CuuPFLNgfNI09wCcQNvAz9xw+OITXUGIgrNRm171aD13ktn?= =?utf-8?q?UrYCNATTyCcm/xTtzKS8JBe8P26Dzu9J0cC4FypQtgowjqV5XcuV1Yejb3eSUlC1b?= =?utf-8?q?7ZJN87YExEJCYFoaGslzG4EDG2gEMya10vgFmEv02FERDDzubTZ2hWN5XObzVI6pv?= =?utf-8?q?98lsl8mWY3KR?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9f5f7d-838d-4fd5-e39b-08db82bb1360 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:40.0136 (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: 0KuF0DSw0+Ljcr5YsJdZLpGUfVO8+quGHITZCssUCZ0KdqIz+3PL45vEwFtE990v3gMx3xZbqNmiZKJOKWu5SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/vexpress-spc-cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index d295f405c4bb..cf33e01dfda6 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -552,7 +552,7 @@ static int ve_spc_cpufreq_probe(struct platform_device *pdev) return ret; } -static int ve_spc_cpufreq_remove(struct platform_device *pdev) +static void ve_spc_cpufreq_remove(struct platform_device *pdev) { bL_switcher_get_enabled(); __bLs_unregister_notifier(); @@ -560,7 +560,6 @@ static int ve_spc_cpufreq_remove(struct platform_device *pdev) bL_switcher_put_enabled(); pr_info("%s: Un-registered platform driver: %s\n", __func__, ve_spc_cpufreq_driver.name); - return 0; } static struct platform_driver ve_spc_cpufreq_platdrv = { @@ -568,7 +567,7 @@ static struct platform_driver ve_spc_cpufreq_platdrv = { .name = "vexpress-spc-cpufreq", }, .probe = ve_spc_cpufreq_probe, - .remove = ve_spc_cpufreq_remove, + .remove_new = ve_spc_cpufreq_remove, }; module_platform_driver(ve_spc_cpufreq_platdrv); From patchwork Wed Jul 12 09:33:09 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: 702132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 662B1EB64D9 for ; Wed, 12 Jul 2023 09:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233256AbjGLJd5 (ORCPT ); Wed, 12 Jul 2023 05:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233186AbjGLJdt (ORCPT ); Wed, 12 Jul 2023 05:33:49 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C87941A8; Wed, 12 Jul 2023 02:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfMtvB+5Qf4K+QLrWpDTRb0JMcdarprZEewLK6dSTHwbF8M4OBOW+E244Ta1TB/HF9ovSPIbwnIr0BupHgILdDj/IJKR754DEDnrZXjAiLJc2giCKdasa/jO3Fj3yd0nfBr9K+5/bTtM66cu/EatqLGv9UxjER45vYIySjg7VYcjsxj51OeQhO5ICRYlTnGCFrJd/HBfyLP2o/8HM561IcCOaf5WTlIahuHdtvtPy397rSojiZrstG8C13uaBX00BSPrImIBE7Y+x22HXhep2E8BsVuXa//BttwDpRGocf4j3qtcjHqjGqHRYsDXUZ4e6/RvgCnxfnJdG/8sCfNEwQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=eBSKq6qTlee+QE0mCvSY3ErxOososbsqDBuReMRVHpbqyme5LthfhFNdNoMdfQ5irXpMdDkikp//18DOqOmDo0q4+3Oy8pZJMOfQSvqjqabp86BPb5GEbG438P5hBfjfGowkLRlmu6QtgV/MHr2Hhox/s6FbEPLVRlPWxMwAw37ult4bHsu8rzrF7yYW9Yk7yaRKSE23p8KOlXzCESwMKYPs4QjHiFfiO/DtEWSsfju2F0m4ts7NTvaeRn13US3FahaxyLovPcNCOn+p0LxlPuFc9nN2Ynis0SScJtPSr5wz82OkoLqN1yuHktl/HaBeiTYOUsvg9LLHa/nE+appyQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=gzDZm7ghehIvYvzXwGjbU7nkhumWoem4AeMu7RtrqdLXN8ihIQT8+sOvWQCBnxSpixWv7QpNWAdKGon+mc42ZsuKdh219rKgQo461Vhikcv0mdOCH/3ROk8iDt8tS0Kz5+z2Q9YPT09t4muc7q3PyT7TGuss6e1VbgqQEOc97r17MKCvOyFSjEQEQs1s1dGw2HpPzGdwtDFrsjHyS+0UBKmNgkJ8lr1DpHcGCNjcu7k6r1CI2Pcmo44dFIlU9ZsUJCx8GTek4fy06qMwKbmOdW2g1qV4sxmuipsNtRQWJ1vXC4gv9pshlHs6as+Hwh9kjpo8pm6T+Sd5XMuc2NmwoA== 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:44 +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:44 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 06/19] cpufreq: mediatek-hw: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:09 +0800 Message-Id: <20230712093322.37322-6-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: 2d745619-8c11-483b-1cc5-08db82bb15c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u18YQH7PdgFaMzcIQ7cGGKfWilJmeX/OfjjwWtCDpsZYADxuwUCWEsGVEmFdWjnibCmCCvWRK3A8H8dWZNv3ul2hIr+0DTNe7EhePtoUCYfebdqtqLYxg1po8c21b1w9Yo9S+wt+mSacJw3cOYtf7iMNSj1T9L5Vr7a3oX8vQJ8sNbRWj4p1LgqKxMHneyEsOk3XXqozVNMo6HjkdLqPoZ9UdQfo48n0J0xfWBrYrCTrvAzCaHAx7VLKVDJuXKgJnWfFPUOFfprrZeIwSGRT4Hk4eJqy+qy1kEwVSICQSZmxF14aQwaAQNFlHRZHizg/h5dJjIIFgRZAxLcEwqu+Q1yvNcvUAmO0cRQu0SdiE5P1vFKfLtolg+73NnXwpsqeba+BEnuL0+bxubUWOR8mMS49vaLe/GUmE2LF/+tLRu6ggVmxW6Ow5vDugXBowWne2UNLynddWNcIRFU2XI65hH7VzjvSaS/K046HD0fr4GEFIJ6SOZpQS5UxI7oXedcG9TFBwLd7EFabI/MZjSifEtgIBb6RpWXBwuyQCuMSu6UTI+zJL00/HO6TFdD0I9TL5VoXilhz5NdFok/uoIlNIS3/x5aBFIt7T2QQQpOnOUpD2s9YP6BU1kd/xWHSusae 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?i5G43RHqqdQlxBfbrTBmqi3PtrIH?= =?utf-8?q?+Fxtjg2mi7mwfJeCReksxb94U4S+o38V3Yaw5bF/qBPHtB8UtvbLUU3m3Yl/2NjT5?= =?utf-8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rh9JtpPHMsSFnxcQd9j97guu7V4+NJbycTGQQcyQA9MXDnu/Oo37iWC?= =?utf-8?q?VGv487UuAvUFZn6jIgOGuZti2zmfmMi6W7Q4Frli4B0UvcyjxDV92UNObG2El2mmd?= =?utf-8?q?zIDJG54grJ4fdp8byWzdOkgv63S4DRG518lGt9aivZiJfhrPvY94Yl25eay4XZyA7?= =?utf-8?q?moFKAaL4ICATFZYedhsC4JU9yler6tqZK/gBwm4kzssV761w+tN609ZkDLKp5xYXc?= =?utf-8?q?DgLHvGMC++uYd3Fd6rs8DJmyFw05YxtTEj7YowT6wRRKjXOslZTS07yenhfBDGel+?= =?utf-8?q?MuNwE1ygSl70uq6S3Fb/S8LNM3kdw01KAvm9QB3M9SxHoUTajGRcactOr4o+au5J+?= =?utf-8?q?lFoLknx5fUsQxQtRZMg8bmcQJQIa/6hyMpmtxdm+Umgoy3Z0uJ/v+qod+i5bDoq7B?= =?utf-8?q?EashiOkmVJY5w1W5yM36PfYo1wCGTyzg7FzeHDmraRiDQjd8i38I/9VcXwqHnvlLA?= =?utf-8?q?rSXigOZHTwPIEJbT+upqFxnPfaIIQD0qXGwH57TxDUMRboZ3pQKxocT/UQxYCFqPH?= =?utf-8?q?mqtHQjMLQf8v?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d745619-8c11-483b-1cc5-08db82bb15c3 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:44.0088 (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: hPIloeMBL7jzwWCB/nvSagxLY7CuQPps6nUFHLESPoyq9RTHXU3y94Xc9sOAxGbu4HOCcSKTQpnzNCta7eEnxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/mediatek-cpufreq-hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c index b22f5cc8a463..062250192f42 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -315,11 +315,9 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev) return ret; } -static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) +static void mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&cpufreq_mtk_hw_driver); - - return 0; } static const struct of_device_id mtk_cpufreq_hw_match[] = { @@ -330,7 +328,7 @@ MODULE_DEVICE_TABLE(of, mtk_cpufreq_hw_match); static struct platform_driver mtk_cpufreq_hw_driver = { .probe = mtk_cpufreq_hw_driver_probe, - .remove = mtk_cpufreq_hw_driver_remove, + .remove_new = mtk_cpufreq_hw_driver_remove, .driver = { .name = "mtk-cpufreq-hw", .of_match_table = mtk_cpufreq_hw_match, From patchwork Wed Jul 12 09:33:11 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: 702131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F02D8EB64D9 for ; Wed, 12 Jul 2023 09:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232871AbjGLJd7 (ORCPT ); Wed, 12 Jul 2023 05:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjGLJd4 (ORCPT ); Wed, 12 Jul 2023 05:33:56 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DA921703; Wed, 12 Jul 2023 02:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+mePwis9j43fdouDQcS5oQ1CfzMPOOTMvw9fDJfJKVvHLKgtqBuLgsqTAOscyLxb1PdC4izfOMkcTawLMBx9PEgSBeAvqeLWHla6rWWx4rHKevAcUZ0ViY9HyJFCiVe0dTneLKHkD/sgPMXBoyUCoOghRID1Ssg60CCXG7a3KbXDoILXOB8XEqgXsQd6lGBN87MjyfT9aQTJ0wartgO4rMyzclwMaoz0gb7xz0ABG+g5E2V25o9WFYi60tUiCd5qIo3kD/Ze2X4kZYPJDo6W/gRkFrhXQasNWWCnjkOrvCMYCx2wwewtPMqfv/+F0bEH5uilHkse9q1D9RKtf+4KA== 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=jbZ+0WrsTdQ0/jo/QyZW+/XbcPYMp7LBIjLgnvIrU9o=; b=RKAW6iJrXhE5Tudrh3x7oxC7313haan4Ickudmx3CXN/lwvjQNIEKpUph/U4lM070/efRIQJX1po4N6Reb9tzBX9C0Nisjeym3edoPSKpNq9/9TLGOv+COTGuMOnNK9fy3Q6DAaa7XLo4L1WGAUTuzdqxYou+VQngTN6bYvg1QrwoAozKPrdKxHBJ2QCOtTqoidrCO6mImLqdzpcO0T8RfT25IP3SQSKnNzS2InAiDu3/BSOz4n2bGrLrtGRbMdKHrEzdofcJYeiOR3PAr+T62o3iJLLizS7riVcJIHNpYCgAtqP7T5gXwNpCEHZ06TzhYTs3aRgBgr4tXR92jJWKg== 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=jbZ+0WrsTdQ0/jo/QyZW+/XbcPYMp7LBIjLgnvIrU9o=; b=djMwyIy6OYc/HaN5jyExDA1bjvet2OtpcLEYsoQU1FEnNCHxpD3h8KZM50ZiRTW5bjzg/SWr1aPWCqyj7zZADioSrE5aZZhDiISjrVYSVrEuDNtnkBv3eWtbdwVDVjjBdUyPxmDf/MLy/WJ9QIsFZu4k5efWK2GyMIsXD7VhdKGfc4rkmxjkXtWmSDgRn7/I71dxsw2WgFSPaSmO+V61DYKgMUcBY3Eek63gZwXTuiklBbdcvMO75SWlHClfULuxzuqI9YBG3QSyDw/Q396HUnVYb7r5zrU7QXN+oJmlnBqw0rX7HRcTJ2S8lA5grTGQG7/mDJadH6qfXDKPMLYxoA== 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:47 +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:47 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/19] cpufreq: tegra194: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:11 +0800 Message-Id: <20230712093322.37322-8-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: f5b559e9-10ed-434b-5f21-08db82bb17e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CkQqh6LoKDpp3qDLTEBXSwZOI4X042Jd+nOFuuZ6h5dgHAePWFkldjwjeMjtIYLdHij17z5yYsIdqfDTSfH4MyeySMFwwAL2XZK8eegSTFL0VekXBgtWmx7bYWQ4m7kwb/La9ATVPsNTBmDHOhPZdLsK76Evg/nMommV8hS7ycAUyDUFqq47GNLFpjv9vngsaJt6M4Zt4rEpRhFo5Jp3w1U6jKSbL1p+YZgkleI6xsdZjufyImO4g0+GYeDU88TaTkQxCTud9Q/JSiSiow4/K3OL7MGTzbpE7hUECVRcu48IPteZB7tSgkUDB1bfsQ7QWB/N8fUPJTrf0hznGGs6nzTR7kwez+/pPdhrVgJW3i2pk7+4sDLlrlxyzyqLG0IhZN2+W1zBaTiBfjLwaioNIm2l54jjCdrV1oT2/jJoSqXmwlWb2fkS8C4dtuNJogmE62SiCRDsFo8ZNgCcvWUyJ+ZmWg/lniFjZbVyzrcprNYvPYlOwK9+EZPeafpQ1sAaDKX2KNzk4JNA2NoueEOEfGLg2TTRoPzZ4qPPCKFR/c1/ghyCQ6hREREP8TYrCrTUJbCMoM47LIBBhmJuLOux3Odrg6eXr6el2syynvKkvruuJs262Znd8elznfl9Y1l9 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?JoKGE9/xyagXgUg9a1Z+gzOduT08?= =?utf-8?q?cvu8iKhdiMgr6Yipx/nINd27+j8IMWnQnKLbnwLapIhbsa1g68K6AxVKiOEqEchPl?= =?utf-8?q?iWg5/a5FH3xCO4MPuGZRzYoGDf51fqCZkR36eHZd04Y9GHz3BazMoNGjHoYr9F4Mw?= =?utf-8?q?7skdZZV59HpgnQCdQ38j1Bsqwxv5KdWGIQwrBka8GHmI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TZkyxu/WrU7uz6XjwkvUu6rUhd35S3ZV?= =?utf-8?q?25V9mXHqaD3dRjWo4s4PTXSIaliUvl2jyWPR8uL5TtMSBASAnzJwSC2D6P1o85gAn?= =?utf-8?q?uyeZLaJ7NAtA0qN0NzBX5GsUx406P8dPm6YPyhDi79wH8oUkdRDDUnQjkJlgdQwrg?= =?utf-8?q?+49Iw5IQfHQGldr937LFHHTheEE0RYORpeD/9v71l6Wj5D7jbQxuWw+vLddHZrG+W?= =?utf-8?q?sc6TvSih+HqvAfk/AOMpgiWi4qSINDizNa7jD3NO75wyQXb2ZPpVgmj2v1ER9Eqqt?= =?utf-8?q?Tl7e3EIZMU2IJC+LBRTxNPzUjbUCagDr6JEuAmG1PwvJhDhp2t1mY2wekX5m0KXKk?= =?utf-8?q?16W61oco+AkSqN7ajyMXOtrSL/h/NJDOk71dqwwN3/2Zv4hSxe2lIGDqp4i1URDEs?= =?utf-8?q?UFXUu6tvvGntgJkkFAslNRo8eHpHEOHqNIgwcr1nW+yQbSsdDucGDxH0viWdwKVD2?= =?utf-8?q?M2/kx6FHYLiU?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5b559e9-10ed-434b-5f21-08db82bb17e7 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:47.6014 (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: ArlfFhyMdCwxxl5Y/PDbthFt1UgKB+5dnAkmnTPcQl2XoVlw0el94vxjOMjP3t9Lp31u2iqEurbW6fRbroGfuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/tegra194-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c index 36dad5ea5947..c90b30469165 100644 --- a/drivers/cpufreq/tegra194-cpufreq.c +++ b/drivers/cpufreq/tegra194-cpufreq.c @@ -708,12 +708,10 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev) return err; } -static int tegra194_cpufreq_remove(struct platform_device *pdev) +static void tegra194_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&tegra194_cpufreq_driver); tegra194_cpufreq_free_resources(); - - return 0; } static const struct of_device_id tegra194_cpufreq_of_match[] = { @@ -730,7 +728,7 @@ static struct platform_driver tegra194_ccplex_driver = { .of_match_table = tegra194_cpufreq_of_match, }, .probe = tegra194_cpufreq_probe, - .remove = tegra194_cpufreq_remove, + .remove_new = tegra194_cpufreq_remove, }; module_platform_driver(tegra194_ccplex_driver); From patchwork Wed Jul 12 09:33:13 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: 702130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F27FC001B0 for ; Wed, 12 Jul 2023 09:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233232AbjGLJe1 (ORCPT ); Wed, 12 Jul 2023 05:34:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233272AbjGLJd7 (ORCPT ); Wed, 12 Jul 2023 05:33:59 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9AD119A0; Wed, 12 Jul 2023 02:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GcvMKRIXzEVZwyH6FN2emI5iSmvNsQ8DztwmSaKDwwkcEX9X5GLOieRPMH9CqmffaTBVYjGCxsuZBVYGKXrU+kTJRuSN5cBU+QsmiILj9UsTPDcvsRYrZ5Fn0PGDYxGQE2eaJHScc72dvi+qHXNyLjBSVqJbEPIWnriB70QvDIdlizYubeGKIGTIMMPhyDbShNBTAGodfrAzgAmFyT1/BDJfB6/R+HIPjt0Yw/F990deAEuEwr72jDVsXzDqNGGmmI2V6KQcFfaF2bsrTznxWp7Hv1Z1tM9gU7acQdFudRCcYPvlaT7fOlLQzHBVYkBqZxHrZz0n4jPGxxpB2vN4AQ== 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=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=O9guvuIeHI4wtCwYLdyxx/6OKb4aio3nHjMnGx1SavJA4Vsxz/oJGDe1ZCviskwxnZQV0DjD/nUA3ioiRYUeZ2P563iUgl8ORKLwT56Rf6tfJPkQh9TTZQAt7bhylylhatnkhd9JCH+XqvlrVIS7NwdEno/FjU4fLe4fAiymxQBjXI3SN/QQTV/fqMc2LHZdv5vDShwL22razErN0VM9dMNHJV9UihygkqgdJCP38x/pREiEDjC9w6H6t9bwhHuBsbegzW/jfiFM3+m+1yUKO1YIkdIrFMsxZu6XG0U8wQ+ngHU+EWXjGgv6IqFi9fkSW0bG6Htl/oXDRZOMGQZChQ== 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=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=oqhemZW5WRABsTPJ07ApY2jS8FE0ih5yT1huvWTOElYWTKANHEPsNpEIskbBDK7zNAbmeU+sA3QXJnRYSI3aLSyncdJn80YE2msL5Dqis40ai8nNfH/9WuHKZNI730SEcWm/evt0+63WJW9DJ4dwMoyxF5ld5mVyr8QLWTc18BX1SCW4w0+uwxY2HcWyCOBL24GOCc5HrYgbtA8k8UCGdzkNgwfIw8LmssICvbrF/5aQMO13zI0LmzSgSAo+Y0teM4YjQnMk00C1vU2gno3xqWo1pFKG8HYl058xsacitHb9f/VwM0wmRh/SnzCnFk1FzyehVk4NUqOQtn4nDPZSGA== 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:51 +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:51 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/19] cpufreq: imx-cpufreq-dt: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:13 +0800 Message-Id: <20230712093322.37322-10-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: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MpceXVcx25I1doBJ175W1Bvvqa6tUhZ1Z3FIuP5D5zcWw0SCo/qGGAAaX9lw0qunVtUjYb4BwuqNTjXpe24jGsmtuyufrxnXb/IKkSrdFhl78zryvonBOWNOkbJKrsJwLmTArylrSOHonh9POCH033WsZg5XsfI6KGTxPdKRtJifCPHtdkX4AqVeWwU7GiIp4ZyZkBNMDr9WxG/T5r5LYuM20uR0LeItmIdIqIjK4ClFx7RAvQZsC3eJNKvdw1GbQGDQZw9U1HFM86BoVSS/EmQ0jJ26ztcyv90knU/8u1g3Q7Y5hEM4aK0aabcjjC9wfMZd2pWCPPPt0Hsf3zKgkh+kiCmdDorrk9y7xR3sorR49QXiGzWX25rKWCxBQu4dYFBYOa+CsME2oNpi9wgu8UsV35eaTTBo4ubMesd1DZKE23u264n8NkgJtJWQhfdVKGWBGTodd6PzAqeMfagZ2UGPCf0HV9Y10AavB5WBr8RtTavH0qRjIN3Pld57Lb0RUQAya7fZP3iZIFpQ0z2XYaoemj7ypovqkvYWWnVgLR9ZxUEg8/zDCV9bPHvtQUmmrRftpaKb3hLp+E96yzHmCAZbskihID90+RiBA06eEnmG6srSj0klj6VinLauvID4 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)(7416002)(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?9sSZ46VyUGCjeRUxDp5/6Ax1NdLk?= =?utf-8?q?WSqYNM8zvvrfa7oQ9JVJCjPrdJVKf4bw/5XUv9GGCBx3m1NyWKK5afW7A+Z981fty?= =?utf-8?q?oZ42l8MAytTzXPwPv9ZkQFUw+5qXOQRklDRHPLBvAOfODwcqsM7TvzSy5fLuE7/UU?= =?utf-8?q?UU2yF/cB+KZPhwU4DbwbhgCn6vskA+0kc75PfY/0Woo4T1t+Lm/0pZ8a6hv5aqYS4?= =?utf-8?q?K8qZQMisXj9t07mfAE9RA/K4507zEZy18q+scEINj8Az+0rXrdSO7r8j03uF2foL6?= =?utf-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YK162NfTgzt3hKcKW+ROTSHxOume2mX0ExHpo5S11cESCpYWy6HHsVzp?= =?utf-8?q?18ZT0C66TDJldQcnt8IslPAmIbaEZ8JhqJTjOSSyFsBw04XFMx2jThizhsWqrQZhW?= =?utf-8?q?CocRIZPM2HxyXN/PrFhG7CbJR4ymSVRRguoremh3ICahNpCy4Krcbx6JxbuNCefjj?= =?utf-8?q?PWjGCPWzhWgDyK2baKJV9+SZc8e2t9Y3bAlrDF1OJcDLME5g6rlv4cJdK3OX7921l?= =?utf-8?q?sgKXUGFOLNu3jYafcBlePv/Oz4bSmtVB/ZG2zisTSCUns8wSnCezvPYdvVWZ5vSJ0?= =?utf-8?q?HTx025ecCfJFASa9WRjPGgUl7SgxZPQFMNlhJZgNP4ZJVyxGjzbBCQcpr5AYu+VXm?= =?utf-8?q?0YnLS/rVLcIx?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 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:51.5357 (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: XmqQVDvEVxDYXAeXN6hLs7bMbwBQB9NpDChTM9uiTELkaZS8HVq8sPesvTz4VIcQRLJz9l918fFXmNgEcoR3TA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/imx-cpufreq-dt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c index 535867a7dfdd..577bb9e2f112 100644 --- a/drivers/cpufreq/imx-cpufreq-dt.c +++ b/drivers/cpufreq/imx-cpufreq-dt.c @@ -172,20 +172,18 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) return 0; } -static int imx_cpufreq_dt_remove(struct platform_device *pdev) +static void imx_cpufreq_dt_remove(struct platform_device *pdev) { platform_device_unregister(cpufreq_dt_pdev); if (!of_machine_is_compatible("fsl,imx7ulp")) dev_pm_opp_put_supported_hw(cpufreq_opp_token); else clk_bulk_put(ARRAY_SIZE(imx7ulp_clks), imx7ulp_clks); - - return 0; } static struct platform_driver imx_cpufreq_dt_driver = { .probe = imx_cpufreq_dt_probe, - .remove = imx_cpufreq_dt_remove, + .remove_new = imx_cpufreq_dt_remove, .driver = { .name = "imx-cpufreq-dt", }, 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: 702129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 640ABEB64D9 for ; Wed, 12 Jul 2023 09:35:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233288AbjGLJe6 (ORCPT ); Wed, 12 Jul 2023 05:34:58 -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?BudbikTuzAdzPbmlpSUCbH6kyLHYkfl3KOn9PRUWfFUKqZZcK+E7aIa8EFSHa44Kw?= =?utf-8?q?kCrcSQ8t42QSZwpjwaYDCdBqPZuci9qBxj9Dee23fEcuzx6HWZw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zxkyIjLPb44Kz?= =?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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- 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); From patchwork Wed Jul 12 09:33:18 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: 702127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4C0AC001DD for ; Wed, 12 Jul 2023 09:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233289AbjGLJf1 (ORCPT ); Wed, 12 Jul 2023 05:35:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbjGLJfA (ORCPT ); Wed, 12 Jul 2023 05:35:00 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6536519A6; Wed, 12 Jul 2023 02:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wb65ea1KTwoMX3H4i8iVbWg+vYotOuCCht7horqQdUooxMO80iKE/UXkvhCyeGnOXInb9sDKjdRN+RjIvTexP2R8Wt/yAUaeZ0tHREYpjfSnS8ifDCIe6+C03VSAUbFnVoaZ+9HALk4ctuxc9WQdFwSuOxxEGakiTfZcTTuNCpq+i9sk+5OZgEWDX4Ft8sTZyFd0dVAUF6rnYq9cJaLI9v7BtyEfji1PbJvK6iiHo/TuxyNzHU04/oxYoMekKSR+aszN5NF/Bdm5cGPIR+NpIPPwBk4IEdtAs9WQgt/rW9zULT5gy2HPeC7EFIukvZL+chZSc+fUUs6v+QRj01DUDw== 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=RDgqDKXKbMkmxHcyQAqoj0mOTiq+h3nRHhuzdeQGeGA=; b=OZskxIc1HZW6+smpZy7FV94cBrtqSClNoLDcQ+7Drze7vG9owQ2I5f6PAt0VLnQGYzFK1J4p3lb9LqTnOpB+KSMLFFes6lG8gxIRxQ9WjAKsmQcxMM4fXT2y7mBA3mEeN4YcJk7rMWLRu+aS4EkY2tgScyUjkj+IGijwoOIGjhSIqy7DdURLCA+NcQMGnDj5Uz7cpFULfsndlF3nEWxrIegfEVrd4Vvyp9VFyeakwAHrnYPXZUobJS1ZrcDJ6nyzv/AywzcDCS2rPL2NqH8ahJRf81VaGiP+dLM2x6Xv6Bzq9LzSD+FpQdDOvpxoQUsZf4QzdVgEg7SwtUAEOZONXQ== 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=RDgqDKXKbMkmxHcyQAqoj0mOTiq+h3nRHhuzdeQGeGA=; b=bYuwmQO0Xx34r7blFkOQb1BI+4l4JlYfCbDSYRio2SYlUatJoEmRabXhWBRgDiakTxKcEnVOlyi9zw85YMNMoWirzPTGj1WnX6DSK1zpOEKVVKKag9kMo0uyOrD0BLFO6YJ4THRVuPX0qERjyaS2QqUllMqgtwAJqPmVvn4CeB6K5CrwXPmN3S7u/FuuQ84pnanu3qqFUEzypO5+Wmoxb9K+cC/ykLRjTefUy+KVMS2T+O9WLT37v+wc2i3C8ex1Vqku+mScIU+NuD1RyJIs9HXcq3RZgOjgslsHgL80OE/BFD4mAsvjXR7VM0hKOFoEu49k94vfmNbOK6RdfJYDPQ== 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:59 +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:59 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Ilia Lin , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/19] cpufreq: qcom-nvmem: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:18 +0800 Message-Id: <20230712093322.37322-15-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: 6954258d-ec96-455a-621c-08db82bb1f1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bEI8OyR4aDPoY9zQloH5nnCqdqhWZc8B+NO+BVVtHPQ4/YrjG0hE7RQPUIBXrFMhW3fISdaVzsa2nxFqJ7Pku85eUASQsXf1kYgbT+giLln8xJQ+2nsXi/KZPSMuGnEPcz2Kit1CsWbASAOO626ENdvN+wVTDAwAyvoK6EB9Lpy05mftPbAZVlFvKOSYAIPjVjTLVriUDWA0Sv1KAQ8CEQFNFgeWzQeuethDm0Be381ZrE2PBj0ct7GoAjAOo2es4JbWw5MjCVv/qRnPelfUyxO9uVAxbIa9L4uQYBKD3UqqMwAeqRBRgGJmCYEKRS3I/8KNl9B3vzNAEInJYZ5td4gXRVz1BxVkfOXl4mv6nY+Q8pYwQKbaTSqMUxUMSSoO5u4nA9AMeOuX4HSKLG81YgKbN2gj3oIQC/45png/Fe+jfnbhizmGw2Bu/e5EwsK0mpoY01jCZbSi1oVeJxlJ/gIeNZDPmUeHeyY1V6Xdiq3VkOugoxEQFJMtNSSli0LWC072EbN00OjLTynAsnB43F+wVp1lLWnSHbWw9gjD6h5v95WpLdWrLr1Gn1YTrEQ6H2xbCjqK3Dwmle6TbqrYTpM2si4xwMGQeC6ozDFlFFFi1GX46r7eNlCBVCoPVufr 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)(7416002)(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?5gsG5JJNwRwuiUPiVvXluT6LgzFR?= =?utf-8?q?Gi4HWM18SBr5xdaxdsP6/zYZMBnAPZ9Z6b6ueFEGN3RKpaDIEYg5UyGx7Ut54zIhS?= =?utf-8?q?XsSgxj1sFK13wQBs0Xr7uT+rx9SLbe9BFq/1wDVyx9ueyRzvQEf7RjvR7ZC4y7Qeq?= =?utf-8?q?IPtBsi3vaAAK64pbLg7Cv0p3QyiD/JVBEHOvKtA2/VM2FKAswcrL3C49ru+iOo2rc?= =?utf-8?q?Upr4bWD27ebS2kISwiyj9gLqHzHJs2MjlAfqslX1BwFyXh3QBa5Daeom3u85WTcLO?= =?utf-8?q?r3tpbEvz3BXqAvuzp5CwhiV2QaO4Lop4My4p4qJUCVms1w0dIMysrQENwijqn7d52?= =?utf-8?q?djJioQ4z/6uWhgCJDYuC7iC1TwLQnokOPy8NhvIK4nz3wqKB226WnrSr1s3568qwP?= =?utf-8?q?PnjOIb263nn2x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MueCZc9vgB895yzmG/FWd8ddYEL4ccIxgVNuotBBswrsrgcvFyOANXmLk8oVeKn2?= =?utf-8?q?DrMov1KYEHhkrUKUm+3ItSrJPd3XgQcKEbnZpYf2oW6FZEoN1nxUImT0ODXdlTOdf?= =?utf-8?q?pIKCzVi7WfuW1ZTl13xovL4ss84RHu2O5Ai3jWt2qJUDbzNKE7TRHMWdbX97hmXvh?= =?utf-8?q?WfJmqDhwMeJPJFgrNtt7w35ehRzH1uVfjnt0amRrAu6Lun+nR9fI5ja5vAkeb++kX?= =?utf-8?q?mCqbQtPbqoNr?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6954258d-ec96-455a-621c-08db82bb1f1c 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:59.7020 (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: W4/eyHKF1JYR5D+1fi+Q7nCtcAL7nNx2dY3GNG7sw4ZHTopTuuo+ujUZEonG7WqROXjax1VwNNB8mHGc6s4R/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/qcom-cpufreq-nvmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index a88b6fe5db50..3db58d5957b9 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -334,7 +334,7 @@ static int qcom_cpufreq_probe(struct platform_device *pdev) return ret; } -static int qcom_cpufreq_remove(struct platform_device *pdev) +static void qcom_cpufreq_remove(struct platform_device *pdev) { struct qcom_cpufreq_drv *drv = platform_get_drvdata(pdev); unsigned int cpu; @@ -346,13 +346,11 @@ static int qcom_cpufreq_remove(struct platform_device *pdev) kfree(drv->opp_tokens); kfree(drv); - - return 0; } static struct platform_driver qcom_cpufreq_driver = { .probe = qcom_cpufreq_probe, - .remove = qcom_cpufreq_remove, + .remove_new = qcom_cpufreq_remove, .driver = { .name = "qcom-cpufreq-nvmem", }, From patchwork Wed Jul 12 09:33:20 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: 702126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A76CCEB64DD for ; Wed, 12 Jul 2023 09:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbjGLJgC (ORCPT ); Wed, 12 Jul 2023 05:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231977AbjGLJfh (ORCPT ); Wed, 12 Jul 2023 05:35:37 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B961B1BDF; Wed, 12 Jul 2023 02:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KuT3hNmvNMFAbPANuN3fxUKMTSnRm6y+D6a+tbLPvTW7zv7179xx88rMqODdAwHl8XpT54W70W4Q0m1BaqtLRgHLvJPFzDkuXIChwJaueINqVMBIf6xCS9mc5E8/9L+v9FdmMx41EoHQCURZazBciYUhem7TzdaC5/gdmndBjUzRob7SLwIY2GtjteJvFg+s+WSdy1X7AGiun9bMmnutLdXDO/xe1kBHrXw6MZcLWlE92Zz9bicdLrxTmaxiDvlM85JE5TyinENqUn0djh8b2+EJlD6tLD8t3zAMwkQ580m+HgAbbNQKUCbwHEN7oFibl06lND3eJ7YdE60iBZTvSw== 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=QCJxJqCS0KKYw026hjVugnxJVvGsQ/lL/AxNkg9+mC8=; b=QuXUedM7NX/U0Uo55SAx/kuN7KzJTm6wvopEGo+nFjsK1kMkvElnxgdqBLwXhjA79XFhGJ0uT1VAfaiqXDuXC2Hhppq6HztaYuozMqRe54ESGkH/wA09W1t2SyZDx/Q0Pkg1W0Yp5W0m+eYTW4uMftb41NV8JOeMSoLjmHml438WfZWGwhP02JCyUcHzlhcqZRw8FfrZt7hk2r2ktwA0TcmBAUQhegmAAkI7mxur3pCCmH8VWO2EiqX78+w9W9r/h8bzc5cClxDA08pjFFge7g/1SDN89ZanMG3zgvAuZLmZSCyfrdvOUEEen/twJsAb2Gqsz8IP7QW/VN/ZJeFW/w== 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=QCJxJqCS0KKYw026hjVugnxJVvGsQ/lL/AxNkg9+mC8=; b=nWmt8ubdlOq/bkuoJZhYaVp7QtJIVRuBmJoqv865216Pnjj3ZFBAchCsOdNxr9hMc9viQ9m93HPbfSWb1T9N8aHjSfF69J4jQM6qaAd4AjS1PdsomIhgDxcvO7Xq4RYhx/d4W4Y++WbIXgo7JrYDVrcXxByQwkC1YLY3y8wCYb4A+1mA8+BpHdh5SFaBqHDUNxJw9vmlTWm0/R51WoSTjVVF/a9yYHtJSQiKwCETI52vD6At4o8wII6WglWoC8oHSBnYvGQP5BXNcbgi/nESlWmpLo/azZmG+bbpnuC4T1q8jNz0yEM4NcWIvqQMiMEj7eWa4oMUMbeBh+AkCl4sLA== 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:34:02 +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:34:02 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/19] cpufreq: acpi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:20 +0800 Message-Id: <20230712093322.37322-17-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: 9b5658ce-a5cb-4a0a-0c8a-08db82bb2105 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dmuGR+XlQ+vsaBwsl7o+pCda837dc9Zn7b/Nl5/McPX8ajaIGzzsiLmPrtc8AYfFE7RiOH/wF4iAJqQee+4b5kLQ9bLRo+ZpzcmCr+Ky49ShEA969X7uNI5zBBT6BI4ChrAmAArpw76PmeN/P+sDlHoqloOorxo01Yx8GmxXWN0o6+y2RFAehXtaAxUDMN1Y6/cHU4SRiWJAqp4VBY2C3Jv2SMrSK6CiWD3ICEwMpey5IJ2oDMGK/LErNE+UQRQAIzA0AXZCedOzyivjuQ5zsAeLw+axDJbrXBNxdYsK66pqcw/4x8ffyLff9KlFGxDcbzaNkCMuKFMmd5zaKqkMHCXxcmXJcZRu/Na6Pai8ufB/tT4FP4Kzvo795lEYGjAPzTRf5sSrl0UtrRcy0qxTyeQ4zq6n3u95wG23BqKF/PHGLXpPPLg7TC813pRqNMWcKW3y9jbIT3sXkjhsaW7HV9mgHiCgGi/LtZaFevuPVCkS1lfk2hIKSnfljnLWCI81knYFpDWD+MlE25jvlNJXrqqI+KajzyiOxjb3EeeMCA7ddhXuszhNvuzn9UQpx0vs3HfS6BESoMSOVLHsqTMphtBNX3kmfpa9slXR4ubZBcS4g31m5lZMcjzv1y/FjdN6 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?MlYlOaDu8uznIfrael+/dIOwbkjV?= =?utf-8?q?IFczY5qF824Aph0tWaz7diSMjW7SpT9C37wkCp2pJNIJh61JsZkMiTtqac4YEpndJ?= =?utf-8?q?ypy5SpgUe1H6URuYlsHg1EsJDjOKaGQ6r1i1NYk5/62uETiM0elHbslYJ0wSy+Q2u?= =?utf-8?q?sdTqjqx/ZsQeRp7Ua1NTEgB/BGeWxE9pKFTZQ+cRtJcJVmvKorlzd+wgwCuRr5SgP?= =?utf-8?q?0Ng8nCKBDVF8jFT4Z/0GCbB7Kskr6zJQKZwnTi41bRk3TV/PUeapgbfPxIDYShVXZ?= =?utf-8?q?cR3et6VBslf07dp5po89ZfRpxyzEJk4nE/r9PYYlUEmIjvc2t7HiW/uWkBfCdRiYK?= =?utf-8?q?S4D6AoZmBWfRQ54mxeYl6ozlHNk9N+Y4SbdM8YynFcfO2fNaSk29OmiEwuJZ5sTOl?= =?utf-8?q?xDOTWtSbjdXAeINZQ3dyVD8L6qTrRjSWqp2xYlbeq9dEf1RXeHzdtzJGEPionrbAe?= =?utf-8?q?+37i5ekYxYRrFvTPR7OgQmtzb1cUOs8pBm50LBaUfcsJ/DZvrPcqrQT3/wyNr3VSr?= =?utf-8?q?NpgvgdEDDTjOuIxvt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ShLoAhZmS2n0cD8YajQF883qJigKUE8ccrSaT0qRh0IuVLbP5HH0+iq68a2BjgBR6?= =?utf-8?q?OJKzOY1YYWti62vIlbfI2CfP5OVMioN6aCXZScQhUqgmxVK51pcqLK9E2r4pMzwb/?= =?utf-8?q?eyCGojl7H/PY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b5658ce-a5cb-4a0a-0c8a-08db82bb2105 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:34:02.8930 (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: +O5tqYl8IcGf3O37n5vRGESFvwe51tI8SSV4x8FPQY5RpXgpXtC9wPHxoLHT5dveyyF7Rw6JilYlA+Tfd1p2xA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5985 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 Acked-by: Rafael J. Wysocki --- drivers/cpufreq/acpi-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index b2f05d27167e..37f1cdf46d29 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -1011,22 +1011,20 @@ static int __init acpi_cpufreq_probe(struct platform_device *pdev) return ret; } -static int acpi_cpufreq_remove(struct platform_device *pdev) +static void acpi_cpufreq_remove(struct platform_device *pdev) { pr_debug("%s\n", __func__); cpufreq_unregister_driver(&acpi_cpufreq_driver); free_acpi_perf_data(); - - return 0; } static struct platform_driver acpi_cpufreq_platdrv = { .driver = { .name = "acpi-cpufreq", }, - .remove = acpi_cpufreq_remove, + .remove_new = acpi_cpufreq_remove, }; static int __init acpi_cpufreq_init(void) From patchwork Wed Jul 12 09:33:21 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: 702128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E1BEEB64DA for ; Wed, 12 Jul 2023 09:35:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232848AbjGLJfS (ORCPT ); Wed, 12 Jul 2023 05:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232892AbjGLJew (ORCPT ); Wed, 12 Jul 2023 05:34:52 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2105.outbound.protection.outlook.com [40.107.215.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E777C1739; Wed, 12 Jul 2023 02:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CeDFJhfu1rwGChvtBj5KlLTtH0cvO15KzwOvc6u+Chgfo0lqmxTgPaoEoDeKfU21nd4i6bf2rP+HW2PvS92PaEN17Ol+uNjbw7r5TXFoTrfGDAmuy18WvmzHFaBXTQ0/OXa5RuJlUK87Tf2LmnmUPNFU/p8eUGA+T5b1epweuu5AnUUiYRz2RCIi3jbg852TzC3sRtOvX+uniXZlWD98NM16qdJ2AsYnpy9Ifo5+/Q8GMM3p/4gURiM44DbBDPzDRh/yRWbbgysfYL6DKrlxJ10rmGrZaFkMsiXTdHfRrOmegTUaGDM3xNjn7vi/sO9JxDG7JOpSmJeJGQyERdYORQ== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=bEG6gTPM8ggnVECK33LiDG+ZWy/C2JG+NakTN3ZCD4C3mOW7T3H3L5yGHl9ZpB3kcPNb7+HLh5MFdOqwZ37ecHGLLlqzFH23tjDOUt6gFmKiIpTwQ584bGn3f8HGPW7TSc2AdImPHsYfDnMUyb2+hyiY4l+Sdy4gxt6FHbv2ApW23GYd8H/WsDoLeh1V9H9x2nohQLhwUMJeLZhaN2jTKLCelOsk9ps6SprJ1XpupwZr25PsOzM3qcAEsYB4K9mgUOWk47tmJ/FXOnL43FEjW6eGYKMFtvjrnvF1iq4YOh1kd5yq74lqaIO7fhqfsBFOTOJgxnJqxw3xi8sS9/yfxg== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=QkMeTfabHCg0orf7VvbeQwU/KtChKvbgyq/mhWxYnTyDXic/9ndaHYUGe0mn8Y8uNztltJw0OUsmtSooGe7CpmQsAMS8Svzrq3r8xhmpnjx+KLNQgr1XrB98mwonXdbWBLm8FRwgEsxfhSAeBTU98iY2ofSIXcFDI9VHnFbydGuuhMlJgkyvjNryxoGaDZgLp7X2KJV72ndRG+LMbDUdPyeoQ+cB4D5ioIjgKZzest7KPzMUmAttDKIDvRWqO+j8IsRzLwKfOz5xNhLt+FcVZ4+if6Krcc/HNsaU+FCuMzkb3UTp9gK6ch0QWkkROlwmxbEvZwvmtm5VTa1rWaAqUg== 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 SI2PR06MB4091.apcprd06.prod.outlook.com (2603:1096:4:f4::12) 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:34:04 +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:34:04 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/19] cpufreq: qoriq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:21 +0800 Message-Id: <20230712093322.37322-18-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_|SI2PR06MB4091:EE_ X-MS-Office365-Filtering-Correlation-Id: 42dc6710-9b72-484c-bc91-08db82bb21e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yXrkZ8wcSkWAPriimk6/T2ZXK2A6DyZnpwa0BMlrE7ncbGGeWeGLynbhgPzyUxfbvWzAtx1cn9eavSGO+sVi8pYtdZRNUndm2d7ROX3SwblHpM7ElzZRK2PigqmzfzeHkhr0QmP0j+3bBQ/ObRSLDuXvJOqCLZLeOX8EzwQGiapYywB8cSKojFnfj+4bfoNZ+eBzuNjhaycv4qqPGx5GeCBaAxvq2XilYW2iX419Zk9Fbv+9YeV3cR9x7swcnIwdkMs1oO+p74MwgMcqupjbwHlTJqVLedn/S5cXrQ7g1vz1OKDoHBLBY8asXc4vLR7WjS3TVuohJV6weQHyfz/a2o+CK2TaKs4BpIUd22S1r5bcZKNv3PDjpwQq0eu4lQoEJv7oTeA9GMolxI0w/SN4aejyB5kDkzdLDsCbQxAUd/uhS484ykt3HJh/nLEqES81Hmn0NlFftyJZPCsLmT1hTW/ItaLLcQDnVzpghAkGJaSn3WQvi5CRLYpxId3NjyNXPCm0ER5l5KQMhvwmqQj48FqS6N8CBrmaf/Iw/C0ljaHsGSyQMnqXgWC6g46SymAnLsioFeb/PSeWVhIu4Lm92ZFedn6Wp82FCZj5E2R5Ju0kwI8NhMKuCdNK/yktB5UM 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)(346002)(366004)(136003)(376002)(396003)(451199021)(2906002)(6512007)(38100700002)(38350700002)(83380400001)(2616005)(186003)(26005)(1076003)(86362001)(6506007)(5660300002)(8676002)(36756003)(8936002)(110136005)(54906003)(6486002)(6666004)(52116002)(478600001)(66556008)(66946007)(41300700001)(66476007)(316002)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DjbUPxmiByXq9LhO6xPYI3+X+f56?= =?utf-8?q?uwFMMP3DwWjK83kWrFkZl67yqz6NlzuHPxlgAu3MHN2hO4cNZdYxzvDLcx+lpn4vw?= =?utf-8?q?REobkAin/ZbNrn6F/R2LQwN5iUBJvP/pxOyWH+kmcdOZ/Op4sheot/RaCsbxcwhYC?= =?utf-8?q?+v74XzexkK9L4BGSLk2iZ+2gBrkUUZWoVKDX4Pht50ydXrlAkc8LCkjQ7H1mmX805?= =?utf-8?q?uaqv6pwOwcbh9FrFE3bzXTuEuWqBdsHtsCNXn17cX3Q+2PoFyD2esXutdrLbIU1TS?= =?utf-8?q?zFdZgtxqICV2nnzah3setUE9r4rDEvHPwahUGAc++CqZIlWZBuRJtwqt0c0dxsujk?= =?utf-8?q?MUFGWXMl9uGmi0uQ+vKJEnked1cpCTXYdoFv+5AP5qqtW7gCFfiAxBSXYcYw+6us/?= =?utf-8?q?N2rECrYUW/AHnUs81mNplS0r75ZIGHkjQuwuykCJRFAuSW6/oqqAUcY0K/OyZiOMf?= =?utf-8?q?tQC+Dav7hP+q0OADGlVMdfJzYhe2KMB2pxZxqFx48/B8KiunvqtBTK4+C+djmRayf?= =?utf-8?q?ysBu99IdgbfkKIMmNjOzgRNdZ+aeDuWBLkT+16ASJbSmBYOLHTs0WmAYAgdWmhmcC?= =?utf-8?q?IZCS4EweeRvr26v08smcToIbgnJpBkpfcNNigrF8H87w3SOaz3XqEwR0cMdyfZZ/Y?= =?utf-8?q?LnpnsHGBzJsIO3Y3eMmBQnty6ZCOVXc82eoXo2LYFsYNaYkZ5p1c4TV+mSsZyp48r?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dc6710-9b72-484c-bc91-08db82bb21e2 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:34:04.3592 (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: DqRqYoHmT+YwW/3C9s6slLChYDfMPtGvYcYPQ4do7jJNvsjIUZcMqCeEaOp/Lm+etROUr3HJ/01PKO3XhRdKwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4091 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 --- drivers/cpufreq/qoriq-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 573b417e1483..0aecaecbb0e6 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -288,11 +288,9 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev) return 0; } -static int qoriq_cpufreq_remove(struct platform_device *pdev) +static void qoriq_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&qoriq_cpufreq_driver); - - return 0; } static struct platform_driver qoriq_cpufreq_platform_driver = { @@ -300,7 +298,7 @@ static struct platform_driver qoriq_cpufreq_platform_driver = { .name = "qoriq-cpufreq", }, .probe = qoriq_cpufreq_probe, - .remove = qoriq_cpufreq_remove, + .remove_new = qoriq_cpufreq_remove, }; module_platform_driver(qoriq_cpufreq_platform_driver);