From patchwork Wed Jul 12 09:33:05 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: 119041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034887vqm; Wed, 12 Jul 2023 02:59:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlEADUAqHTUikYv3CmzjS+mWlZDgdsUOb1wwoXsVW+3sLF8mlOS16QzEqWVU146fZW9HC/dZ X-Received: by 2002:a05:6808:1718:b0:3a3:79ef:e2d3 with SMTP id bc24-20020a056808171800b003a379efe2d3mr20048601oib.29.1689155992821; Wed, 12 Jul 2023 02:59:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155992; cv=pass; d=google.com; s=arc-20160816; b=Jx4dpL8/5zw7aCi9CPuOacvy12tt5HKNLtHto0Ir+VSbm4VjdVNpd5voKvX/abztXT jRMjHoG+w8QV68WmNzdVP1ElU4JWemCCZTvbBgf5v9204d41Zlw6Qo5ATeQlqJb6aO2f auKtFyUcgjnegnaRA7KaqczQjpXmT27Fc+EgkHVws/bagt0vThvkDjsNuxDHD0JDYBXo NEeJjfnbGo9lHolwJ9ZuK+moOvKrckl3QPpYgVWbZ775UcNnMZgpdI8wMssNVJFmAb/4 G6PKEtjv3wKET3R6aEL+EalQFWA+gsj3CkEmp82MSIdQu0aaPVLMHAnpmssf4NkyuWiy HvMA== 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=ak98kmAGr6XZnzVxmln7NE4l/h9RPLwOijqtez/4hDE=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=Fki94eOLxUZ4yxh1Ut/JvSdjHjBirJr2I2yfXalLGShSWp0bVuPadYSuz1D1zHM6yS Lh6vSjWuT42y5g2QSGDhgTPDz7zErOVg2Tfl5z5GICL7wZUwl8Foaj3bGzu9SXTRAKS7 Ha6s+9umDde5OJMHL0qFnpmow+d+tlmESRZrG52iX25pHjsTs/vjaNCqDjk6vTFfqXqi PYGaA89E+Dp6X0fDNj0pes3TFXZ+FxbJ/H/mp5/1TeW4yn2muo3wf2Ujf3u9cs0DVYtd Y2gxsJv50gP3WbgGfXpxK/hoD8QCg6vqbJx+QfjhdnHYCM2Eya8aIYD7hKDX0Cexnfd2 t89w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=OuHa5+Fw; 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 c5-20020aa78805000000b0068050054196si2882992pfo.299.2023.07.12.02.59.39; Wed, 12 Jul 2023 02:59:52 -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=OuHa5+Fw; 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 S233092AbjGLJdq (ORCPT + 99 others); Wed, 12 Jul 2023 05:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbjGLJdn (ORCPT ); Wed, 12 Jul 2023 05:33:43 -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 7E6961A8; Wed, 12 Jul 2023 02:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JMaDwF6zuBpo4jRJhBwbCFCTOfsai/v+FF7rAIBemdBxhIuxSNIQx6JNbg7fZj+NRJyO31uwc6+130jFcMypgORESvLVzcdiaI34NMNll958BOHly7jC+xXNavliVA3JsaMYzj2ynjmdRzo6TS9Dku1KQNAi97iOCEypMWH5Uh34GBc1+lKTC5l0DBYOzmGy6tnGFtOqQYLkm1t4LtfOKs+D5D/MXYs30ZjGEQROTnFblr5owGMfsvqJDgY+1GMMZLcBFUdXGJ+A7j47aj/e5WfmvsomIh9/jxS1L2R6KZohdDJheOHeANdzQu5Moso1LDSB9W/3N8SOWMH2t5SjPA== 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=ak98kmAGr6XZnzVxmln7NE4l/h9RPLwOijqtez/4hDE=; b=ORHWNk3gY+dJULB5K5ueL7x6uQ3dlkvTX/rfZ0OGkRnfjUeXn5Yu//3cq6W3B838qJgsPxwbzfuW9SwOpz26yOqsmPyp+D1WJ172T0V2VTeXnKTTJJqOvD8nTH9Y+rc4iSeT9KwPZdarSEyk9BkgnDDzwg6On1fWPZkkCvxXUzz418wTPKgbLTJmqncHVLJ+FActxFPBwT+tJiOCTTI7LKfkLfstH5Ur4Mk8xTDOTOTPPaRkV61IxNpohCtbCm0QLrY79Idlz3sB3KUQgogP7FZyt27EW8jASAuyLaUxdu7vO78j530kTr2LMtPl/vlPcubgc/p8CdZqeTIONSS8sQ== 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=ak98kmAGr6XZnzVxmln7NE4l/h9RPLwOijqtez/4hDE=; b=OuHa5+FwZcMfO2PYKvZNYlqdT2G2JQt6y/cFFD6B7XMwh4vVnymNa3oGYBMijACz3R9BNYHHYn3DbThsKF8/HLGTdUwMu6m9ViXCQguxCemUZJudWQ3xzNCyuS8KcHzGwjFdqtl8s+dDXEZWJEl5Tbgj1OOfNJ2j90ekr81xP9Vm/UgQ2IO8L5r96FsqDzmAXAS91MfKuTHvxmMOVgvPb0E/fn4HHe4/LDiKhf/wo6+2cdpc/D1yZrVI8lsf4IxaSjZHMvcHKCfKTxi/ap1XzVmy9vbbFcvVLsOO2o75NQJlM26AhhOVjJk5eSyL/eXL2S56pcQ16vHau0I9d2C/UQ== 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:36 +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:36 +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 02/19] cpufreq: dt: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:05 +0800 Message-Id: <20230712093322.37322-2-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: 79aff72f-4776-4fb8-0300-08db82bb1120 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9GMveKNTE9I2XSG5SDWGjIWWwmyPm0Ha7HE0YKudvOPc/N8Ob45xtrTL0xOuwmsrQnY/mzVeI1RScuXfuxha1xTKRmKJ/vKvDt38sXNOwb4KMeZwjdOkTIqYVhZZ0io7ekqJzvE+nZMX/M4g+khbjcxh6Fw+rwJzaTPdJzkeNPYM/7bdY7NXofVoigr2744bvsENuNGJD6uCfFdYCZB7wbDAtbA2zyKMoAj8HmhsG3vPgNO+jf+sjwHIwzNqXGft4a0qhLGHR7Hyv+UztREaStOZN0fcywDD1hal16myvb9RExaz5sVom7aiaS5uikolQVrOnjyG+KprQPmi+/YeSySyntw/vFA3rdrjIdfRrkeJ3ohpy69uocr8fNeeQzvy/OJO/j/1SRG5t4oCWCGp6qLNSz7NzFOJjNX8lREuwLnzrxaQaxa4mRFBjwemyb7l+OLuNJ6kXEqfP0Wq6ECSxMQI86M/0Bq9a++QFOXN2Gsjc0+9d9T+PYbB+lacGIMEhiRA2iqyzWF/bvcFrr431ifbnJl1+P12SNiHgR0I34LNGFnm6g8wQUrU7VZTULsxeb42NoDbEVn/rk/jnieS4CRauM32/QDZAbApPi1kVDhCB6CAg9K+W8OyD5JN/Eh/ 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?AVs6ammZKXbdP7E9gwfggm/duE40?= =?utf-8?q?2sVJJhYVmqvqg0f1R/qm/ENQNtnu/HnDceQNUukH068XO6tEk6jCgsrUly7Oejvpe?= =?utf-8?q?yZy8RQkpd4wvVMxqKQWv/BF/JhbAeI2Rroe2IXj3e+CcB4FHNYHAJ43TzL0HA2D8w?= =?utf-8?q?gZ09JQpQDUN6PWNZrexkB+j3nUJA7xKm3HRV2AFFyhmiZa2Koh6uc9pmq3g0/BhT9?= =?utf-8?q?CAQLEGzfiOJcLIuXtsSvhOQH1rMwyv1TgTGswROGZ3oTGp8CVy0eQF/eokkqB6P71?= =?utf-8?q?3Q3B0vmlKK3JqJBfoViT8UowCHHn7s9eSFdoY0wQFnq5iS9HWk0kjCRNbNE5phFH+?= =?utf-8?q?ztDBwL4rerKZWXy7WV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WMnomsyzbHTntDwaKIyGxk3?= =?utf-8?q?YCBScu95DyeiJ9pMzyfq0nT7VhJV4n0G9DWlgWh8fkcZu6ismvyV3ytMu9xbWqeZU?= =?utf-8?q?i2rARM9rhWjaI5rTwEjJTN7TduAL0lQ760UhECzVDmMd43pocqYYOlxJDt/xR+9q3?= =?utf-8?q?3XlevCIS52/RCX73KaL8PHNVGPnzXqvKLJMZopiglNfWa7PK2AlcfN4HlB1sGPnLY?= =?utf-8?q?O4Z5G6TCPWUPTsFLMjW/lH9vHDd5vX7pQN5YYG3zacMphw8cw0VX1oWeYZ9S/4Lnb?= =?utf-8?q?OZ9t15QRKjsA?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79aff72f-4776-4fb8-0300-08db82bb1120 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:36.2379 (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: mRkz4CFqBRwWhl8LhznczDLMg4WQ2t5X6TDl07+nPejFDqHBThqVsecG/7RBKzBVGbCjhcchsSiv8QEIio6xjw== 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: 1771208434184802833 X-GMAIL-MSGID: 1771208434184802833 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/cpufreq-dt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 4aec4b2a5225..8bd6e5e8f121 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -349,11 +349,10 @@ static int dt_cpufreq_probe(struct platform_device *pdev) return ret; } -static int dt_cpufreq_remove(struct platform_device *pdev) +static void dt_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&dt_cpufreq_driver); dt_cpufreq_release(); - return 0; } static struct platform_driver dt_cpufreq_platdrv = { @@ -361,7 +360,7 @@ static struct platform_driver dt_cpufreq_platdrv = { .name = "cpufreq-dt", }, .probe = dt_cpufreq_probe, - .remove = dt_cpufreq_remove, + .remove_new = dt_cpufreq_remove, }; module_platform_driver(dt_cpufreq_platdrv);