From patchwork Wed Jul 12 09:33:14 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: 119037 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034565vqm; Wed, 12 Jul 2023 02:59:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCGpmVJrvDPrBNGK/b/1HSWxNKVJvHGnUPTrLHHOsxLDHwwGEJ24Bwd6/8joCHz3yxFkba X-Received: by 2002:a17:902:db0c:b0:1b9:d36a:904b with SMTP id m12-20020a170902db0c00b001b9d36a904bmr12968100plx.61.1689155943007; Wed, 12 Jul 2023 02:59:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155942; cv=pass; d=google.com; s=arc-20160816; b=Tn3o03RDRa/urJAmvBLioJsdxN0YSdhIvivvsSsT5zunglFBuGBUpx9hZSpNDU3TP2 QmkRqDKZ6ay6Ai3SRDSX1HQjXPUJpSAjGSQKuLDIt/pEDY60M4i3xXxpQJgPOfwDJnkf Agguwdw6DOmWBJZ/AD3+uyd7sdVRfzGGH0hEzZ7u4bFg+oZQpOuv+hBwhJCzOfevqhRJ 6YsmV4LKQvwI8vlQ0BMqsou/Sxgzh7fnsU1Pz7cRnJHboP3QOulV/N1/g7N9LRNd0LRg tHD+X/dw+2KploxlDgvJGrzUmFyMkjYmQ6jPhvcrGr2pmw/TsOcqrmSdeD0XXVUMzaDg dFcg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja12-20020a170902efcc00b001b8993fc928si2978308plb.379.2023.07.12.02.58.50; Wed, 12 Jul 2023 02:59:02 -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 S232319AbjGLJeu (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:50 -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_Kleine-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> 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?q?OUd0/UrmO3hicCTnQzfoNywcYo+7?= =?utf-8?q?BEVWDLd0I6wC6kzq7lUKhR2uTUDVH3FcyFopUIDFrezqtIpe0rTR0GG+ihEIxpmfY?= =?utf-8?q?AE8gG6aeZUQkq5vXBZiMaTZyT2sYEhANzJDzXP+mQ/uo1TlKI0R6fodjh3od14Bp+?= =?utf-8?q?Qjko/rQ2uNeVi1G0OR1sJiQbQT2A+d6ywjXfvrIJYT6H9wHFQ/f/kzR5JXpl1m3Zy?= =?utf-8?q?BgAwgTDWyLeUehYPDqFKhS8tOw2DR2dDXRgmgmUjFztNgJIiTxS0ntw9It6z7shPh?= =?utf-8?q?X5ueqERGuDxhgzLLKVvtz2hWxdi2BjahK8SH5Us8RA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L82W?= =?utf-8?q?kTrzNlrhFxTrMKd2IzdqFkj4+qIEmKqWgwZXs7IPS7qAMa42nJhBsg5KdYnj3K9MA?= =?utf-8?q?CfNxmMoSc2eKTbhc3fPNyffDK7fxYgaWxyZA+Ouod1wp71NLjQCu1h3XA0vogT6wO?= =?utf-8?q?Uu7O983s2k/BibotAV8R7FIinI5qmIIiPOP4R2JkgXOvsDOeXA980CpLgOWslQ82U?= =?utf-8?q?/hvoJrMinAaMVH+QGkwGKsdq2Hl/VBHEIvlrjHAD7s1vTWpFSv+4dp/5J4W0lFc1U?= =?utf-8?q?BLln5eQSVlboVgN+d5pg/GOxETTnbg8eUw6SOJEN4U0OCm5mjvYJdwflzW+wG2q4E?= =?utf-8?q?AZyVdAqW6c69?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: aab5a0ca-a0c7-460f-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771208382196209565 X-GMAIL-MSGID: 1771208382196209565 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)