Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38083387rwd; Wed, 12 Jul 2023 02:49:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlEsXPxIvwS1o37BocDQlKBh3mKWLilAE9B3c+ohq9a+n55I8GY1TOmyQ/xuuWlQOmVjsbeU X-Received: by 2002:a2e:8e89:0:b0:2b5:828c:bfc7 with SMTP id z9-20020a2e8e89000000b002b5828cbfc7mr14589477ljk.19.1689155376802; Wed, 12 Jul 2023 02:49:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155376; cv=pass; d=google.com; s=arc-20160816; b=AWVwgxIjfdT6N1l9KqrndrMSqdQcFclIlAy041sXyl/OH9X3lLSWyZbZBqZjSbQkWE fsc666McM3ApEXfMnxNoMHTsIjJDD+RH8QIFnf9z3qS7wzViFvOziPsACZd91+Om/aMD qA8wavDMssaHmRzORNd53iByM1Xh9FUeRKhwy3d0ffVhV89jgmPC5I8HVoahq7nUIAK4 PYJ0dBGwXIQy09HMfzhKDlpJsR3axxHQPn+ncsTtrB6NUSBX28KA2ZzDMxZiMAWy26tg 9DFTWXloITxK/FjBUAvCL4NW9l0bwgcSVZMKmb1jCe9YIgvI6nFkRmCxTvGhEDAuzrrf nhIA== 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=jmQ8MC0mbCrOml3uTJQxFN+QTq/ImG3z2bCvVVacQOU=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=jK2GydSFpqwYcXBkKCNiQ11dVcupae6u+lyzxaWxFBbkltOwGdRHJgDzm2qQ/X9IrD gowN7XxC9r5zlTzVMRnKR8KlLaXm/k3BHj++YwkGIqFirJf7QPdqCrQosocK6ta/ijR3 KVakcYmg7uaRaRfrTF0h5SNpME/MHlsFSzifi1zZ8725J6j0pEuXxDOT/s13on1nArYy J9J4pVq7RmsoN9JyM+iI38raFtSYzg5HE0y0YeXq6AdzhwpVVifvtTZe6UO3SMHu+jph +270fFPKPZ1iAOABIXSGYdrVj/JGQ6t1wkTJvbUPLwDKhMueDz9EozZ8Sf/tHJALeUp3 ZZxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VJpBuRO6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a1709061c4900b0099331401bdcsi4017292ejg.694.2023.07.12.02.49.12; Wed, 12 Jul 2023 02:49:36 -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=VJpBuRO6; 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 S233286AbjGLJfZ (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233289AbjGLJe7 (ORCPT ); Wed, 12 Jul 2023 05:34:59 -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 7F4622696; Wed, 12 Jul 2023 02:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jrMXjhXcil7C3v4SXfnucCjud/uu5FaHrWwdUBmPJT+uUtnIph8VR3d5dnf+qPT3Qe1vrc2LrJeAozPBJ5HbMdqC+pvAVmO1nNkGOlp3dd/XWubWkLOUD7wbLQeIkXfGGAew80xoqt8oMi5F007SGyVqO1B2qgG7Y01/8HfehKZos4a5Z3qRF0s+jZr5XK7CbjYX+7JaNqvGEQbQPZDkoprD6xwMW4IyvX5PXxIsygd7/xENSgzqoD6ezewI8Hf94lELHhT6JLKJyzmAFAl0/OSM+FBScNcUtzir2v2Af5MvKiAeFGBXHAUFNMiRECH3k78EpDSSiFjhjCSywFUpFA== 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=jmQ8MC0mbCrOml3uTJQxFN+QTq/ImG3z2bCvVVacQOU=; b=BcAinG0pqw9Gfsn4FijbNhFTDQ8zZ5gPF5pzKk04vs/7sykBaMbJZCvdplfMM3Re+wjTRKcps2+3kNfnZTxyv9Xgnmt704GurBbF7aHAw1KsbZ4/O0BJPYAXHy7VpRLJcZOcxue2uDh1WQcE3NfFLWT9GAYXdMz+gjmGjVl1iDkxov4m8bu/2B+7TMvt3KsNlkeQaLQ3scr+y1t22JYMqZpnEH7EXZGuKufQgCc5XpZnFHEioDJryrwJNyx+G4h+AYt96Yt0FnsI6XhzPCjKah6ImqwprzfFBv+XPIAN+WTffGol1oPZhHl2DpgnBmqFzp1G8uRT92+qoPJFIOYCFg== 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=jmQ8MC0mbCrOml3uTJQxFN+QTq/ImG3z2bCvVVacQOU=; b=VJpBuRO68NCeTml2L0CwzqNMCU4KLGL9BQFzsOAKWQIrQ+JKNziEjqi7H/t5CCa8KLVi+re4BlIgfYomK7XgmAl9lsabysxnEiYjTlkp7FMz1Q4q/u+3+RGTq4yegn6x+/KPABQCOj+oKPrxxrGO+eOybRfpO5giHDkWwGM3foIuAy4qVJ/L209oYoLi5qgKQ9TJK8CTts7CDtMRdGhBdNZ584DmmxSq6dx8u4UBURQ/on9gWDBydTdJc3QX04CmIBpCckrdRCEafQHHWi9tv8RdPQE018mgu0szbaR2tGpElHtqH7bJgZ7wtbslIuDl7KCe7cPTL4XnIElvoQKlGg== 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:57 +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:57 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/19] cpufreq: kirkwood: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:17 +0800 Message-Id: <20230712093322.37322-14-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 42c75e9e-f718-4562-0862-08db82bb1df0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bBmfekcvJwCsqrzNJsdEgfGVkIWigQ2CChUEPsggAvQy0e1fPlOGouGTnloTpXt8LezRFyVE3ltlarUXGzeXe74HgZy1v5j7XTxoOsKN1C7AF6uWv/LSgQvTgEKVaKNXD1SEbbzANVBkohM/FcBl7/26X/5gmYxUHeyXJpCY2mXd4Bcx2zfRxzrTfGi4ou6mACpBRWNTcxdBdU6c5T1hzfFEysRTGAn2Mp1tA48DB7G4BvJS9SMltC0NY166qnfXdiDI/71wRrKodHzlC4qjpDxc1X706zrK/cSO35lZfrTa2yNbZeCBB0CGpLb+uwSvhl9hfhHJj4euEQm/yLqAELbmMPXPnDkoAF1tV9kcVCkg0wisCk+cyGGT8xxdnLFvwUqF+p24VtI8z64h3mnKaXn+vqAD8dwbeeQwn+HWq6gpoE0owRX8j9yYM6ObBVYbh/n2tUlL/Fx8rZqmUELEUKm4mH0nSmMEOBVycAFnG2XRqh52jxx8oh/4HIZWRBi8uVyuNFwoqBI4/aHdZN14TAwHMrYqT6x5xPL9nd/8/4CCL40R107ASpkEEgmosxgLdr1VcT3lyKey8zBGNxWS64XttBTGE1GQcAYeXDU6YSM1h2Xe92pkgT96d/yXTy0W 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?B?bU9rZDZONTNlQ3FmWGZZS2g3SG9DYytnNDhrV3o5eHd1K0hkY1EyWk9ER2pI?= =?utf-8?B?SjFzTlB5dFJFdklPOVR5QnlKcFVUN0hlR0FTYVZMcCtZa0Y3QjB6MjYyMkdJ?= =?utf-8?B?cmpyVCszSGpIVzZRU2tRYzhPcXBPTHN3WmV5U1RGRUdxUjZYTHphVzhoZ1Rs?= =?utf-8?B?K1VXanVmanJjMldzMU1IKy9UYXAybzI2RXUwMVNGSGlKSFNYU1k5OThTa0ZC?= =?utf-8?B?bzJtNjhJTzhHQjRiZnhhRXpQdXRNWmtuMTlrOUZJMXZEZkI1Q3BvOG1SVy81?= =?utf-8?B?WDR5R3hQQytGeUJJSzR4MmRpTmlkcFlHbS9aTFlHdlFKQ0lMQ3hsYmNOaXpB?= =?utf-8?B?ekFSTnlqeWpFY0N0NDZ0ZktxWmtBRUpaRHNMTk9OVUpiTWFsUE9nOGxJSm04?= =?utf-8?B?N3Y5Ym1udnJ4VWFSWXEyYnZsa2lQM3hK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hmcUJqUTVGdS80bGZmaGdWSHZRRk1IR3M1S3E5?= =?utf-8?B?QlVxSE9pOHhjK21mRHVoNUlvOEFkMjBDc3FVMXBlNFBOOG5Cd2tERERaTXF5?= =?utf-8?B?VytmR2hncURTL3RnTnpQSnAwMXBVYzk1WVYxUmlheHVlVUVhNUdkMGhYbGl1?= =?utf-8?B?aVpmellabzVOWWlNemJaUUFFcUZmalYwY1JVSzkvRDRZL0ZVWFdWZWVwTjJO?= =?utf-8?B?L2hHRkZpd1ZBM2l0R200SGVhay9WeVFxYUd5aDBGcW5pVWZsSXkvZlVkNGZN?= =?utf-8?B?dHJQR2praGpkbnVCU2kxM0FPU1lqaWlFRmVvMmJzd3YzNDFqKzlPZUZLWk9I?= =?utf-8?B?dXdTZzFsR3V0ZXVPMnVLdXNqWVVobEJTSW5BR25rTmkzemtHbFF0bDQzc2Y2?= =?utf-8?B?RzI3SW5TaFhJZWkzT0hyRHk5MGE4d3RKTThSVC9GcEloeVFUejg2dndwWVg0?= =?utf-8?B?MWY5MzgzeWhDc1NwWXZQeEZqOFZOVlBMM1JYczJoNUVsd0MyZkMyZ3JtS1d3?= =?utf-8?B?YzVzeFNmcE1IcnVBY1RPejNBZDVCWEtUMDlONWd5TWl4VlJYMkNYSEhaNUJG?= =?utf-8?B?MTd1Tldab3BLYzBjZmFzYzJlVUxpRjBTVlRKMlF4Rlc4dEhKQ3hQWVVIYTFx?= =?utf-8?B?NFhoZmlnUUV1cU5jLzhMWkRHbWREYWVXdDlOc0NOY2JqcitIaG85TFZmc0xN?= =?utf-8?B?a01idE9TNDdKTnRHaWhBWmpkTVc4MUFBeGdib295N1JkOFZFTnVwUlRLakQy?= =?utf-8?Q?gdx/hAZuqzl7iksddZWf3vVIQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42c75e9e-f718-4562-0862-08db82bb1df0 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:57.7150 (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: UVEGLaavN1MXwyiFUEJVXqI9ZkftbJj+CwqE3WkMBYfRBOJW6+b4WNc38B+i++/I/Ma9cbwrxNq3bACAp9yc3Q== 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 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/kirkwood-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c index 95588101efbd..fd20b986d1f2 100644 --- a/drivers/cpufreq/kirkwood-cpufreq.c +++ b/drivers/cpufreq/kirkwood-cpufreq.c @@ -178,20 +178,18 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev) return err; } -static int kirkwood_cpufreq_remove(struct platform_device *pdev) +static void kirkwood_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&kirkwood_cpufreq_driver); clk_disable_unprepare(priv.powersave_clk); clk_disable_unprepare(priv.ddr_clk); clk_disable_unprepare(priv.cpu_clk); - - return 0; } static struct platform_driver kirkwood_cpufreq_platform_driver = { .probe = kirkwood_cpufreq_probe, - .remove = kirkwood_cpufreq_remove, + .remove_new = kirkwood_cpufreq_remove, .driver = { .name = "kirkwood-cpufreq", }, -- 2.39.0