From patchwork Wed Jul 12 09:33:17 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: 119031 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1033008vqm; Wed, 12 Jul 2023 02:54:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlEW384e+zeRk+juWmIviUX8l92SAeQlEJjLhC3q6pLtHhPBxGNgWRjf/ZzwMGbv9QEmbnFf X-Received: by 2002:a17:903:41d0:b0:1b7:f611:a66b with SMTP id u16-20020a17090341d000b001b7f611a66bmr18077263ple.31.1689155675909; Wed, 12 Jul 2023 02:54:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155675; cv=pass; d=google.com; s=arc-20160816; b=QKvF2+a4XiYyGmlMlPNsfE2/Yaj8Wmh7aNDElf7Eq4ue6Pt/GRnjB52HfKV5rOsvE5 +7u9cGYSSLMSYnK6JVBJfyk2vT35TamDwe9aPbE7lNZkw3wzjs7Cv4W/VAmnL2Y5f8AO YL0w2TpFhUAhCDc86WhoDZ3gi3T5XXwAyRrTL1YdPLd65kTHaAiDtoZoQ7mFjIETeXHm l2DMiwlVjb0xU51rsrIlfLFepV05C+t4vinPfjpQs31qzhf3/ZXeD73Mb5MgXi2+MmuM hwkXVND8sdR6UGJN5ue1sBewnwV4qSoPIm+VmxFlu1WFvbUw+oydmwb2OgUlhpguqpsq yzpg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170902f60d00b001b9e82a6beesi3011406plg.548.2023.07.12.02.54.22; Wed, 12 Jul 2023 02:54:35 -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 S233296AbjGLJfZ (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_Kleine-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> 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?q?mOkd6N53eCqfXfYKh7HoCc+g48kW?= =?utf-8?q?z9xwu+HdcQ2ZODGjHJ1sNPytREvIO9TyByJpUT7HeGASaVLp+YkF7B0z2622GIrjr?= =?utf-8?q?T+3HjHW6QSkQc8OqpOLswZeySTFEGqR6XLzaW8hgTl+UWjufjrc2Ws1MH+/Tap2o2?= =?utf-8?q?6Eu01SFHiJHSXSY998SkFBo2m68IO8GB4bfxaEzPutMZkn19k9FI1vDfB5Cpo8mRW?= =?utf-8?q?/5X4yGxPC+FyBIK4x2diNidpYGm/ZLYGvQJCILCxlbcNizAzARNyjyjEcCt46tfKq?= =?utf-8?q?ZkAEJZDsLNONUJbMalPOg8lIJm87v9bmnvrxUaRYq2bvlkiP3xJyG7nuVlzfRKn8v?= =?utf-8?q?3cGiMUnqLXaKk5/IFj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SInAGnkNi3zkGlQtl43sf6G27InShXIei3OHrDy90a8wt?= =?utf-8?q?JM8RT/FpIhyQTz86vwpYX41f9383yhCsSpYvPxFj8VNVPL3RXs2h5ElwC2fC2grmK?= =?utf-8?q?Wwc5sxSfpMHruAcTOz3Ad5BXKT09N5gyMixVRX2CXHHZ5BF17uNWZopKc0cfasc2e?= =?utf-8?q?ULiF0SVTJ2QxFW8tHJCxPYUHa1q4XhfigQEuqNc/8LZDGmdDaeWt9NsCNcbjr+Hho?= =?utf-8?q?9LVfsLMkMbtOS47JNtGihAZjdMW81AAxgbooy7Rd8VENupRTKjD2gdx/hAZuqzl7i?= =?utf-8?q?ksddZWf3vVIQ?= 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771208102070828909 X-GMAIL-MSGID: 1771208102070828909 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", },