Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38093894rwd; Wed, 12 Jul 2023 03:01:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlE3PG1XMtiqcSFNTt+ZFiIZkj3Zi+46r3k0fFBurGdQbd3YMNokNqjj38C8mfZm0pkft+Sw X-Received: by 2002:a05:6a20:72a8:b0:12f:c61e:7cb7 with SMTP id o40-20020a056a2072a800b0012fc61e7cb7mr18216729pzk.51.1689156094557; Wed, 12 Jul 2023 03:01:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689156094; cv=pass; d=google.com; s=arc-20160816; b=UtXDrH7Ut8xm/VDqxXPK1JxTH5O7rWDybXCz7/+km1tlcmoL35tDGzD7HgwrVJXKR7 y3hNAeI5nI1VU3dEIc1zvo8xx2qbSc6l1sTJJTlmZvb9giM56mNEiii8Y4IXNbMSrDx5 9/6OLI6s+phWtQ90YyX04AcKDQV/cjjqYf0gU5dCDaH9ZcX13gJ9T2te3DZdGY01Lo5h ysj8p7PWyLDV0La+a92/FXTAZlViSY+eBZeEhW8qNbG5q3nVhI2EETg4uhxXicPK6y9j gZu/EiS3n+Qh8CAXlx4QvF6fsEY2GT3WeMW7FLn8qcSCx278uDAsNkncrz9rm6D+d7Zl gR6g== 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=Iay+IBxV/Yg8sWs5F5S9FoVE3oZ5N68RmY8kEJqwsKc=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=BjUKSETruhf86GSqjk4XxkSaxgWdIUwi2l71prFRkX2LtcOn0DLKaHPOJVhxSHwEBq fdPxXF3K4lWqXyBlIrfGIl71erb2Q5mTnFNJ2xrA2/07ihToDnZ3WNDGcE/Lg1bF33fr nCjFbp3j02Y/6phzUYtJ+lA7yCXeIG9d1BZqq0Yip4VUA3GPlYEmqYyaHwf6mxmpmTo6 lUvOCB6ZvwZ60lo+/1EwAl8c61BSUsI8k+zmSgweKIMYnZOQdQ0AeXy50cvoKha5Bxj0 03LgLhdYxlrPAkYYb9LJP1ros/0h9IB3O6Di4dOx4He/5oh+5qVZ/WLfjPSt49JPDN3u Ibyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fiGkAM19; 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 o30-20020a637e5e000000b0055b52ba0a00si2904431pgn.48.2023.07.12.03.01.22; Wed, 12 Jul 2023 03:01:34 -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=fiGkAM19; 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 S233342AbjGLJet (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjGLJeN (ORCPT ); Wed, 12 Jul 2023 05:34:13 -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 891311734; Wed, 12 Jul 2023 02:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m3Eef4wlubdq7M3IIBu9g6uWC3uEwOQOl2UmkzvrCBH570DIiOQW5ePBT6s33BKbeKmCMKVlE7MaQ/TQNbpmaLAsUMna5wAlEorqnMfahdskYElYrlZu/wHk4rmh1kjvLIq4vZOU8NpUib9nzl44PHpok+QgA+tk/TY6s7bhhrnK2jlxaT0mxQx0ugLyWJMTjP/UA2a+jgVkDLrGIiGEsN1qsklj/KfULRlzA2ir7ugCNJAlgDLxyOyl9bLjIOvob+xViHMnSllUDZ4q4e4ceWG19SuaPJRhjEl20NCpGjqPBM1SHPk2YW5/QeC91nRg3NrPfiE7P8QdnlqQqENgdQ== 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=Iay+IBxV/Yg8sWs5F5S9FoVE3oZ5N68RmY8kEJqwsKc=; b=J39KxLpwzmdf1F0iC3bPZHX8unmtS2ZGmVba+08CK+dFFlsOZswsYmueoG2zhXpdUUrZhROeKNqYxx4m62nD1hc2Y0lB+5DDCxW8/Ibws24LfcS8qwrtnU8SmxbVYYuibVZy9ieSdj0vfKUBB74W+7o7AKRDD2FS/QHiJdQ/4ybuebOXhZQNwgMStC4T10aObYNWTS9s1fQNeP5nWEiOENvA0fH8hwb3nxNwPq8xTj/Cii2qZ2Cty4PA/RgbZ8Ydppbi1iwTrObH5WqlTyi2gnWVG6CrPBlb7CdJoaMHgGmz8nAwYbBb7g+DUR50NyTtctWvSHe6VhZTPdMw8atebw== 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=Iay+IBxV/Yg8sWs5F5S9FoVE3oZ5N68RmY8kEJqwsKc=; b=fiGkAM1986+i9vmN7T6QenvY4SqYegFHYs+FW+WApxwnUM+41mB7ul2Z67YzxyB5v0lq0+iNc7UYcEHQhwyKdWysfpElzi6MQ6FqWxBUyaKzzM1Qy6+VtIR3/D+gwZRSMZcbsiHR5KImYGHHz5zynXzEf8RhbZUkGxPGc1Sey8S2H9ZyIPPc8E/Al1ZKFa+W4lQ82QZyfnSfHrh1X6eWIPe0kD7IRk0tQbE6Zmek1xdlwgdUtkOmLotFhynEyZBqV3DuYVOQ1BVH/7t494UQhzVg3LJLoE8bGtKBtPbFhHVTDCxCvvF9wQfbNtalwzOkRZXdN0FVzvBbwGhwCe0/eQ== 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:53 +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:53 +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 11/19] cpufreq: davinci: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:14 +0800 Message-Id: <20230712093322.37322-11-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: aab5a0ca-a0c7-460f-c2ad-08db82bb1b1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zrXVH50nQuOD0TvGkc2Rvxd3Ko5HqZ8Z/Ub6u2Wg4bSudswEwS91pJLzHpatHFLnvTQKMIuw6k2pXa+C6Id0mJCkfY+twML9mkwNXcZf9kHpAJ57SQTD+CDCj9yRrkWUY4tVXTi+nX35KwUJX5S15ZpWo+5wlx+23EwwvUetfHxmKOkR1VaK6R9SPkim0dZPtjz6Bb58X3PZnmu7dITJh5yJxPX7qflM34pm9rK1t7ZkvKv6tw5iQ+m5VfmJoPpTpCCQX9kN3LEzXD3MGqPatllwKoPe+Ua/1gqCbjh13nQmgd/YOioBypzJbfuxnBfr36d5/us+fBt7UNVn4ER39IeF1dZDHF4lq33hRLC2pwEbX7i2FeCPa79E4C4U0u3ayZqAw1Nle1ldWUujKd4GH0/Iza3GEBW5l/NVGB5oAok1iMAId963cnJY+TMWDhPLjYze6qUQCDpqykNcU4IpdJf5nEEeV08dhWhICuOJkIWAr8ce6MJdw/UVyxuAbmEyC0bpMziWcZKJ+SsB4/AG4ZNiY5q3XwsDvSL/BNSlpKtXibrZuuMC6gKvjOIteptkFiDAk61XorpbYz1mJjbM4x/qdBKxXfL9X/9xvPr7B2IhjJsjwrlSKZEQCVDDX3JE 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?T1VkMC9Vcm1PM2hpY0NUblF6Zm9OeXdjWW8rN0JFVldETGQwSTZ3QzZrenE3?= =?utf-8?B?bFVLaFIydVRVRFZIM0ZjeUZvcFVJREZyZXpxdElwZTByVFIwR0craWhFSXhw?= =?utf-8?B?bWZZQUU4Z0c2YWVaVVFrcTV2WEJaaU1hVFp5VDJzWUVoQU56SkR6WFArbVEv?= =?utf-8?B?dW8xVGxLSTBSNmZvZGpoM29kMTRCcCtRamtvL3JRMnVOZVZpMUcwT1Ixc0pp?= =?utf-8?B?UWJRVDJBK2Q2eXdqWGZ2cklKWVQ2SDl3SEZRL2Yva3pSNUpYcGwxbTNaeUJn?= =?utf-8?B?QXdnVERXeUxlVWVoWVBEcUZLaFM4dE93MkRSMmREWFJnbWdtVWpGenROZ0pJ?= =?utf-8?B?aVR4UzBudHc5SXQ2ejdzaFBoWDV1ZXFFUkd1RHhoZ3pMTEtWdnR6MmhXeGRp?= =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f-c2ad-08db82bb1b1d 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:52.9834 (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: 8zXxBsiCoN3uSm779QjHDrvQDCt/Yla1n+iiA48stXiCiHVgAwJ5H6XWg2XMWpn2LMlf4XKkj11a2+n1UsV4jw== 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/davinci-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c index ebb3a8102681..7d2754411d8c 100644 --- a/drivers/cpufreq/davinci-cpufreq.c +++ b/drivers/cpufreq/davinci-cpufreq.c @@ -131,7 +131,7 @@ static int __init davinci_cpufreq_probe(struct platform_device *pdev) return cpufreq_register_driver(&davinci_driver); } -static int __exit davinci_cpufreq_remove(struct platform_device *pdev) +static void __exit davinci_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&davinci_driver); @@ -139,15 +139,13 @@ static int __exit davinci_cpufreq_remove(struct platform_device *pdev) if (cpufreq.asyncclk) clk_put(cpufreq.asyncclk); - - return 0; } static struct platform_driver davinci_cpufreq_driver = { .driver = { .name = "cpufreq-davinci", }, - .remove = __exit_p(davinci_cpufreq_remove), + .remove_new = __exit_p(davinci_cpufreq_remove), }; int __init davinci_cpufreq_init(void) -- 2.39.0