From patchwork Wed Jul 12 09:33:04 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: 119040 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034822vqm; Wed, 12 Jul 2023 02:59:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnmaiwbDrzvqaIEQPawhkmRKb2QynyrqAwIxjQCudzs+WyxTTO2iYEiU2wkoPJyRDDoXqe X-Received: by 2002:a05:6808:1925:b0:3a3:ffbd:e2b1 with SMTP id bf37-20020a056808192500b003a3ffbde2b1mr11544627oib.49.1689155982463; Wed, 12 Jul 2023 02:59:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155982; cv=pass; d=google.com; s=arc-20160816; b=o+NMjJMcmItcstYw2vB78TS0Hpu76y1JZyyQfgE21r4bS3gD9mY5I+cS+o7xXwYuP8 ZfOS+aJtl/3IWpzW7Bw/bqodKX8H2TlPr75+mY+ht6Z7vBbhJMJRHV9fK9Oc1UWMPR+o pNQr7OGA/Ejeil2wsw40o7D/10ueIvcuW+qkB2hM985kUBHV0tc7Yxd/T79DUwz+3Jty YN8BV3dsvtmETOJQXK3ykwIztbVlprFsIT/Hncg0AJwTCel7taBSBWyC3YyXFqarI61s tj4ALxC2n5JX1CjkD2ZGATV1Ve7VaMZAZ2rC7DFY3hihx6RmXbk2aNOnJS5fx5Eyq+Zt 8tVA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=mqJOSTWVYvvDD/0geGFqcr4P4Y4fddEKafaq1JUVAYk=; fh=1ZVFMYjAeZm9zk/YEtKTz04kdhpuhZdCtQy5mGxSXJ8=; b=wg9SdG4b54VL7GrKBDDy1hypIR99QEgAqHCMtunCM4542nSwQBTcTcVL0p7rasVffA xT6R8x4Jij04C/5joZHnaxXXPOIHpCUVzVhU6OhgMsx+XdvmCB4AKwBEARTrmcG3HaHN e7j45o2rw8gD+1TwCUx4stn1qtQAkkw1ohSJ3FtsFA1INVdGxejsjggwc7zpYKH/9l1A 7aYsWqjC3/1waVarn/Ruop8RLkNdPqJRN14VLRyx5V0SkMOsvcTYz3Km0b36oME+gRBF yuCJrUMy5Ll9ETYdbSXL+FPAI8asXB26aKXNVQiM2cfn7p8ymJiizEUy3raG/V7NZYJA 8Y3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aMRTZYaI; 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 cj23-20020a056a00299700b0067a5e89333esi3017069pfb.101.2023.07.12.02.59.28; Wed, 12 Jul 2023 02:59:42 -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=aMRTZYaI; 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 S233192AbjGLJdu (ORCPT + 99 others); Wed, 12 Jul 2023 05:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjGLJdo (ORCPT ); Wed, 12 Jul 2023 05:33:44 -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 2C46719B; Wed, 12 Jul 2023 02:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZBCjqnEKkjqPGZu7mNI5v7kG0tFMaro+G01Dy+pWffww3d9p/ixIqb6paN3c0rxwXFv2+v137RHRZ4FGgwoWy72/yHnoyJ6KHf85sGCZVFWxWCG0qu3VYHMSBODkYWdoebmevKEeK+ig5d4xtH7MNIIV8xdEoSk0LPzUdHPI5kw8sGRAq8yzICIHwcDAaDbUqligXnMQQShE/0S4EW5nFAhNxLgJMGoBs8oLoVW0Ktp/fgelcpbx3oK4MH5UXh74E7yPyjyHoJ9bWaypvXZGTQLHYGgdL09GofrrwL6MwbFSFIVnAwUSal2YuYbGfZ/q38M+nQDRmb7qnOMd9szUg== 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=mqJOSTWVYvvDD/0geGFqcr4P4Y4fddEKafaq1JUVAYk=; b=JKIMn6MPz2aNxoEU5KSGFob5lqTjbZkXWw7I7FyMmi2ebBgB7ZjquUxuxSim7s+1P2raBMPB4pHqvztwwl7R7wRMRTOknbqE8OUyIpc7lkjxd6/8+iP/JDZQ8Zf1/Wii/VE09t9tkSt0AQqjZkfS3BAUALnSl38vC8Zh6TlsExqiuZQWOtxuP7coDR5ut/fE7l7zhnblS6HfI9zIxfvvPbLxXJroiKBhsNpVL5fgXwzaz30Z02tNvjkigkMg1fBsj4uVKCCLb4uKy8G53BGrZprPoLJQHfTkci4e4zSzMRPK+Ftk7PNb1wAH8eraB/h6rup7kXjOaoYsrjPWcCqc0w== 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=mqJOSTWVYvvDD/0geGFqcr4P4Y4fddEKafaq1JUVAYk=; b=aMRTZYaIX9MDOXsPxnC5Y8EkFmgPJaqi1TSLpzZ4zCBg2uJchEZtFchApL1qZK9JwKD3YFkpFj5CjwGXcvgBmF/2WQkqWfTwGFGq8vnstwkfkVXfxrvJ/GgbyG6I9QiXWbExQkk34n8X9RLCT/bAcVEh6bI/vF0AocvLAB6fiCNaa8nHnn5y9tHVkROrism8kImH+Wu+EfAccU16Xv9SQ7/NNtjEwSrCaAoghzmP1JIxfDDZ18gzM2Ucw7ZG8U+ljvu4Imj+bsViPlkfueK7lNV0tnSkGBRJ6i/JPJcgHOzbJScyM1tXRE5A215wrTtcjK8Tc8E6gN5V7uaEUgrLBA== 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:35 +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:35 +0000 From: Yangtao Li To: Yangtao Li , "Rafael J. Wysocki" , Viresh Kumar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/19] cpufreq: sun50i: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:04 +0800 Message-Id: <20230712093322.37322-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: abb97346-b692-43ff-67c5-08db82bb1036 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KlSF2NlGYaFhyBF7oPR/m5aBn3C2xck1RuvYPvauruVqSRp69wsaMXmcI8oSJiVD5YFBE5i8d6BPBqWxkU2zBvj/g6fzGcagsrMSsgOcMXkpEWIMjf972gJ/zJlS806HCAq2DneBaCAgu8oTP+Rk0qLhlYWGOWEnxvI1wD0aKRudS37oXnSz6fgI4+GY0o81k08FxU66LZEyKdlvuc4zi3z64/fWqeL1tZmT7gVtHgi+HoeEFw/uxygTMw3OV0gwkx7bMbM8/9gJqbYrXVN+mWPOXbQg/vkTW6RQnjfRytqrPj84L8BiGYKYStzttgnxrJ1vqVret+hHCCpkPQUZgIDK7uGiZAkPe3oloQOJ3kI9rfLBaFNCyfRxLovii5MLWQN2K9607HXo9tjooDyZPHGtC8W5h0sHIZDHR6YhjmVBhjeQKkw4ls7PApFCg+SPvDWWkKdNi3Q4wuu2sR2aR9+5hSHwVuUvLXwtsPs0WXhyoFP1NYtmJMNLb1TFUF8rDxpvbTPxWKhLobx6XGRtBMFzmFBtJAvb2+bGHZ+U8Cnzi7fBM/LNmckPSu/fKMNx18OcbsbXKE1lRgnC01GtT6g0cH1zcRtTvlM0eu5hHsPkImjWFADheu5V07hBUYlq 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)(7416002)(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?ZAm2T3Lh07bkqMApXTMWLHkORoUS?= =?utf-8?q?cCVd20gjK5t5qa17pq4gg2EZ0ynELJnEsj+W2hfobfH6j12QNdqfktwmWY0jJJide?= =?utf-8?q?fxLzqNB2PC+OzZRtPIm+gkcEH73yYXmUka+Q8OWu6r5g18orZU68WjfcIEBjek+w9?= =?utf-8?q?PVrG0/WvxkdPAeQrGN2nmnjzd1at9ZScgihqBIBG6Vrg2/EeTFd/vlzKjbqKZSmm2?= =?utf-8?q?iFXrBzR7IlEMxQuW7GvxuHmqHMZy3yPdUAULEzH9RvWOSm4+uFGkHdIxYxVvVVPGh?= =?utf-8?q?dJ+EHrfeIkX3J36SiYQC0eNPgyTK9deCZbs1n5tQosx4j9xpt+BrYrfaETDvTVs4A?= =?utf-8?q?fGovvBNGEkuhZSljBq+5BtCZl90OATCknGrhZETCDuO6J4+uXE3o8no3jK3bhvl/F?= =?utf-8?q?tWK1o4U7sEdOvK3Zmws7w0ydAPKQmGLDPZi5ZrZymrds7aE4h6beXtSKp/oyQo/5/?= =?utf-8?q?JgQ6e3HPbQg3CJ9Zg3QcJNHhfx5ZJEf/kfS9XFqgjiQ6F8n4j384/DGi9E0cEG5jL?= =?utf-8?q?/2LeVJKPjtnRP+NN65NdKrU2hnkUFPcw6odoseqQqA5M/UBqcr6S53BuP6WLvBcoX?= =?utf-8?q?oQuJa0agepFiEISNbU4rXxAOoTZqlUX3F2HRZDJG2wtipfw1YmCJfSfYp2SSR2e8w?= =?utf-8?q?PCU4dCUfbag4m8FjWdNN6nxnokbe98/DVVyRhk5j3tfcs/N+Rh3rQTA6Od3EhOrJ6?= =?utf-8?q?GApgpCcrvrywnnsKB0S36+2VK6vm3Mk3cOW+CcL0lR2uxc5I81WgKMoT9cv9IMeqd?= =?utf-8?q?vrPLQ4xJ5kgF2y3vnM6rCXzwALk44Ih6wx836XqM9c5KfYjDZH+ysz31NZVsPyz/D?= =?utf-8?q?aLcquUR64tswMAhHyNrnhYNRq3aTbctUHL3MpQ/AaZq/eFvKiakeRxqZtz1kh7NwY?= =?utf-8?q?DFqSk4lDSsnuk9ZKQ1mcSmzMoBczE2uFPe5+msrE9poB7Sv/enGQWMXKjrDGNK4nC?= =?utf-8?q?fN1GEhi87h/IKn8wYGfPBsUhMazkUExe8qpUAenW+1Da8p/vgXMJmZY97nCNuV9AL?= =?utf-8?q?835/RqtEXX6At4SbnfK8hjTFbcrq5uTRoB1ydJ2x2Kq6Kvvycrvvpr8NjTmJ73sxg?= =?utf-8?q?/kZiidRNvwf87OutIwZY+Nv04oW2Qv9Bh7tJZ8O93fYn4Mtc5tEu6sMlB43W12UO8?= =?utf-8?q?PcFovYzBwLA7d2itn/wNk1/PJypYvKE43kRGRLAb/gjRhINd/E+kGHTPqnV41lPvv?= =?utf-8?q?J1koGheqaMJ4u3LN8Dlj/II24W6OKXCZUyRSgpkvczNPCyecK2zhJ9uk/yXZCZ/4F?= =?utf-8?q?SbQK/PW7Xtx39gUXMpJ1BWI6rdFGR+11HqyjmCuI8JUkG941TG/TqPLa0bJG8+tgX?= =?utf-8?q?TBxwAg6PKF0oUy7z531EV2PjQ3Fyq4XeSBbFTiThnbls5wr0iM5Ni9PfEeFwx49jp?= =?utf-8?q?1jS6CF8c965bC25TNg2TZg41m+RSsryF+W4vDEUDsYt54EV7uR1loLaUdwpv412O7?= =?utf-8?q?QN5MdKrKpW+UNjobImbjaqYkx2lhJ7Iksep5uHT6WgtmRsqKB2Ac/BirUUjPkwSvO?= =?utf-8?q?mA13jRXDYA72?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: abb97346-b692-43ff-67c5-08db82bb1036 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:34.7587 (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: jMB/XgQl3/6i4sNuDcRILeYY8dVIgeOlruUIx9vqBi8RToakzs5vjXlhCQMHOoTHkYyz/tyNntHbyxb/jdWf1g== 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: 1771208423506506178 X-GMAIL-MSGID: 1771208423506506178 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 Acked-by: Jernej Škrabec --- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c index 4321d7bbe769..32a9c88f8ff6 100644 --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c @@ -137,7 +137,7 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) return ret; } -static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) +static void sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) { int *opp_tokens = platform_get_drvdata(pdev); unsigned int cpu; @@ -148,13 +148,11 @@ static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) dev_pm_opp_put_prop_name(opp_tokens[cpu]); kfree(opp_tokens); - - return 0; } static struct platform_driver sun50i_cpufreq_driver = { .probe = sun50i_cpufreq_nvmem_probe, - .remove = sun50i_cpufreq_nvmem_remove, + .remove_new = sun50i_cpufreq_nvmem_remove, .driver = { .name = "sun50i-cpufreq-nvmem", }, 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?ztDBwL4rerKZWXy7WVnCUq/5Uf5/XNcF4SP5z5zVDz6j5ZU0ZlXGkci2kmEil7lqX?= =?utf-8?q?xHIpEbfKYqVmnfe/f//6D8HkleWEJjE611EYwpbjQIYE6XIE8AGXKD4ipo/ZLHgqA?= =?utf-8?q?GyN9uu+zj4B/Hw6/RxwhInPRL8joDyWEnoaPn6+U40YuKKxjpICRc68eG2NyUfop4?= =?utf-8?q?kMK9rf7iMIcJltjbIDcsFe+4e7i5k3JIfdYRJCZYbsV0RWYYbl/Zzk4oGL+Vfr10X?= =?utf-8?q?PIHD81ZLN8NlP14fku8Gt5wKfLZK9lqwM136KQ70831t4d2AinRjYnRIw0LkkIjx4?= =?utf-8?q?uMevywxEhjWuls96FSiHcwsCR2smfuqcn71GMcLbmNCBIXYqMsQvKdNtJVKKmkh1s?= =?utf-8?q?KKgFXupWPmBghLqvznaUZL+th7KqdeNiQI5HHAzbXbQMkBTBUdsIbEonaWweMj+nO?= =?utf-8?q?GVWK++qiM7S8J6L0m2S89REPvrvnZr+8rCzKQJztx+Ch6StoZj4xoeQeXugsVITRr?= =?utf-8?q?9us7x5KZ5EyP9I27XNsHYpyF55HGwE7iczV0O9pN31GLxW4aD196iV4lHSPMhjAs2?= =?utf-8?q?iWpvuzX0CvBkPWhI108IOhV5717a68ERxplmg4gXV97uM3ckyUa9PMMZ+eIKMRGbv?= =?utf-8?q?rMFVtfFlWv2/itlVev6kH481Hd/hkK6sW46p9vxovHPI6y4Csm+KySOiMN8b0WabU?= =?utf-8?q?qK4pqIkDdhnQbjpVOgeuvlP70jVvYqUAykq7JJntHWHQ5701nYYltqHVoQEd7mBWT?= =?utf-8?q?FwcSmwGxsTlSYFiNJvFe+LHB1pyKu99yYYg3MSSloWhfL/aViSbY/vJZgGSOofr9e?= =?utf-8?q?aSe6rzTNrQdJfzm8z50sVguRyVH5iBLgTcagKPyHr2yVgvoDMV+RssO0YdkV3NXxc?= =?utf-8?q?wAym9SHVKNVbLyKSdWF+ZGPmyUFgMd/gpecSjgrtIKWMnomsyzbHTntDwaKIyGxk3?= =?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); From patchwork Wed Jul 12 09:33:06 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: 119021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1026285vqm; Wed, 12 Jul 2023 02:37:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFXnfoHUUb7GWUWiED+Y+IXbonlNJtCtJKkPPww+SMBiryOYQRvylOj4QzfAKP7CRQcxahw X-Received: by 2002:a05:6a00:1709:b0:67c:5c21:b430 with SMTP id h9-20020a056a00170900b0067c5c21b430mr24316357pfc.33.1689154644401; Wed, 12 Jul 2023 02:37:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154644; cv=pass; d=google.com; s=arc-20160816; b=vTXjUzp25GK5MP5P5ZZE0MnQ3Uut0izNJlKCNFR7S6lf/T4ullQ3XSfe/h0N1WDr61 8nRUZ0dtb9q24N+YdpdJl66uGXv7xf5dMiICn7aPQdBbeVSxn3C5oAKXBl+w+/OhyaO4 XrK5+RFVFXs7tUTG6IMbLj/Jm1NT9JwR/tnQou+JGYVTekpGMWV036LW+N2/FVAv2BPK iyAYBUIFfYuzZzAaAyt1/6fEsX+qX/MkpG8Yfx+MlKRcNOQBALmAdRJ3Ckk+5i7EDoQo JS9zWefsa6ABrM/hhOUnLbNdO+8H6j+9mrGw5wMf0k8chz9+0SvXgPPtHbqbnoPsZtjo /SJw== 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=CYtqx7WfYEGqYG5KEaHeDbzCIJfRJ6FFOI4C7Yrs37A=; fh=vRmcXDyYAaTSFxFGtmKckERi6QroNpv2piaCo/cXiyo=; b=m/tijbL+lIgqKpBx+4TET4pJmIyiQ5d1j3iEwURokCBq+FDBAn3lg4lm2IyAwbIw+H 2UmqRFUhIf18fiLiteZiUkmJX9fyagxqQSBBoxdsG6BSfhxOjeAMZP7Dk+4H5ake1oGK Wj2brk9vjsiJRZ8Ekx120jPYBG+tc+GXC7aWlKl1N31AndxY1cMWfOjXBIlIRV926sdn OHCUIpfvxu1oY5UeKpRFSePAy4HtoP2vtoNPY9oCYNNq04K0BUNmd2TNMZlr8R8W9b2/ ZhS6zGsWT3VqlJrZv4GdMGfaXHGs9vq269Ch1cTGZFnIAKK9QldoVjGF/zBmdZuTvCXh Mizw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Gdimz1Ml; 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 a10-20020a056a001d0a00b0066e96a581c3si2916825pfx.5.2023.07.12.02.37.10; Wed, 12 Jul 2023 02:37:24 -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=Gdimz1Ml; 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 S233191AbjGLJdz (ORCPT + 99 others); Wed, 12 Jul 2023 05:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjGLJdp (ORCPT ); Wed, 12 Jul 2023 05:33:45 -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 591DC1A8; Wed, 12 Jul 2023 02:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRvt3qddAdR5r7RGf2s7qjha/zbBTJLL1UGtD8cIcpPzfS+daKULagOBQBTrQwi5It4abM05KwCiMs3Lgvt4bfpjZYGYxc/8DQBaaJKvr4isjW7YUS6PSYanp+jwIo16b2M7Z9/zz8UpwqjF3LRstzXHeADFaedbvo8FdTkXGxoqL3sgMQWQLpG5jBYaJUBd7QRIK/+A2eYhJqL7Pdhp7OrjorulHuFlGinOssKcWKzqLygNe2Lr8HDRlxrY/gEwMy6OV8KhhINTrNA5qHYbEvyeUycpOW6XLhWYJwl6HvAiQ7b/c0ibmQdSbAIybJVERymspvtDl+moZoojZBglHA== 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=CYtqx7WfYEGqYG5KEaHeDbzCIJfRJ6FFOI4C7Yrs37A=; b=dmQkgsjHta3e/Q+njezIA60w3jPBUc1ImH6FyFw3BmZn+N8hCxap1ad0WsH2RBTC9JVdFl7etU/mzFOCGRdLEtLJ5/7MWEIPtZnrzq3SAGOlTD2yS0m9LjA7VlNrmNmsBJpM2dIKZLON5oAj2cVy9JG8XKJSx8ZzDOEUx4paR0w8u+GOZ3LzGUiW5N4Xl/pmRcuJ4uBMc7Kk1SbTKbcqGg2gF+fSqw0DlDUPWYu2qO6cs05i2GrGh5EzIE8zKhZXGEs04F78TdkXU29xhnOwcblT7pie45+faycxa3s7dUfVECrH5W0Xx3VB+XQWPCSMfYfTcn/G8HyN1LE0mBH2tw== 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=CYtqx7WfYEGqYG5KEaHeDbzCIJfRJ6FFOI4C7Yrs37A=; b=Gdimz1Mlkqc0IfR2eg6o+8qU5Xlg2AO8LyVhHxTwoDkjr9Hx9S5zO4p4DM+fnbZ6urjPJO2jUQaKrLCb7cXT/2iJ2hwN6ac47Rj76RgpqVIpxuyOOsW4sNpR5NN2LToAB/nHZ43AKKkYQm0ZnmVm+PRGthL7LowEZQhLlqCibvODetTrtkzmstiwbSW1yR5Smyh0BQwI+FtTudWqG+HfkF62+9P8q/oKb8NNWFLzf9/sgnjlTpyQV4gOYbRn9cvsCyt2jPscU8mlhOhnlTzXsTbO+dKYAFAVhLm25fkcQ6j/ZO2e4IJEa5rjtI0eebZDAImjOV2D85UARcdx8s4CIQ== 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:38 +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:38 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/19] cpufreq: qcom-cpufreq-hw: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:06 +0800 Message-Id: <20230712093322.37322-3-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: 7d3b8a70-de08-4e21-d3d5-08db82bb1242 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KLllzGyAwtfPcG9/vNkMgFJNwrSdRuEcmy5HzdRW6O3/RaL9i75jPQ1rz3S8M0aTCSx3LV4AvTDcDA0ZKwrINt9TvOGdKT6mgBioLn2Nd6fM+xXcRlYs3BPa87XmSAY9/+lIhchOyeHp33yjfQrnUFSfok0GyO+e3+33ZdXQr9r8fPuMlWiiBYwbihImu0Hfo6mSBWnFzeXLoRcjPAzApok52rihTCOIvSfMaSi07wyV8f1khb38Q1ipUOwql2O7gdAYvdNUPWQxIriqRPWny46M36fng7mpP7YOG67D6P+fknOuOKJW56fA+gtsK3nEN4JDZ5ZsAvQrpp13/bkUPOleFPu5APuyOlxayfkOaurRTgjZuhjFQGpOe9l7hrxbueRJg87LLhjqHFVlOmiOgV/z96VhcP6nE9Sy6VouNCZpQ5XwvvyLZxZCmKaFPJtEwNoQmAMKw2nLUmsa3LMqW8Ex/4ViIgJflsVfid3ZFTEMlH3JRMoK7Z/o8JKUa/we+7OoqREFgsv+3pdLsBg9lNXpAKZ4YwihKP6utY7HaKEeP8QP1w68c+Qe5tMh0/Kn1D/sCzANQC6s+OnjAZiu4jxzIt+aHxUlZcG6BtxosMy+pHYgJHEQa5pBy6QnBFLT 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?kqn1I4pMpttMkEKlkkClViqDjLk7?= =?utf-8?q?lqvxokyN6oJLbhYQMorvXv/LAt2y7PS3kyk35576ze+SfsEkYWAPLrI3DYSyn5/RX?= =?utf-8?q?0PRVrSANVuOT71O7CBc51qMxNF4fj22nl5/qUohxTGDHN9/LiIfELCBKZTmpogvOM?= =?utf-8?q?LhGmBpwYmshA1wjB6Ope+RyCaTAuqh3mWiFrO7jaPoVLAKWYZZe0Z86MIspxMxkDI?= =?utf-8?q?5D0B++Lowlr/mxFo6rdjt6i9UQQhq7A4MBbil2L0pdkJwEVTkg3a8emKZOIgrDoJo?= =?utf-8?q?89HcUL7erKGKC47xDyGEEwywdYRNJ6lCJKJhdhsizfVJOt6xXpIeb42mDJAWwrumk?= =?utf-8?q?tF2lPg14VlR0mowqe6Xlw9IDGt31gYNtvmH2W+xhYguiKmSwiPw5lJeL+0+j/pvMp?= =?utf-8?q?Rm4kK7TEwkNb6Za2me6pQZHAaedaB+3b3ffP3j4JmlH+OMcZRxyP19OEIplh1E8qn?= =?utf-8?q?DAi5r7UnihVSOq2gNiYbs3TorkMr4iSijnnAjJvGsjfSoC6uUxaH2H2HCuSetJXBM?= =?utf-8?q?fEluqNPhL2G/bFf0kNz73l8jTQpBhcmvrNZWmHebioFqlOF/NFixJzTCvnZ6T9s19?= =?utf-8?q?+H/IDFzx8gS652LlAUlbRYz3tPHBKh9CKnFrPehdzGa0XNbOYvJU+H1gViYaOBi60?= =?utf-8?q?gpfqpeiU32iOXfjTRoXvZlhHyFG34kWs+2hP/im5PiQ4udP8l5JwuIPhFI3y6oCdx?= =?utf-8?q?fQH5xsgGdr05JHoY2j9uxofUG5xcn5GSXCesVaI9jny28YZQaCHYqh4WwoFN7NUDj?= =?utf-8?q?7rNIQlByAyabkxyjp3e0MFDdvelw+Aa260aZp0t7/XXHTRULHSozj0ephHOpzyBEM?= =?utf-8?q?evmu+wRPuBUTQWLQKFUVFXJxIj+FVeR4dmWiabSQIexSWcnaAiXsUSyw89yUt+I1X?= =?utf-8?q?0YSOvsfa1ERa+/QFQ5cCuRNF1a34lsUwddAW5x3qbRR+hHoLB7jdZfgUG3ADBDASM?= =?utf-8?q?AgBcmV9ZwK4ReAqybavQCY4pk86pyAWhWt354Vfqqo5mlum269f7tYOI/smpXPmXd?= =?utf-8?q?TvZ8DpZ9aoJ7n4IBdLyR3NDq0lHsyhJsCAQbipfWZLJCZHEyb/Bj7wnwc7ZUcBijT?= =?utf-8?q?78+3Z7YCtweH7xQJr/1PrIAjACAkYkO2VZ3JV2EMBP7LxXc1TV0LidEz3QNa9FeZJ?= =?utf-8?q?tITuJszAYg87pHDzA04EAh+uS3VemoeFBs4y4uWFlGNU2P3a3mdX8K60YpnzVuL7N?= =?utf-8?q?LMSPOF0RhhfMJ5XO5Pp4+AmgB5eAuz6t/u5/o8PjIuocTeAuPMnWIKeKQpLRbMqHn?= =?utf-8?q?mGg3NG9p9nBQ0UbR7QW1N75a1RCUyz0pQRDVhzeOV2z7rzx+hcxVT9Uk/8qGTRcWb?= =?utf-8?q?jgbjeE3BY+kFP5ewJM3aM+Yv23swORnzhBSjWZSMb9yRN87rJ57QpZUeMsBpCUDnH?= =?utf-8?q?Ds5IDsaZdWIRZpof13eGQC/dltuF+RPQaiOfT42WminQb7pKXWp/oF72zzGf4SlKY?= =?utf-8?q?MZIKo6lqx2MdbQ5qoLo8ltqpATfXNWQCDMjQF8TgOy8P85vhQN+DGDeH1sjBaNDLx?= =?utf-8?q?EqdB4LFuQ3tq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d3b8a70-de08-4e21-d3d5-08db82bb1242 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:38.1334 (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: Q1f+/os1UoNN1Vab/NsiBlheITly3ftcGYfDobxeejzKMrJ0Km68yTXFQQdUhFX5JGeMLia3aywf+prtrJqYpw== 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: 1771207020405520784 X-GMAIL-MSGID: 1771207020405520784 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/qcom-cpufreq-hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index f2830371d25f..f24cf2eddf1e 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -730,16 +730,14 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev) return ret; } -static int qcom_cpufreq_hw_driver_remove(struct platform_device *pdev) +static void qcom_cpufreq_hw_driver_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&cpufreq_qcom_hw_driver); - - return 0; } static struct platform_driver qcom_cpufreq_hw_driver = { .probe = qcom_cpufreq_hw_driver_probe, - .remove = qcom_cpufreq_hw_driver_remove, + .remove_new = qcom_cpufreq_hw_driver_remove, .driver = { .name = "qcom-cpufreq-hw", .of_match_table = qcom_cpufreq_hw_match, From patchwork Wed Jul 12 09:33:07 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: 119022 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1026332vqm; Wed, 12 Jul 2023 02:37:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVljxWz4/JkvBt+/KH+vLc/uW1NeKk4YP9kjlGJI6GIn1DCpdqO1G8gwSHu7ZA19mS6n91 X-Received: by 2002:a17:902:a502:b0:1b7:db37:fada with SMTP id s2-20020a170902a50200b001b7db37fadamr13282764plq.58.1689154652276; Wed, 12 Jul 2023 02:37:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154652; cv=pass; d=google.com; s=arc-20160816; b=T08A+h1nWivQHcM8g9hiogY60Pp2tNA6+EFFk5bqD4nrD5RhJyGJTQuwkP8+z0o4Vc fth99RFrMdBWvdVRj6QoBBb+sqwimzcr4VN02xmoQ7lZPeVbSg0nLbopUkbO6+ptxe7x AIJiyiPd557y5lyoGBu3/dMUyIigMKuyL2w+x2EeyLss+7tnzDWtLwuBUHr4SXkTQRr0 7aTlnVeQhwoMthWki6x1hgAT80tWFdBazspmBR5Q2mBljNtWoXhFdCfDfHDSgbgLITb/ BBFOvXslw1hiBdr/4jhMt9yXSERM/xKo5dsf22sqkofL3vkq92NS3aY/YBZmJlbOGtnq AV3g== 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=c89Uk5+QEiVyGy9EW+mO0csGCw2tVCASv9GKv0BtYaw=; fh=YmSgh3nH0Uju7JTyiCVmbuyKQj5Iuk+dcPJcoidm21o=; b=kRJQ2SZEfwh0uKWjfDZPlDD33YSb0o9asvKlh622ChLnip7zL0Od1NFtdB2m6V2WIq sALy2qjvfrP76wksn5jRXDQIc5ZteqOOGhr3ucoBwLb7lCfuVie1IbiGkgUYJb4e7FGk bLePsk3xDd80gda2sGXfSRt13Us/pFUrBsBhoidp4D9fmoCsjyP7mom1WybmjSvU7IHF KfhUjmjDteKTNKUxtKMxKoG9GDzRfZ75n27ft9deP0CthUldNfUNF+kM+gANVA4dV129 LB/varfyB1r0ffCcFCUw50AblF7LlRyD7PRLLYnDzcjFCxyt+SVReWBwl2Zw9N2+UTsL 8Y0Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Tqt6qNhD; 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 jg19-20020a17090326d300b001b9c3daaf1fsi3046553plb.272.2023.07.12.02.37.19; Wed, 12 Jul 2023 02:37:32 -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=Tqt6qNhD; 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 S233161AbjGLJd6 (ORCPT + 99 others); Wed, 12 Jul 2023 05:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233113AbjGLJdq (ORCPT ); Wed, 12 Jul 2023 05:33:46 -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 B940F19B; Wed, 12 Jul 2023 02:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HBE9Qk7YJGs1OBR/0XBBh1Cg7wRhiu2juLH3Mz55PgDo3FCLPkhh4DKpNUwHts1ejLbzsBt4U46ajWfec0Pol4PloWNS9ZoYahtu65xt9jCh2zaO0n9eki0H8ttUOmzyE9hu5heuHACOhrgmfi2EOJU8G2lNzXcDzZ+oXey/bdc5+IEPhsZ4kdelloso7ErUR7zowgEibiSr2b+udJlF+v6ZUs5BbYvT+5Tcqk3N0SKhlC3jDrGCQ3LE9v8eKZ6e7CiPPinWWoUDnlW2A0zDasGn149dSbeXPbTd2ABxklhVUV/6xp+tsg05uBkPbPLo2ZIumcQFB11R+7OgY+cx1A== 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=c89Uk5+QEiVyGy9EW+mO0csGCw2tVCASv9GKv0BtYaw=; b=GZ9njliHIQPf2BpZ3CYCAjGsk098ggsyiL7JkzdcNypCPiGtJXS9eU5MheZux1Pl5lH0h8J2iN9IcBYJCHFl835spi4SvlPRCXqNcuZvnf0xUqvmLSPWryvsma78HQAaZKtpF6bNRQPq5Iq6VRn9VmzDVb69gzQLUeq6Uxd5mNGyRgssvs3K4QbYpNNHtRsKEmWLt38pP3lLaATnSJTVezcgSz3nf2TUpnch2W9aFcLlTwqkcAorC8seMQUZFkEkhqhOeZ/MXJXHMlJ+DV38sHKEPiHyHCiT8Bcc5wuvFfqLxT7gC9BamrTVIn+hMKd1wVZ6fcpmaGzEWXLSWn0jWg== 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=c89Uk5+QEiVyGy9EW+mO0csGCw2tVCASv9GKv0BtYaw=; b=Tqt6qNhDZrbvGQcgOS2g7l20yU5DZhr8gklDzJyu2WYxEoS7f7PAZAV7l1lalPSL98J3Tv5uv/f0xPmdh9Z9WCvQOdJlAOzYaCc1jWUdFrtiJ7IB/P/ErYI7/0GpEuSUBK7s87Tvf/PGw+td3Ap5DalXY6x2abxCOfFP8hdktnMCvpg/gKJty2MbNgwpcokmQDlMWkb20AqIfqB4Q22Jw+9caA+KCZMiaYhAEsxL2mLwBJFlEo3C+aM4rXSXr4e9daUTotjxW+g5mn3OVipqpeEkXH89QxzC2564gDcS8TQeEAlEPxQh30jLCg7wLofUHbPCvc/Px8L2r/gxTKKn8g== 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:40 +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:40 +0000 From: Yangtao Li To: Viresh Kumar , Sudeep Holla , "Rafael J. Wysocki" , Liviu Dudau , Lorenzo Pieralisi Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/19] cpufreq: vexpress: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:07 +0800 Message-Id: <20230712093322.37322-4-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: 9a9f5f7d-838d-4fd5-e39b-08db82bb1360 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WL71Abv15elZ7rOB1HiyIKWzdKUIQ0hT1Dlv47eHSvdhQ/2i8vYM1LR1W5Iab8VKzrVtvy95L3MazEwUOMa7ngp4pFlmzNwQVBh7GeGLtk0eZ060vILRaUFMFl7/Ru3YIXNyhRBdDUdhm/0apu7P0Dyt1GQ3KFlywcPvYLCbOpqYRvYVVeZA4wojdWzemGa3DudW3SfMHAsnsqSKl7HScHJ/7TkDmi14hDD0vVGFqHOWo/k+I7VpkegkT1bXGyccM7CSIa6Vmcmh7uz1M/S42mGNKhj5+POT17r+4sU5PiI1Dw/qG02fgh7VcmIHZbZ9q9D4TMLoc/rnYOsKrwx3MfA2Xb9EDMZR+/xYcd1FC27y4qYMhCNSAWgQM7eW3BVsF7gCGXdCntGQH9QxSAy0wdOGxqJs/SXvZ07KnfQvMChIPE3bIfjH8BmK4Ql89B6sC664mXXwXsgsAPUm+JfE+wbcgU5bsu2dLYf4pPkc/78CMs3onvDaLtOOfG6phDEpX+sUo18L3ESeACpnjQBu0pUUKKyCE9kgiz0wy0zkpqdbwqn3OTJ4Po1g7VCsJ40SWdMepF/kVjYCdJkh7XWdefe33WJoqsBj16qejkuWGRduZEUsUa7mWe91u7DdWJ+1 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?msISTeoFZlZyuy68YshwYVh3+pJ+?= =?utf-8?q?6Qni277NCouLIs5dWuBUVk3LZymKgLjLmSu2i3kOD/Bap55ToenCHLdGT5Ddpmylx?= =?utf-8?q?ZYIsIIlZ4/oGqpqkbMVFEpZyITdT07xE4opml/7KjsT752yQh4GOftqBo50rud9Gj?= =?utf-8?q?r/G0LbV5l6pRXTLQHe5zo2YZ7zvuE2r76ynjidXrEeOd0ccJXcSy2cL4h3kw+Jc/8?= =?utf-8?q?m96fttT4l3I9dQ0DyC0AaxvRSgPxxg5iSdn7Tdie0Mom2HzX/1LPjfFj0TI0tpzZi?= =?utf-8?q?RUqLgFPW2ubLcsJV40yIsgL0qD/qGNtFb9/lNxv/aaVItsYeQP/kGI6gy5pbAVJRv?= =?utf-8?q?bCIDjUAzMsf0T22qi+0o8HvAc9dDMsiki7CFpXY905sBv2m23RAYdQ6d/um3M836K?= =?utf-8?q?t6Y3fSi/LwNZoZl8wl1BJ83nsDIFLBR7+kmFhqjYemdRpofB9Zz9vzj5aZXJC3iE2?= =?utf-8?q?Rf6VNGAdIInXtq54iYvj8kDk0bp/0hlrX6ixxAFwBD0cFG+AWwT6b4KO1gDq67KGO?= =?utf-8?q?00D6qpsVBCQBhepuuDXwy4/MMnaBba0JHmoSuiBmZ0VZHbrpFAxMl8LKhLOatjiGx?= =?utf-8?q?JDpZfE6R2eUMF9U/Zff2c7QBY3+Rze9zylD4DxCedzOnhk/FVNEyF8T6xwTLhjeve?= =?utf-8?q?182NfLhPbV7LZu9s1oDf4LPpQItTXKFNR9kC81w//ZqnnZwf2ubU+D4VMjjOYSY6r?= =?utf-8?q?Wj0+uFRTyB2srPBN4vZUwPi0DO6nK/n6vq4N0rruhTa+OZOHQdF3LyfraXTmlXXW8?= =?utf-8?q?ulIJETA80kA29vqhxZVW+B4JGfNpG0eo2xNFXEr3FSFWQcKxxiI+CCFrwviRkTiDY?= =?utf-8?q?49TOKWQY5bUivBL3z4v549j3QoOMM/xNgEXZ7Woc0Klf390Qfi2JUAvjDW17Mbq1r?= =?utf-8?q?N9ZGJq1NeawYk3KVEbTDoFZHGjWiny2OiaNxfsPM/gFflc2UjUyYk6pDBVEH84m0K?= =?utf-8?q?So7gAx52xfOhOv0a4Pvfd5jQl0P7TrWQg/kin4/fNoeGUWhLuU0m4NdKL8Qn0cOBd?= =?utf-8?q?y2hUJy331p4GOkIv7ITvvzz4h70emJXY93oIKYaihBP2iie/vNKqETnKBOZTYQFoV?= =?utf-8?q?02Tx2vw8RIeMQBMY8TQnoiunLgKCvGoKYVKi+mEjkg/5blu1AH6zGXezkhPsyr+FG?= =?utf-8?q?V0fJfxdxPSxFphORyQNKQXE/7IMlGWPDlpG5t2wHj6xbTC+ejsBZQvEiLYGgiuQNt?= =?utf-8?q?/iSFa5EGbih2QV1f84yG//yvcjx8iucOsqrHwKCHUPZ4hbxqmDJMyPO26ikVc4fVy?= =?utf-8?q?jjLbF3CrbCxGZsmdxXF6lcmK683UwOkZKy4UEktJ3NzXwkb3eH1xPbUZYBsjRClei?= =?utf-8?q?tjfvD7lvTCvo6LNcM8CuuPFLNgfNI09wCcQNvAz9xw+OITXUGIgrNRm171aD13ktn?= =?utf-8?q?UrYCNATTyCcm/xTtzKS8JBe8P26Dzu9J0cC4FypQtgowjqV5XcuV1Yejb3eSUlC1b?= =?utf-8?q?7ZJN87YExEJCYFoaGslzG4EDG2gEMya10vgFmEv02FERDDzubTZ2hWN5XObzVI6pv?= =?utf-8?q?98lsl8mWY3KR?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9f5f7d-838d-4fd5-e39b-08db82bb1360 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:40.0136 (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: 0KuF0DSw0+Ljcr5YsJdZLpGUfVO8+quGHITZCssUCZ0KdqIz+3PL45vEwFtE990v3gMx3xZbqNmiZKJOKWu5SQ== 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: 1771207029041682517 X-GMAIL-MSGID: 1771207029041682517 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 Reviewed-by: Sudeep Holla --- drivers/cpufreq/vexpress-spc-cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index d295f405c4bb..cf33e01dfda6 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -552,7 +552,7 @@ static int ve_spc_cpufreq_probe(struct platform_device *pdev) return ret; } -static int ve_spc_cpufreq_remove(struct platform_device *pdev) +static void ve_spc_cpufreq_remove(struct platform_device *pdev) { bL_switcher_get_enabled(); __bLs_unregister_notifier(); @@ -560,7 +560,6 @@ static int ve_spc_cpufreq_remove(struct platform_device *pdev) bL_switcher_put_enabled(); pr_info("%s: Un-registered platform driver: %s\n", __func__, ve_spc_cpufreq_driver.name); - return 0; } static struct platform_driver ve_spc_cpufreq_platdrv = { @@ -568,7 +567,7 @@ static struct platform_driver ve_spc_cpufreq_platdrv = { .name = "vexpress-spc-cpufreq", }, .probe = ve_spc_cpufreq_probe, - .remove = ve_spc_cpufreq_remove, + .remove_new = ve_spc_cpufreq_remove, }; module_platform_driver(ve_spc_cpufreq_platdrv); From patchwork Wed Jul 12 09:33:08 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: 119045 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1036174vqm; Wed, 12 Jul 2023 03:01:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaQebON4tlcZQa9yo/FoJ1HpT82yUt9AtCtWlfSELKuZsDDRK0ADMs0uMF4+CwlNLkdjKL X-Received: by 2002:a05:6808:1507:b0:3a4:247a:9760 with SMTP id u7-20020a056808150700b003a4247a9760mr2332391oiw.33.1689156108148; Wed, 12 Jul 2023 03:01:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689156108; cv=pass; d=google.com; s=arc-20160816; b=XRC4CwfagWQZhrf//HFP192YXRKhF6E2Blj+wJ9ip9ySjXqNr+BvthNiWDaZJX2KRb 0EPA/YEKbyUKi/wg+Q+TgvJzK0GheF+EEni2CZlPOHYUGlnTJO3J96MDR3ykaMl48Vz6 Txtlz0RI7R9S41hOEB/xH+Hlp3KwhPWhKHxCTupUhG/oU0Ao/5gnME5zXQmlK56lREB8 jlp/iF2JwX+JKeKNHDjwvXDEW7curB2fLerelOc5vZFPwV71P12oBKhMvaNXMWNeh71k Vhu7Z/ye2dZJ7ezzdFqDPwyH61gRNYSljg4JL/DzyWci9mtr9jfvUZ7wPHA8y3E6HTl8 ro+A== 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=hn4BgINhfID0hXgw7aqm2m9dcznZSf2Tp+1Mvs1eRBo=; fh=L6a04twCHIdsZG1P+JaPyJCOhMeAtDRESGAgyEv6fUo=; b=OzQf3iUxWSChqGhMvj1T2M9T3CnUbg5ek+oHi6zSYbP25acmNQQ0w8IUXY/hdA6zw3 eEc90MBA/xP74a4R7a5Xn1mX5SyknX5iCh05Jnsx9P/88ONLNwkvn0tYqUEezvxBTc8a gFA/JE+KAOjD+obeKxGZamAZGvmStqIH8qXmSUa/MzNRBucXoZK5+YsQC4OXokGwdtXo UbJU9r9rhkRU14LFNAeJrnNr3uXf2Ks9U80rAH1O+VF4sd/CsLqSzW7y0cg/2KRr/1dk eazzC/OZ75I+ot+1fjilUxb08a6LvM8VezdgsAZhxLOGjg/7Zt2o/9Wx3AUoY82MXaKZ yIqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fPjwUTdK; 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-20020a6566c5000000b0053ef469281bsi2811201pgw.474.2023.07.12.03.01.34; Wed, 12 Jul 2023 03:01:48 -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=fPjwUTdK; 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 S233235AbjGLJeH (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232461AbjGLJds (ORCPT ); Wed, 12 Jul 2023 05:33:48 -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 F2A0E10CB; Wed, 12 Jul 2023 02:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g2/A89/8+HSTyBpR60ocd5+kZ2b2pNyXwxx7FayKWEZc5z9RXsVwU9OtBYCEmHhE7lgJe5aWuTMCoTJ5UBgH3EodCW5R9ebn7MJiJCsBv2LIOAHPGv3b2WAibD33cuibJ0iWp/sjBNUOaTuAFDjIA1Eu0GzboNGelyuOzFbii+R3qNRNjZm868w5zVRp4jALGyjoZsX1swgAzOQlPf0eRkISJ1mwNx+5dAc4UwcSMp86H6WxcctRVUSuBmXrN//umUjguLxaj4oztl2q+CKDjIOUWldG0AzispVXCSVF95tQxQiRg6FLRKC//hrXocpBLy8z3ajmUCnoMI3kWpuoxw== 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=hn4BgINhfID0hXgw7aqm2m9dcznZSf2Tp+1Mvs1eRBo=; b=YepzNFIRBw+Esy8kCC++1FTqfqVaDCIMAfh2SWMDsZmcczdmgggkxmfnJ9kxGxzyLUnj1yKk6RYrhdsrkCT7eyxvQd5Hmn1QvHwhOlULSF8b79XO87ut5psbn/WWSEBsZjnQAPZVorl3Ks1h3FxXWDZioETk2HGeWULuRU8FNnWkexcXxJMH3uiyKr61bI8ad/5+BMJrNgqnA47QIcH9fE2StpjPN2m0h1OKujGTNdbxPSTKTLZNIfF8W6D/inuqyNLQrjb0Mw/XRG+MXllBQr/81Ivzw5rvTc1eSIAuTmoKJzvmvTQNtgXVQDylLSlY/GxS3zZYGs2Qulu9+0oJeQ== 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=hn4BgINhfID0hXgw7aqm2m9dcznZSf2Tp+1Mvs1eRBo=; b=fPjwUTdK6xpvkzw07fRSMw0ARdkRxouFetX9ABk2/rmv2dmptKurVaQkjXtnSE14fpEHzNm+F6NDNeJ1L43eqHT9QMGYZaTW0QUGlf9xzcoCeNmwtLLY9e7s1Ne2fN7FDEMwGcI7faYYrQ3h+zqU+KkLw9bSp0CJpkgmxxrq7jr6pHRb9Xlh+ui6C7PbWxPZoXyTNxTkiD2fzO8Fhs4SLVr6dUL8m8FSAO7BFz4VTuFg2dRyGzdme1wnRQ2zo5UFN9lZJ1EsRh1/krErhdrf0IX6qXRmxoBOorFvdHPergDS6E4CnkNmvk/kOAoGWU4UOdK37W+M2RLt9vztocUgnQ== 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:42 +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:42 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/19] cpufreq: imx6q: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:08 +0800 Message-Id: <20230712093322.37322-5-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: 828dac23-1c83-48c5-ae2a-08db82bb14a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N8QG4E2UNPXTf8iA5eaHt9z5mloI1G4fSojelp6/AK2lZG587ksSyA8MYSREeUjspzaykzs/YfjbxBh6tScEmR0loNPUbbMw8c+zVrIAgsTWuTJa7DAELmqfx+ObCLBQFkhiNvS5Wuyw29O/rBaC7f0206sW9OrSzvvwZFrp/Nu9RiQWbcCS/XoYfvYRorQLt808QvYg7GyfJ/VEQkIXptOA1VuVywIDiue7KrlegwzqruGDyoUnJq6Rgjn9RzJy4gt6WWDueG5AN7DZoii7OPGtvVlIjjb79o2IzA+NMu1KF7pv7aw6IiuLVFdhqdaIfHNqPN80p7hJGbZdu2cgLK4xtRCxU3Sp3NcxY3IPmSRGOJztMmtcInxkOALt7nlLHIAI0FQ1DisMWKC22sDoAtceIeIJt+A0FpS5zlAFXsCeIS/iv4h1o4g9kGzzT5TECiVIIU9vtzlpZFB7CAx7Q9G0S91crdvTEs4O+j7XUZjB3/vn8r0Vydty09sFstJQtrT/KcyZGxt9Mlf89muP4OvjSn3fPcSvTkdKb0/iDg1jA36LGmGuPVNCl4cyASWNnqWboHGtwbeYIPqgYd6U0kL7r1C2UCk+uzD7SIVfR9wQwP87wvPSL9YczGU8s7Ks64T0a68PQSvHVmS5ZcS3oA== 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)(7416002)(6506007)(83380400001)(26005)(1076003)(6512007)(36756003)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vuAzfF4pSijSOtoMzJ2IZ9J2YGOp?= =?utf-8?q?jHdT4yWamBpFfIbt8x8vvRqw1AB80JYRWkx8Au+vYAlRj8Vve43ErCb2ulbwUF05s?= =?utf-8?q?9gp4yTliTyc81CyQJR9wiyBkfn0nBv9IDTQDaGdnxgolWCxnRqkwkQJ5dVeb6wDf9?= =?utf-8?q?JcgmQfofipVjoIpttrUNxKyMbVMCp3xMwGywS4Z1YBoxXu7dA6Yws3JUyvb6sJg/8?= =?utf-8?q?R8sWnfkPWB8nc1uhTjWPSZ2AwqmXvvz7SDxAUJ6OpLxacAg74FvrKPSS8UTXACDvH?= =?utf-8?q?R2AeaDmAaV6HPN49gN4EQkHhQo/NG0POttQLumT9VQtgkLAmCkYyMIja8Jl9yRlg5?= =?utf-8?q?9GQQ8kgWf3xDA78MGT0B13V9YyQ6jZw0TLbn0uvmoam1DSfsiUwi2nU7V+KMZtvBy?= =?utf-8?q?jo+U4FobRA2zAQIJBU9i9sunMR3rihPwpXtbRPlbDCmBt5ICUHrkvD4fDR1B+ugJT?= =?utf-8?q?jJDRRZ/8Rb5quSlcmVHXxGwD8yl9pMDdwMPRlYCfoKidiF0h3ChOVMjYoBERxZP15?= =?utf-8?q?PvA9WZnxmP59H0ZgSpQxR8/n+3+kwecr9nM7Wfi6IRAlpbUC3+cQDNZWN6ixPrmXP?= =?utf-8?q?cE/UN5v1LhXJPApClmklTjlqxEl8eC5F371u7gbBg3iTBu1C4gqq6oGUtl/8mrVYV?= =?utf-8?q?8lTJK0mL1UXSf/tUhp0/ZVU+7FQvm71q/b5kLJ+h4df2lpVdxqvo77v3aGzJgbbok?= =?utf-8?q?rrJgknbpDpC7BxgKJq2AlNIZ+Isyf0OyKcS6AiMjg6UCIuxfcRV6YUsRCtsj8268w?= =?utf-8?q?kaeDL6Lg6MeHr1eFqAid6YTOflc38EVps5f+M628h/gnt9whWGsULz2U2NfCNHbx2?= =?utf-8?q?4Hbx1T23FaGBvTM2VaOT1vMm4x6CV09OxxuoAIxcqFzL4WvKrZg7R+mwqm0Qxfwtw?= =?utf-8?q?Uezqf9GnfsKpj/2pkgHyxmRHdvekQqCVMQODHr7Ksb5l30eCHH4H1Kx6wPlFCqMDN?= =?utf-8?q?KO5feB6atSqBA8BkKwmCLzQ/J5+0C7FFGWBi/IOGV5TY8CfJo+REGKqQCvpBT/wXF?= =?utf-8?q?zNbtLivsFFLwqD5cyOo+0a/DB4nFCQi6pPigsyEAbScPLsFHWDKkKnxnghAmtZhj+?= =?utf-8?q?sMmJFmEmA7l3HE7RJbxMyttU+PF6D23BEApJuQEuGqxPvXvv32BEOoPMa/Igw29db?= =?utf-8?q?mhrBZGoD/n2IYMdoJDbA8FqRHvSQsxQMzWmDUAf30bcyIs63b7m/QrfuhTWrngWTr?= =?utf-8?q?PFS1w6ODx6R0esNEmqrMo8lFJ2H4goLp0ZHZM0YMoP2St3NGFoCXqCbUaACVdOAcE?= =?utf-8?q?pBt03aOJwzk4801k0IeMw3A7r2Ozf2yzOqFhSr8hzKxn7aubHODZzZ591FmbQfa4z?= =?utf-8?q?bTE4VcNcZGQk8OuXSTzpI4abiRyr7xKKMdNoqEQ1MjehJ700MBzY64caAEZ8ajbby?= =?utf-8?q?buP1Vec+umuHAcWBBrSuEF1+pPnis3qGkfNBtbC+8FC5sNXl45uYKU3A+Wo9BnZNx?= =?utf-8?q?M7m4O9/fSlc0TqrzbfLg+Kdrd4liTSHFwIz0RA+Y3M/bBMxFbFMkZoyKPIUrqpd/Q?= =?utf-8?q?wDAJmqhFRO4z?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 828dac23-1c83-48c5-ae2a-08db82bb14a2 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:42.1086 (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: 3nwZficnIyP9950uqvVOAwHzxAGjJBZnQ6PtCgQz2y9VDiWDo0CX8JN+rjRHfYwTvTCmKLu4P7yk2+bgXmCqJA== 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: 1771208555016171792 X-GMAIL-MSGID: 1771208555016171792 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/imx6q-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 9fb1501033bb..494d044b9e72 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -519,7 +519,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) return ret; } -static int imx6q_cpufreq_remove(struct platform_device *pdev) +static void imx6q_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&imx6q_cpufreq_driver); dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); @@ -530,8 +530,6 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev) regulator_put(soc_reg); clk_bulk_put(num_clks, clks); - - return 0; } static struct platform_driver imx6q_cpufreq_platdrv = { @@ -539,7 +537,7 @@ static struct platform_driver imx6q_cpufreq_platdrv = { .name = "imx6q-cpufreq", }, .probe = imx6q_cpufreq_probe, - .remove = imx6q_cpufreq_remove, + .remove_new = imx6q_cpufreq_remove, }; module_platform_driver(imx6q_cpufreq_platdrv); From patchwork Wed Jul 12 09:33:09 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: 119030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1032928vqm; Wed, 12 Jul 2023 02:54:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYBzOGbadGZqCE3UrQg3SUpHKl1KZlRIse1h/sjRn6c43hmczlPFuC5aJGHeHDKxFszzSV X-Received: by 2002:a17:902:8641:b0:1b3:a928:18e7 with SMTP id y1-20020a170902864100b001b3a92818e7mr12477009plt.59.1689155662254; Wed, 12 Jul 2023 02:54:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155662; cv=pass; d=google.com; s=arc-20160816; b=f1pHfO570LKvZkNTReo4SILubDzqheTdLQBEIi97/dhJqyqQ7d8Ej/MtiQW7aGnYLQ emcbVzErU1cbHDKn02oQpLdY03SzJCI4BWNsDVB7KxXllnnFsp/lpUXKWWmFnJB4oBJb WjM1zjXapZ1P1yqouZdm7oalye5L91f7DZVLw/bidTNgSmZ0w2OeqQJYt+e+URxROn4X J0+vE+O3EUQSoGXkAFfGVFTbFfkGdsMvHmqV6m7DSpgTLuTGZNJzuCAiOcPatW/fLHTf Ayw2+lmdXEmNOJ/QKQ5oGk1mGb0/o6iTw2SBcYuT+XMh/qgcQNloocKiQ/MI77/AORAa /+rw== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; fh=3hU7r6fPStaTEj9QCG7j1Spf2rXC6i1ngrHLySw3WH0=; b=qnlShPqdtIbkxQnkSZ/icdxdg08ZyVAkZXMFjznTm0v1T4pugV+qMAOcmO4965sZ2a OMar6C62Q4G/cuHNdFnEd4H+0pNgDeMZ12T+hCWpBHwAjGdP8oFKag7zNrqGyjAF9/59 02qaaZ1hGbR1Nb+ln8ZVmxN+8ZsKVNoq5rOfN59cWmqWGvCFAPBoXxtvI64gOJLd8sid AZqUmmX3BjdYksSx5DSTfxJf1ULhhoDzZZAELwo7S4qZuyFdGbskr7gSnWbI+4Xg0xK8 lUNqzPsrUgl79KSovjYd/QgCaGlMd+yz0eILwMAYZRgI9oXr3jbBpTP/ceWoVtRjC5vs YHmw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gzDZm7gh; 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 x9-20020a170902a38900b001ac4f733007si2983977pla.549.2023.07.12.02.54.09; Wed, 12 Jul 2023 02:54:22 -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=gzDZm7gh; 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 S233270AbjGLJeN (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233186AbjGLJdt (ORCPT ); Wed, 12 Jul 2023 05:33:49 -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 C87941A8; Wed, 12 Jul 2023 02:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfMtvB+5Qf4K+QLrWpDTRb0JMcdarprZEewLK6dSTHwbF8M4OBOW+E244Ta1TB/HF9ovSPIbwnIr0BupHgILdDj/IJKR754DEDnrZXjAiLJc2giCKdasa/jO3Fj3yd0nfBr9K+5/bTtM66cu/EatqLGv9UxjER45vYIySjg7VYcjsxj51OeQhO5ICRYlTnGCFrJd/HBfyLP2o/8HM561IcCOaf5WTlIahuHdtvtPy397rSojiZrstG8C13uaBX00BSPrImIBE7Y+x22HXhep2E8BsVuXa//BttwDpRGocf4j3qtcjHqjGqHRYsDXUZ4e6/RvgCnxfnJdG/8sCfNEwQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=eBSKq6qTlee+QE0mCvSY3ErxOososbsqDBuReMRVHpbqyme5LthfhFNdNoMdfQ5irXpMdDkikp//18DOqOmDo0q4+3Oy8pZJMOfQSvqjqabp86BPb5GEbG438P5hBfjfGowkLRlmu6QtgV/MHr2Hhox/s6FbEPLVRlPWxMwAw37ult4bHsu8rzrF7yYW9Yk7yaRKSE23p8KOlXzCESwMKYPs4QjHiFfiO/DtEWSsfju2F0m4ts7NTvaeRn13US3FahaxyLovPcNCOn+p0LxlPuFc9nN2Ynis0SScJtPSr5wz82OkoLqN1yuHktl/HaBeiTYOUsvg9LLHa/nE+appyQ== 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=DqT61dVoVAjIMQ4tirzFDt2GGKS7bnlhSrtMFE0j2EE=; b=gzDZm7ghehIvYvzXwGjbU7nkhumWoem4AeMu7RtrqdLXN8ihIQT8+sOvWQCBnxSpixWv7QpNWAdKGon+mc42ZsuKdh219rKgQo461Vhikcv0mdOCH/3ROk8iDt8tS0Kz5+z2Q9YPT09t4muc7q3PyT7TGuss6e1VbgqQEOc97r17MKCvOyFSjEQEQs1s1dGw2HpPzGdwtDFrsjHyS+0UBKmNgkJ8lr1DpHcGCNjcu7k6r1CI2Pcmo44dFIlU9ZsUJCx8GTek4fy06qMwKbmOdW2g1qV4sxmuipsNtRQWJ1vXC4gv9pshlHs6as+Hwh9kjpo8pm6T+Sd5XMuc2NmwoA== 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:44 +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:44 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 06/19] cpufreq: mediatek-hw: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:09 +0800 Message-Id: <20230712093322.37322-6-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: 2d745619-8c11-483b-1cc5-08db82bb15c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u18YQH7PdgFaMzcIQ7cGGKfWilJmeX/OfjjwWtCDpsZYADxuwUCWEsGVEmFdWjnibCmCCvWRK3A8H8dWZNv3ul2hIr+0DTNe7EhePtoUCYfebdqtqLYxg1po8c21b1w9Yo9S+wt+mSacJw3cOYtf7iMNSj1T9L5Vr7a3oX8vQJ8sNbRWj4p1LgqKxMHneyEsOk3XXqozVNMo6HjkdLqPoZ9UdQfo48n0J0xfWBrYrCTrvAzCaHAx7VLKVDJuXKgJnWfFPUOFfprrZeIwSGRT4Hk4eJqy+qy1kEwVSICQSZmxF14aQwaAQNFlHRZHizg/h5dJjIIFgRZAxLcEwqu+Q1yvNcvUAmO0cRQu0SdiE5P1vFKfLtolg+73NnXwpsqeba+BEnuL0+bxubUWOR8mMS49vaLe/GUmE2LF/+tLRu6ggVmxW6Ow5vDugXBowWne2UNLynddWNcIRFU2XI65hH7VzjvSaS/K046HD0fr4GEFIJ6SOZpQS5UxI7oXedcG9TFBwLd7EFabI/MZjSifEtgIBb6RpWXBwuyQCuMSu6UTI+zJL00/HO6TFdD0I9TL5VoXilhz5NdFok/uoIlNIS3/x5aBFIt7T2QQQpOnOUpD2s9YP6BU1kd/xWHSusae 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?i5G43RHqqdQlxBfbrTBmqi3PtrIH?= =?utf-8?q?+Fxtjg2mi7mwfJeCReksxb94U4S+o38V3Yaw5bF/qBPHtB8UtvbLUU3m3Yl/2NjT5?= =?utf-8?q?H+NTFcS/s+g2OOOcC+HrwfFj5L0DuUprDFjLBbZd1R5wVfKGkmGlWOQct/bD2OSDD?= =?utf-8?q?vZSylLvIU+t1aEIbon/tUmJH5junLR2ihCOZkCRm6rkpKohYmL2au3AG9o6GA864A?= =?utf-8?q?J7CEm8yY80WC4Us0StJeoAVDjR0fy8mk/p0PXO/eIpeqpzIU5As4SPAm6RLXe8NC6?= =?utf-8?q?GRjXiS7FHzSGpOKkKzWx0OgeQ0uATCTpm6hdRKTlYFFtDbFTWYKUFNM938Zeaa6V4?= =?utf-8?q?3e0FEygjRjSgaldA8Qlx0zajjSuFzzQLS8VszgCCckttNg2LLED8lqKBI/5el8RrD?= =?utf-8?q?j956cHhSxe1Ol+DuQedTw4vZErScVHFwKQ8/hPrDSHsM1ppS05HGlgsvoK5+9196c?= =?utf-8?q?T3FiNzY4fZNBJrnVbEMpss+KXqGyJ0oA0NV0QaE37yT7ruQeAPQnJ8iwz4UvoWLwE?= =?utf-8?q?huZ3HrsAnmPR7dQr/kfTBs8X/Sz00uuD1RzFtCg9CNWsHur4S18puNypoRWHzxuHX?= =?utf-8?q?tCC80vVdA7QJBFhIgdVmwC4q4ipYNCKAIk1tv8btpV+ojFuEabb5sBKg+abtfeaay?= =?utf-8?q?5jQFK7lVav4+qpl+5lZs44G2QwzL3iZNKO9vkGKoqnHXEDLoTP+U1cc2j4qZ9FONl?= =?utf-8?q?VTFYL/Ph5/KenxuR5cxtnOqlb77prNL4lD+XEjsAWPUBkft5dsISlHYHfaUGXV1Xi?= =?utf-8?q?xgA8/dv3Up62yh6OHSqA19iqgUdglzfTrEEC5JUsKgFKwj4GlKOuVVbusmZAotLFX?= =?utf-8?q?KTKdqbCmeIx7hWxBx6PSm8NpXUUMGj/JKt1Dr7fk8p0rOXlWTWFzt2ulIRogk+0dg?= =?utf-8?q?1fhfep7blrlvj3EP2rDJsB8fxociyrG6KqHt5N6R5GrdbDm86CLPIyJu52yi/oBed?= =?utf-8?q?e1DL7sDTI1rh9JtpPHMsSFnxcQd9j97guu7V4+NJbycTGQQcyQA9MXDnu/Oo37iWC?= =?utf-8?q?VGv487UuAvUFZn6jIgOGuZti2zmfmMi6W7Q4Frli4B0UvcyjxDV92UNObG2El2mmd?= =?utf-8?q?zIDJG54grJ4fdp8byWzdOkgv63S4DRG518lGt9aivZiJfhrPvY94Yl25eay4XZyA7?= =?utf-8?q?moFKAaL4ICATFZYedhsC4JU9yler6tqZK/gBwm4kzssV761w+tN609ZkDLKp5xYXc?= =?utf-8?q?DgLHvGMC++uYd3Fd6rs8DJmyFw05YxtTEj7YowT6wRRKjXOslZTS07yenhfBDGel+?= =?utf-8?q?MuNwE1ygSl70uq6S3Fb/S8LNM3kdw01KAvm9QB3M9SxHoUTajGRcactOr4o+au5J+?= =?utf-8?q?lFoLknx5fUsQxQtRZMg8bmcQJQIa/6hyMpmtxdm+Umgoy3Z0uJ/v+qod+i5bDoq7B?= =?utf-8?q?EashiOkmVJY5w1W5yM36PfYo1wCGTyzg7FzeHDmraRiDQjd8i38I/9VcXwqHnvlLA?= =?utf-8?q?rSXigOZHTwPIEJbT+upqFxnPfaIIQD0qXGwH57TxDUMRboZ3pQKxocT/UQxYCFqPH?= =?utf-8?q?mqtHQjMLQf8v?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d745619-8c11-483b-1cc5-08db82bb15c3 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:44.0088 (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: hPIloeMBL7jzwWCB/nvSagxLY7CuQPps6nUFHLESPoyq9RTHXU3y94Xc9sOAxGbu4HOCcSKTQpnzNCta7eEnxA== 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: 1771208087729854973 X-GMAIL-MSGID: 1771208087729854973 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/mediatek-cpufreq-hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c index b22f5cc8a463..062250192f42 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -315,11 +315,9 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev) return ret; } -static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) +static void mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&cpufreq_mtk_hw_driver); - - return 0; } static const struct of_device_id mtk_cpufreq_hw_match[] = { @@ -330,7 +328,7 @@ MODULE_DEVICE_TABLE(of, mtk_cpufreq_hw_match); static struct platform_driver mtk_cpufreq_hw_driver = { .probe = mtk_cpufreq_hw_driver_probe, - .remove = mtk_cpufreq_hw_driver_remove, + .remove_new = mtk_cpufreq_hw_driver_remove, .driver = { .name = "mtk-cpufreq-hw", .of_match_table = mtk_cpufreq_hw_match, From patchwork Wed Jul 12 09:33:10 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: 119023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1026905vqm; Wed, 12 Jul 2023 02:39:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlEVqoCF7uPOjlzP0ErKIxFGotNWWBGmtO5O7/KproSuXtUx4slF0thowHE/xITguwF/3Bh2 X-Received: by 2002:a17:902:d50c:b0:1b8:a3e8:51d0 with SMTP id b12-20020a170902d50c00b001b8a3e851d0mr16484948plg.45.1689154741678; Wed, 12 Jul 2023 02:39:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154741; cv=pass; d=google.com; s=arc-20160816; b=TCwbqIN7yJ4xCeFA1YHpJ+vnIYc4Ax/uvjEWpbc9hFC0Xg5WasZLv5026wLuRvpr92 NHiPtXaug47vXQPBVFY3EiXdlo3crpTQSq9GJHHMaqoLDJxqxu9EV+8/fL990G4dFk/9 0zVCe1sWj4fxcQW0hcGLt0N3pR4VOWcUx1oCUvRbosYqur3I21ud6xANzgTqYIaU60zN OFFvF8ukleW4+fNspiQipf3h0s/kvg2blpkiDBnBkEUxNcAiCzGmxGEFneWwJO5CG4go oDCiSqhzxqHghbVQ5uJLOOMcjKAhZ3laS2irmpDYgW9RQc+IYeVEE73vjeD7RRb9nY81 D2uA== 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=nRt3nLHXeR3vcguH4NVhTOfBUAWdrygfM+C7TT3dW3g=; fh=XQQmhVsHwAoKsSlla2OxpBknm8DLG5iiAJbmcHBCdII=; b=Bz/m0Oj4xrS6wqI8JIg5ldsU+XR42ba+ort2c+xed5wNzHAiy4TzyTtw/zr6Wg2saK 6aMkvIiEqQYZGPOY4nV/mBO2WcqrI0DF46VD863cDyNzcAwggkhG8lxlQrGdwSPfOp8C PQW/qxPHIpDdyjaSu3PhML9Jc/heAbkzRap0nJe0zAhbLRoLEAgYJCa+/MEdCmAtGFZs gjd0RfyXhbAEDh+XqtWQNGx2BNrC6Vf4UIPdByxGi2JpRpTLJ/b6Mj/e9rnBfcpXEYTo ANIpeWQqbMvwsu0HVy4PmUjdRRZeEEpqZJegbU2E3SxauDA7BKA6od2fJVloMfbpF374 wc+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=l7nLrNqa; 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 jg19-20020a17090326d300b001b9c3daaf1fsi3046553plb.272.2023.07.12.02.38.48; Wed, 12 Jul 2023 02:39:01 -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=l7nLrNqa; 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 S231846AbjGLJeQ (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233184AbjGLJdu (ORCPT ); Wed, 12 Jul 2023 05:33:50 -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 0930410CF; Wed, 12 Jul 2023 02:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=depkaKMFq/ZYClKftGSMklGQmcws6Uginx0YiEKWSqvE5ZBoNDUNTdPtpj8IKF8oeOVBAPKW10ZcQyAZKlolAcHBASOcdc/vGpxMzjSgwPcp78qG9//rfdGYbhxKME2RmTia3gf35TPVF4nXhiPXLOtwWCTr8NYn2vgNjPfv2KbgHn6hnn7EPkkvvXqUXz7HIgfNQ53WkW6MlHPWC3Zdq/cAPOuXA/aqiQvnbYYjodwvcygAM9zHtiXsMosF05BbOvjyxIKGCyuzUFYeJe7yLSL4WRFSdbYVMqOqRiTWmSQB++VoxKjUn5/TRgkEjg9ufhrA7QUTrXXpZ7QJO+Ccdg== 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=nRt3nLHXeR3vcguH4NVhTOfBUAWdrygfM+C7TT3dW3g=; b=AXCXXfWd7bz2B/AhvJ9L7hNkaBlmyFXdKSGT2LmSgGjOUmeAKVsf54N/q4trcwJeBSUzFn5JB/B5Z6cy0gpgpV8C8a51B3Zcyfh1N+BTo3t0vmIqwhCI/MxWz93Y+bxGLABOZ5bcuFqv4920KAXJvFlxmiGRawKMm1iYmM+DG3Ta+1/lxqG4najnZneOEXMWo0BcGEKq6VUqW/12I9rUbcfCeNGtlFHU57RiVLxJ8Vw/K1pdm3XHhVgSyFI0HrsUmsn3Iqw0atNyE36ilvIqqMfqH7gmDdtMKkexA8Q1RK8fbPHZrYqD4L1z+VFAO0vdBD6VLXsZ4ZaTMaDGqDkqvQ== 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=nRt3nLHXeR3vcguH4NVhTOfBUAWdrygfM+C7TT3dW3g=; b=l7nLrNqatsnEOb1KtvCreFhSaJ7CFkujIoShDwXQuYzenSYRMvoTRRVFZhvotouuP9vxePG0Q2jSkgZUPY/fDW1XzwZz+uBHsU0vIwvb2yyNQSRJf9VhlfdAhqntBpn7TyYQYkpBEcgjw+GSohpUHHe7r82x+RI8JK0pGGIbgX1SR8M5q77UM2CpEq0Wf6of/Y8v3JKaKhbQLtSjzYECQK+sc2FC/OB4JUeis/uKfH8452PUI5MUB92SpScjVsAjixC1oji0ltN9hr8I8ia2709wpyx4yoBS9b/NoLgPyf8MKyHqpWmoV/yBpFvrJyg0CQ/zNgBn1yLLOZSTyvYTZA== 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:45 +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:45 +0000 From: Yangtao Li To: Sudeep Holla , Cristian Marussi , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/19] cpufreq: scpi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:10 +0800 Message-Id: <20230712093322.37322-7-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: e2e4a9b8-274d-4bb3-026a-08db82bb16da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nHgV++bOtf7FZba5r+S0Ac9cQB9nN9T4QYcSlNkXLjtuSQfXuuJzpqMa1OJENACINKPZjEPlq0k8Ls2DuijtrAvrs7qE9uixsOsjAiWvjO0FNChGqIv0UCJShJNsc8PAVdeqOv5zK3lWjqW0YKX4y4s+LyFSHt3yC+eClM/fLhFSiVTfu95TVMEHUxqoKyyI//0QSZ5PzzH1fa3FAK2J+dAMmHi+pKVoMF84AaUoZoncVtrwmS5bruteRe3Grde1pAZYcqdKlYnZHsibOcx466itlH0+ulYkGNP2VZletDHyCR1SrjrBJ439vPI6QozakuM4PZax6pgI9kf6XWqBZfDIoSz+rxZGQ085xKYFTAdqPSDn2v/x6IKHxZDVWl0cRxtWkMlwElcKBG+Tnp5w4TnF9v+s5Ko6LfUTxl8znItBYSIAi7PK8xz9jNetkh5KsRUQzOYw+wVQZuYYq+uucZXuNCtrp3nQ3yxC67ZjrfoGXKCwJpPw+GoKa1LHvrz4m5GoN8XjRibQox0Cqkbdm3q+hlUV3PneT6uziRszhPtP7YlJyuTWvJKQWHE5LDevuG1GwUha6c7GamYPRRO2iT/YsRJdhpv3FjEAfiyxmBaYXVaGbfZAmMo8RKcM12cL 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?/R42d8jPsemMW5kXQ6SQCcU0w+Zi?= =?utf-8?q?y5/Cqs9zSq3r4a1wFl59w7vOoRAaZ38lcGnFpR/QNXdVrMvxDZZT6VHob31bBdael?= =?utf-8?q?nF0F2urJoI2BjKrxacBuwWOGfNhpKBDFv58bHSbC1yE8JRkuNq2cuwS98fTggqqFb?= =?utf-8?q?x5ZruOaz9tfCnu0k7lUmpMs2F0EpOExc0jEHTZgHMgrenxVRiUDilMiK4uj2x0JbU?= =?utf-8?q?0yCCuE3UuXT+umxSGzCVEZjox1KzMlxShQHY5Skaa4epqbgtLP4Q5ZMTtrIgIOx6F?= =?utf-8?q?IpsVYhcPcbct8D2yrc+A1rIi4fHRCxJQnYhXaXrfs9OZeqhx0uv3eFojkixG5pCHe?= =?utf-8?q?KB/jPoi0SzSmUUSYWE9gLzzjiXpfXui/gvisDK7HMfjpEctBHhZBqIovEcCu6W0tY?= =?utf-8?q?gxlRo5QqS+xfB/Mb8YrjzJ1FP9aJfmvgW6779VWlPV1eziTLvwaztAdGwqQiNT7p5?= =?utf-8?q?6CvMv/DkL4Q3hrIT5LjKCqtMQRcGJqYLJsCx1Yso6IImNnKjjDBeKXpCU2G3OZfxB?= =?utf-8?q?Ank8GjSeSyVQZBL2b1EWpQQfxqLAqtfiApzKeVdgRvXgajpnpo6dz9MJ7HadrOF76?= =?utf-8?q?fsmMIU0NKUcsrGnAHhTRtfO075TdZ7fmBml5jpvNOZd23KtwrLGvVoUq1luD6eier?= =?utf-8?q?EmrWVsUuIS/l2EEb60TwoshEwLCFbUutQWbcLJ1ocucsoFs6/vjfVazveVOkUM13J?= =?utf-8?q?/dsQWo278EcGKS5GVm0KAVz3kBe3+j2F893mTg8/0ibwnmUb3vBNvVnNPZDN66kuE?= =?utf-8?q?HVfDGmCmPVPeSwtPnkQCWTsRTpp+EoFv6eO6GdcMIXsnnkYrdFGfyobk7rrkXbZ8w?= =?utf-8?q?sGR/7nyiXT0/qvTM1O2BU6BS3dC4iWRSIVejhOqKOBMn+kHYT/ykmaFGFWVeBUUV6?= =?utf-8?q?UE34mkhek/cK3i5B0JcgqXAFDYSxt/GwcnRP3sHmexSP+zSPjwC/WfeeM6oeopT/u?= =?utf-8?q?Uqzbm9nkwJRb//75PPIS2wSnh4I9YLImyFxdHs1FEyGVRl0GV5A+q3cTk24cffq8p?= =?utf-8?q?Hw1/AeSjQ0lrDfCykVIxXd1o3Wvdl6ragjRz/ZAF3131YFut+bsNIjSRWruEt9NN/?= =?utf-8?q?kf1aebR57sL7aLWBhRcT8e1lN8EMcScrkPRwfAYtVPUe1l2+bgXLEvLXV8QiMxLRb?= =?utf-8?q?3izXl1PMpU6CN9xqXliDc1lweDbIHepj2dDyNZXEajlvfRAcT0YVWbqsP6DmVMUfh?= =?utf-8?q?GSW0JbfSuZ0bCgcQyrv6Bf71gNfpd5duxjHr8+0rPDbVYYziD3g6j/tjs229+1js8?= =?utf-8?q?t84Z6SxJe++KMPY/aeQTz8cWJ0wv0LGKIsjSTO+IYyBht6Y1gQeguGkB4A2FKnvQk?= =?utf-8?q?EMdD+x3JwZrYH+bDqvaUr1iN1EscZFVZzIBrUaEHYihoLdx+BUiXtZcWraxg0rOo/?= =?utf-8?q?7yDkvBzmAVmQ4NQOhD4AnaaVg+WJEAMsqPLBZHZQNu6iZIPazURFzFyU9rVMceUoU?= =?utf-8?q?g3uB2MaNFHGkSjg/6l4qfN/g8fr4QlliS5oR3uNFM0btU/hQOOjqJNSrwS36/hN0j?= =?utf-8?q?ExNY7thXLIyL?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2e4a9b8-274d-4bb3-026a-08db82bb16da 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:45.8510 (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: n21UeX8ZKWQJQBCkAU2QP8S0ikswoNqlMDzYayv6x82ywOLMe57LLUwgadrb/joAhiMoU8pkePJDFByE/ce/Ow== 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: 1771207122442292498 X-GMAIL-MSGID: 1771207122442292498 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 Reviewed-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index fd2c16821d54..28f1e0490af1 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -208,11 +208,10 @@ static int scpi_cpufreq_probe(struct platform_device *pdev) return ret; } -static int scpi_cpufreq_remove(struct platform_device *pdev) +static void scpi_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&scpi_cpufreq_driver); scpi_ops = NULL; - return 0; } static struct platform_driver scpi_cpufreq_platdrv = { @@ -220,7 +219,7 @@ static struct platform_driver scpi_cpufreq_platdrv = { .name = "scpi-cpufreq", }, .probe = scpi_cpufreq_probe, - .remove = scpi_cpufreq_remove, + .remove_new = scpi_cpufreq_remove, }; module_platform_driver(scpi_cpufreq_platdrv); From patchwork Wed Jul 12 09:33:11 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: 119036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034462vqm; Wed, 12 Jul 2023 02:58:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlF91EHHDonMHoOYnKYqgNx67Pj+Pxl9v3oUMslOYsDcvI6y9JzF3W3HrgCj3rwLCAbkW/Wr X-Received: by 2002:a05:6a20:4325:b0:125:4c0b:93cd with SMTP id h37-20020a056a20432500b001254c0b93cdmr16913397pzk.34.1689155926053; Wed, 12 Jul 2023 02:58:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155926; cv=pass; d=google.com; s=arc-20160816; b=ZeDHEwEJlDucw8FbvYTfQ8nVNs3InjQWdxs/6bSfUbPcKIJC9+/e0Bwe2Aykd1AZ4R HIVKBOjRvgjsiS5i7Bu6meIn1Ks2jx7BfBAUrqA3U6JJI4xUf4do9p+YmyvoVardMCVV OjF2SiCE/BO6ofScmPhmifuz1FolklEDOFKH2V63Ny9D8jP8tMpZbJvmAsVU5t8B4pZo aPFV1l3ZxnDZlYqjOqQnkR47zPobSsppKUkgNYZcBYxBut3YSvaDbbGuIE8N5WkEiQ3p mcXdDRe/B1wfKlcr3uVDbmWD9Flfqk1w2RW0x0OztSmFPdBe+t2E4sLcPEotVmiRVN4q Y0cg== 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=jbZ+0WrsTdQ0/jo/QyZW+/XbcPYMp7LBIjLgnvIrU9o=; fh=aLrmfDRXO5VR2GT05st/28kNJvSGxJ0c9BofnW6RXsQ=; b=Om2VTmDFFnWlXDToydAHiW0nOn6CKjewBSLni3zCG5ruPUxbNRMc0XbFbr5qzutHgs eDI7Gxt+KX9a1MCPMPh8NYcJ5AAg/S8OysEg27Ehv2JLyjHWSuBWYbvlTnSmDPh14MMM n0PAfm8UczBhmL12BccMxPQcAor1OtEkYEkIvt4+gfCGjkvydtdAdU9SmLkI8Ax1XSUu K0HLRMSZMZIwWwOlgpBalPYmDYtr6ejFvJGwqjt8r6IPH8m8mUikKOfAu9eTzJYrPeu6 U/7PnkRzRQW4ZuxLTkeDJhv67QM0u62yjVibSRjnYWl6jwiaf7lny+L23fUf0VqQQB/O Ly/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=djMwyIy6; 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 x15-20020a170902ec8f00b001b8920564cesi3276925plg.17.2023.07.12.02.58.33; Wed, 12 Jul 2023 02:58:46 -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=djMwyIy6; 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 S231956AbjGLJeT (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjGLJd4 (ORCPT ); Wed, 12 Jul 2023 05:33:56 -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 2DA921703; Wed, 12 Jul 2023 02:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+mePwis9j43fdouDQcS5oQ1CfzMPOOTMvw9fDJfJKVvHLKgtqBuLgsqTAOscyLxb1PdC4izfOMkcTawLMBx9PEgSBeAvqeLWHla6rWWx4rHKevAcUZ0ViY9HyJFCiVe0dTneLKHkD/sgPMXBoyUCoOghRID1Ssg60CCXG7a3KbXDoILXOB8XEqgXsQd6lGBN87MjyfT9aQTJ0wartgO4rMyzclwMaoz0gb7xz0ABG+g5E2V25o9WFYi60tUiCd5qIo3kD/Ze2X4kZYPJDo6W/gRkFrhXQasNWWCnjkOrvCMYCx2wwewtPMqfv/+F0bEH5uilHkse9q1D9RKtf+4KA== 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=jbZ+0WrsTdQ0/jo/QyZW+/XbcPYMp7LBIjLgnvIrU9o=; b=RKAW6iJrXhE5Tudrh3x7oxC7313haan4Ickudmx3CXN/lwvjQNIEKpUph/U4lM070/efRIQJX1po4N6Reb9tzBX9C0Nisjeym3edoPSKpNq9/9TLGOv+COTGuMOnNK9fy3Q6DAaa7XLo4L1WGAUTuzdqxYou+VQngTN6bYvg1QrwoAozKPrdKxHBJ2QCOtTqoidrCO6mImLqdzpcO0T8RfT25IP3SQSKnNzS2InAiDu3/BSOz4n2bGrLrtGRbMdKHrEzdofcJYeiOR3PAr+T62o3iJLLizS7riVcJIHNpYCgAtqP7T5gXwNpCEHZ06TzhYTs3aRgBgr4tXR92jJWKg== 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=jbZ+0WrsTdQ0/jo/QyZW+/XbcPYMp7LBIjLgnvIrU9o=; b=djMwyIy6OYc/HaN5jyExDA1bjvet2OtpcLEYsoQU1FEnNCHxpD3h8KZM50ZiRTW5bjzg/SWr1aPWCqyj7zZADioSrE5aZZhDiISjrVYSVrEuDNtnkBv3eWtbdwVDVjjBdUyPxmDf/MLy/WJ9QIsFZu4k5efWK2GyMIsXD7VhdKGfc4rkmxjkXtWmSDgRn7/I71dxsw2WgFSPaSmO+V61DYKgMUcBY3Eek63gZwXTuiklBbdcvMO75SWlHClfULuxzuqI9YBG3QSyDw/Q396HUnVYb7r5zrU7QXN+oJmlnBqw0rX7HRcTJ2S8lA5grTGQG7/mDJadH6qfXDKPMLYxoA== 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:47 +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:47 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/19] cpufreq: tegra194: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:11 +0800 Message-Id: <20230712093322.37322-8-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: f5b559e9-10ed-434b-5f21-08db82bb17e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CkQqh6LoKDpp3qDLTEBXSwZOI4X042Jd+nOFuuZ6h5dgHAePWFkldjwjeMjtIYLdHij17z5yYsIdqfDTSfH4MyeySMFwwAL2XZK8eegSTFL0VekXBgtWmx7bYWQ4m7kwb/La9ATVPsNTBmDHOhPZdLsK76Evg/nMommV8hS7ycAUyDUFqq47GNLFpjv9vngsaJt6M4Zt4rEpRhFo5Jp3w1U6jKSbL1p+YZgkleI6xsdZjufyImO4g0+GYeDU88TaTkQxCTud9Q/JSiSiow4/K3OL7MGTzbpE7hUECVRcu48IPteZB7tSgkUDB1bfsQ7QWB/N8fUPJTrf0hznGGs6nzTR7kwez+/pPdhrVgJW3i2pk7+4sDLlrlxyzyqLG0IhZN2+W1zBaTiBfjLwaioNIm2l54jjCdrV1oT2/jJoSqXmwlWb2fkS8C4dtuNJogmE62SiCRDsFo8ZNgCcvWUyJ+ZmWg/lniFjZbVyzrcprNYvPYlOwK9+EZPeafpQ1sAaDKX2KNzk4JNA2NoueEOEfGLg2TTRoPzZ4qPPCKFR/c1/ghyCQ6hREREP8TYrCrTUJbCMoM47LIBBhmJuLOux3Odrg6eXr6el2syynvKkvruuJs262Znd8elznfl9Y1l9 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?JoKGE9/xyagXgUg9a1Z+gzOduT08?= =?utf-8?q?cvu8iKhdiMgr6Yipx/nINd27+j8IMWnQnKLbnwLapIhbsa1g68K6AxVKiOEqEchPl?= =?utf-8?q?iWg5/a5FH3xCO4MPuGZRzYoGDf51fqCZkR36eHZd04Y9GHz3BazMoNGjHoYr9F4Mw?= =?utf-8?q?7skdZZV59HpgnQCdQ38j1Bsqwxv5KdWGIQwrBka8GHmIN/l5D1UXHUU9jzx7HlHJH?= =?utf-8?q?jE3ro5hckRJvONwMUpJfVggl1Lnd8kLFvc4P23ZfrwsepXXXSQBycPyzZ0qQWhhlF?= =?utf-8?q?D5KI/M1egZ3Lole/wh1B1R6i/8FO91eO0RWezeQgeAgLYwuLyeSNJXxZJ4hBj1u5q?= =?utf-8?q?EGgoTlvE64GmQkajPg2yr3yH2RClz7o+Lgig6z4wrxu8IREYNU26p65Zrkhb8C3VO?= =?utf-8?q?WtDesvqtEAbXjFFlbVhC78ko7Ij9z2AbY4xhK8CG+nFBuAtWAXUnnQU14XthyOJYf?= =?utf-8?q?TA01b+iyIlTGkLCCpdDoGqT1QI8JbzdvVPlsiU/8pwlEj/zg51HNtvw/TxBSPYOVM?= =?utf-8?q?2h25RYlZy2ZM97gbKQXZQ6Ht6DAoDH4wsBiZacN70DUmp5t0n9o+pCOV3CLrrx9RR?= =?utf-8?q?X2R1dr1aAp99Og9mpH50i+avDlxkR/zRwhQ2Q8CSVHEEg/g7U3SA6O70QTo5eKqP6?= =?utf-8?q?uR5ZUcV2X4EFUFlolLl7Ng+aS2LPkSPgHNMP/dKi/RgFq2Me0Rm2qFrkL/l/DTOUM?= =?utf-8?q?ssZr0LSrSMVahMM7qy1g3+wxGHiiY34/AGZ+XXmtXec89Nx6Py07D3rJoDwhUHSJl?= =?utf-8?q?gssKx8WLTs4Uzu+jn+5pmjfXaLFIUCSUWVEmZFCI4pBZYsQjsUaLRkIBe3T8SR3vT?= =?utf-8?q?3fzbFt0PiPbujSkUwZ0yB0ZPgn4t7bXf1RI0/63FBJ0AdRjF8amjiG1DQF8JdOihx?= =?utf-8?q?9f93BwWI52pqGRhogIKimsNUy6JzeJ+K7T1tLo8+uCau2KJzmKF1AgBSUbCZMw9Jv?= =?utf-8?q?glG9ZN0+N0w3uCPDJeYdjuQ30Oc+UTqcw10RouHZQtNUf2fXSqjrgKu0uma8V+AYS?= =?utf-8?q?1W2sEk38emNuXFQ57us3eWDQGVihA3aUCTZkyxu/WrU7uz6XjwkvUu6rUhd35S3ZV?= =?utf-8?q?25V9mXHqaD3dRjWo4s4PTXSIaliUvl2jyWPR8uL5TtMSBASAnzJwSC2D6P1o85gAn?= =?utf-8?q?uyeZLaJ7NAtA0qN0NzBX5GsUx406P8dPm6YPyhDi79wH8oUkdRDDUnQjkJlgdQwrg?= =?utf-8?q?+49Iw5IQfHQGldr937LFHHTheEE0RYORpeD/9v71l6Wj5D7jbQxuWw+vLddHZrG+W?= =?utf-8?q?sc6TvSih+HqvAfk/AOMpgiWi4qSINDizNa7jD3NO75wyQXb2ZPpVgmj2v1ER9Eqqt?= =?utf-8?q?Tl7e3EIZMU2IJC+LBRTxNPzUjbUCagDr6JEuAmG1PwvJhDhp2t1mY2wekX5m0KXKk?= =?utf-8?q?16W61oco+AkSqN7ajyMXOtrSL/h/NJDOk71dqwwN3/2Zv4hSxe2lIGDqp4i1URDEs?= =?utf-8?q?UFXUu6tvvGntgJkkFAslNRo8eHpHEOHqNIgwcr1nW+yQbSsdDucGDxH0viWdwKVD2?= =?utf-8?q?M2/kx6FHYLiU?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5b559e9-10ed-434b-5f21-08db82bb17e7 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:47.6014 (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: ArlfFhyMdCwxxl5Y/PDbthFt1UgKB+5dnAkmnTPcQl2XoVlw0el94vxjOMjP3t9Lp31u2iqEurbW6fRbroGfuA== 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: 1771208364795890015 X-GMAIL-MSGID: 1771208364795890015 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/tegra194-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c index 36dad5ea5947..c90b30469165 100644 --- a/drivers/cpufreq/tegra194-cpufreq.c +++ b/drivers/cpufreq/tegra194-cpufreq.c @@ -708,12 +708,10 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev) return err; } -static int tegra194_cpufreq_remove(struct platform_device *pdev) +static void tegra194_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&tegra194_cpufreq_driver); tegra194_cpufreq_free_resources(); - - return 0; } static const struct of_device_id tegra194_cpufreq_of_match[] = { @@ -730,7 +728,7 @@ static struct platform_driver tegra194_ccplex_driver = { .of_match_table = tegra194_cpufreq_of_match, }, .probe = tegra194_cpufreq_probe, - .remove = tegra194_cpufreq_remove, + .remove_new = tegra194_cpufreq_remove, }; module_platform_driver(tegra194_ccplex_driver); From patchwork Wed Jul 12 09:33:12 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: 119024 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1026970vqm; Wed, 12 Jul 2023 02:39:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3a4qA3ZIpB2fzfIpVwzrDlcxW42rkg9HVDzXwNoY6+rJXPl7g8pZ7Cgwu3ozUq/GHQxuu X-Received: by 2002:a05:6a00:c87:b0:666:ba76:eef5 with SMTP id a7-20020a056a000c8700b00666ba76eef5mr17841645pfv.8.1689154753215; Wed, 12 Jul 2023 02:39:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154753; cv=pass; d=google.com; s=arc-20160816; b=oiDqtVTi+aPkw0apWn6ZztDPxjoW/8pDvI8bVYb3ztz0K0WPKIk+/NMnoSG71FJKq6 fAnRs0tkL4cJOXpeG1dE+1ajti6/SE+y5N0tmoliht3hbeHM5oDojxB1NUZ7aDYr7bjy Ql94UyyaTUKAsD9RIn22vQXOGnP0XovAaRpjxnMRqf6GkxWVOMOtXO4JDwNA2O2vp53D HVACaSysa/Np7QrVxoHy22BueiTBfQdPIhfKUv47pEeuOLttgACXmY94a6TjZYgXBizu BNvkCQBsy3Uyt4ZZvzt6S/66PHNuPgwm0uF33A6QPdgPvEF+VAMM9TggFtasSqGKJB54 4oIQ== 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=cD12YVZGlHFVmTXoPA/7PJvtGDdpXVHEHm/asZT4mm0=; fh=wYr1e90neP0BkTQQ165e1J1MYukgNFSj9GYxvrW/m3g=; b=AWXM/1koniWBC2E9q42IvqUaeyxwRG8LRFXVQXetlYhrdeh6z5qVZvnT+P0M94ZdQw hRSh7Ms7PxEMg8KQFpwUS42/uibLlu95HKttz81ef41TE+dmgAWvkWGjAw8KIVRGFU2/ JFFe97Fsgl5W3cQLP1DMVseDy8jeExGCTen2AKz1HCz8TfjQ1ErYIOK1emXsLj/aS6LA qTgaPnSe0ZLnSJCGiidQXMSdVEjKPGMHt64TLbXb7hhSFbknfb9TQAfbzztdWnDGGVGi vKFGsdkclSU+8a3auuWnpLUomjfnep65WWsH5mWdGYITwcl6oZMK9y4VQXB+OghTgfBF BSoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hlqnwzWi; 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 b7-20020a656687000000b0055bcb258715si2947911pgw.52.2023.07.12.02.38.59; Wed, 12 Jul 2023 02:39:13 -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=hlqnwzWi; 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 S233184AbjGLJe0 (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233257AbjGLJd5 (ORCPT ); Wed, 12 Jul 2023 05:33:57 -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 E0B2D1739; Wed, 12 Jul 2023 02:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hFGleRb8uNlVyqMZ6BKA1zoYY4lsUeBH/JNXD0a4IuEvM9MDuXPoPYX+PRCqlS+vwhi6NyDGQzvMZM0AjlXaNOoIYN/uYY1kyzn2zg/nYRnIgyX4H7epais1PIqbakWo4hnSTA7c5FUwSuTE+9YMF1ertiilVhGR1MED9KZvVMxcWhXuXHDHG9EN2Recq1bwDYbaFAJOzXa2H3QzMPrBfO1MLDD/Bd/5yD9aeycIpRD8vCcnxN9r393oCaAvVkWHmWa/rwJA0D3sJiKfxeMGUgqp+NJ6kmqYPYL/ZB6zBNX9jltNsm3uAHk70bjaa/EQ2nL0pK8Q0DXtM1qulW/iWQ== 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=cD12YVZGlHFVmTXoPA/7PJvtGDdpXVHEHm/asZT4mm0=; b=DtEnilNo1avqbFxPuP/ec34eNo6sGNxn+7XKNjv/NFoWHA5p6lQ/TbzLkZZs5pojtVv+oed1L4MVyKqwsApxEQ1bujiPirTHqv5jTL9KM6nSaGLZaexL+HrQivrTvQZKEckTYRgu6POMsqMRV6Ygtk2+yXhAoGe7HO3nbmBzMW5PAGu4vGpr3+e1MbwfhddDiufntsqL8OK6FTBCvto4vLPl4bIx6C8Ekd3kUiqJC1Xl/wulm7VfO0KNgFDaMV246Eh9K6lejakPGYGPSisFbLhmoblaJsRouqV+u8m305xQFFbU17f4JqiIzCz78POoK86qXh0SGd7wwblNGzuhiA== 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=cD12YVZGlHFVmTXoPA/7PJvtGDdpXVHEHm/asZT4mm0=; b=hlqnwzWi0j7Y5Qj/IW98RGAjrTBo7eKBru/zz7vf662yT5Vcp65g3JRDYVuG9QDIVIEzsUzBf54cQsboF//rN9GNu3EcWaf8mG6gt5Qa+6rAxaEHuDf3X/INs7+7i1h5KbLy+EtJBn9P4626s7f40EvueVO+MkMzQhd2/Ird15ubTwXS9pXBvRNfGj1zrTaWWuIBTArinfh35E9yqMrKVnszi36EJx2gWMMobP/civtQDjDBYWsGZobq9YUuCh53t08VI7x6DV6ky5T7VGsjoXoEXRGNjyUsxGsMkM8BWSbj6ClKESl/Gcm8rb9emarwx6cee1bK0AvgBrDzBAk5jw== 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:49 +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:49 +0000 From: Yangtao Li To: Markus Mayer , Broadcom internal kernel review list , "Rafael J. Wysocki" , Viresh Kumar , Florian Fainelli Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/19] cpufreq: brcmstb-avs-cpufreq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:12 +0800 Message-Id: <20230712093322.37322-9-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: dddc010a-4a7d-44f0-093e-08db82bb1903 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IqmhE9j0prBPkrJr73HKHAE9JudXx7w9QPIcRq4r+E/ScDzaehyMHE3vd/rUGPJVODbRUMEXsE0FaJlpUQnJNsQ6b088wRz7RXHqcGAdLeoPplkAeSfZU9HqYTt+UfmmrBlT9Q42N61knssL0Klf1As4lQNeG1MYqbgPdvO3FlybWjDwuSFbOSG+UUsOpxXwibRYucLBph+xiStB+HFQBEBaIn88mtWNUJAG+WPeRbh6jnQOHutzQ5lyT4ZIsXyy7N+Bb9hKRBMWX4Fwk1il7yy3ZA3V/iSaoYowrzX/GudD1DlFYNmLfyH7WzzYHU1zhN04U2IhgFyyrt6B6ihWuVmtv56jdZsoDcE/K1tJ5okbdku8+7Jpn9NGtTLXqZ8cQgSb2hhY8qpIcIhxZCO+rT3d95jJjOngB3jilfaYT23fG2zWKzmxR+QeunN6Vyc74QiYgnm8v6OxgVf+n/SXHXn44idgoM8CFzTSUNWNiHON2ngZPhlfYMfveeMq30xoXtJ/WAA9N7cOL9tdc0hQVWB5HtuY62jDs8FzSj3jrMb9jylfaDMJBrJv/05qr67p4arGxQKPwAtqex1YBIvuGqahVytDwiEkKsOBWF2r2TcdfBclY0u9JpC8gz1t3Apl 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?5vtm6bFy8Lgdry/VRCmYtEVHUOvU?= =?utf-8?q?CnBdmGsfnBkcVo5z0ndYe/gUVXi+yMiWvVRvyZxkEM0SoKv5CF5y3Pb8XmqpGsydQ?= =?utf-8?q?RNdUJUhB4m4I64WjO94DtKWfTtRQMmyo3iR1cphs340lF521cIkW2Y2DQ3qGF8P4V?= =?utf-8?q?Gnpi2T/hLJF2UAXqStvSzh6/bmT3HdwgA1DPf8V13jubOlZz85LIosVx1YeA2NGZR?= =?utf-8?q?C/pu80nRenoXHXRKD1PrWLV4s/8eI+gXJfiRlsq1oh0dKTq5OYCCnpuwaDWbdN7zR?= =?utf-8?q?tb9sE1DoKBR+YiyKmGk7YfkUn9rpx9KSOFQnTH6s4XEHhk4vAYBH3AjOv7QIWA6/y?= =?utf-8?q?PK1C4pWy50gR5/kaHvMZ61Jm7LDeWZYWdyTtnqB3kzmQ1K51+zSXhz4wKWznV5D22?= =?utf-8?q?e0BVCjgCwgPzwhNIKGZoLzv0b8tdkokdk9Lks4HF8+wwC37F+w8/65gzrw9gS/Mwm?= =?utf-8?q?0rW4c/rroat4HQOM5PXlKAAWxd/lwa+u7y36dGW+W1q402JgWAuAyvjtzQLyvjZF7?= =?utf-8?q?IaCCgbvz6i2X9ybW3lfk4IqqLaeZzg69FrEIUW9VwGHawCMtsK2mD0JY/lPA0Ts01?= =?utf-8?q?9uvM6Y7zpLm9O6FHK2NtuHAugEGykyWlIFGGUV9hjEz2sKIYvdCjEkqFfOoxToAfP?= =?utf-8?q?ynFkYexEZdEkP8lsCd1qjifcp4Z4c1EpK/k2DnqPtGMI8ZqOpZvJ0yA0w2XeOleBx?= =?utf-8?q?iQzt/Bc9bhvOSK8tbnZQo31GWj9i2wsioQvK4YUn5DUieNQCuF8uOF928Fl1TC+Vx?= =?utf-8?q?9uSwnE7LKzd/6PKqUssP4Vhlcf2Fw8wlumTkCPlNhtkTvsq1TnSCL6Ts4aIm0f8m2?= =?utf-8?q?7FQyZSjRPo496G98xGSdcy5RErfOYqoI1pjDzblk3ZIuNJgq4HqlFvOVmumLRIui4?= =?utf-8?q?iTtHRJBL8be7KSgZszXHMZRTErkOa9EpT+RgyuQ8pQa/TpfJ1XmEjeOQGyQ2TCWY+?= =?utf-8?q?tu2U4Ruc0lbeatSW+Xy4kohMoTUQD6zLEdws1kmYW1jmM4jDzAcEPWjZuLKQ5CZGR?= =?utf-8?q?PXybgrMqsErA2s/idIvHQfOU3cNGQIBtaqlaJbuchbjT3mUHqfAqNxGcOmk5Jre8X?= =?utf-8?q?im16zA6dW8oHWROZVlOREN70LfWoRvqSaiUyYG6Sk5yOoe6NuiWZ4gS9bc/n/FAFk?= =?utf-8?q?OjQ72GfqGKPu8KjP1jDRcsGvOLWXNhQ8QVYAn/ILerJXJIKw0+er5Vla/yQSFOkHr?= =?utf-8?q?40pE/JnFSp9wPvYRYTnDgfj3tAuLinjsCpklA78kg8UZLMtyOJ3P0eB8UpSC493Li?= =?utf-8?q?ise/0LDF5kyme6c60m/E2akr1b5jtpzkYooNvEgHnaZaAOeHb4toD9w/9FmCwxVcP?= =?utf-8?q?+VbjRPi2B1I0256e2uZ+d4MMvMiwdOjiE0WU/u3cNZYHQSucPjhGForMeWknq5iPY?= =?utf-8?q?+ht6qwteAXeiHwdY2+D5WU45FsNRjdSuykLdpHN5o6dshL35MwUZCjrLyDPfriY46?= =?utf-8?q?dOVmVJiS04/roLImo6L1zINQUfdJUToLYB/z0fNikUuTKQvTLGzFDCQaKdYabX04V?= =?utf-8?q?H4DGo169mA15?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dddc010a-4a7d-44f0-093e-08db82bb1903 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:49.4543 (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: r/IMmw7L285JUbyFiesPCPBj348BWrbuRxHDXd3/QLPRs0Uq6Zb7y27GJ23Y7e8sWwDfiX1YO1GF9aY9X5f5FQ== 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: 1771207134491247927 X-GMAIL-MSGID: 1771207134491247927 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 Reviewed-by: Florian Fainelli --- drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index ffea6402189d..1bdd513bcd19 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -749,13 +749,11 @@ static int brcm_avs_cpufreq_probe(struct platform_device *pdev) return ret; } -static int brcm_avs_cpufreq_remove(struct platform_device *pdev) +static void brcm_avs_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&brcm_avs_driver); brcm_avs_prepare_uninit(pdev); - - return 0; } static const struct of_device_id brcm_avs_cpufreq_match[] = { @@ -770,7 +768,7 @@ static struct platform_driver brcm_avs_cpufreq_platdrv = { .of_match_table = brcm_avs_cpufreq_match, }, .probe = brcm_avs_cpufreq_probe, - .remove = brcm_avs_cpufreq_remove, + .remove_new = brcm_avs_cpufreq_remove, }; module_platform_driver(brcm_avs_cpufreq_platdrv); From patchwork Wed Jul 12 09:33:13 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: 119026 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1027798vqm; Wed, 12 Jul 2023 02:41:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMSKon9SgUhp62FZfYaSLxPMsjtEVeewLfa5IdlqQWkr6uCh23NeNRfAq6qtbIctgqPIVy X-Received: by 2002:a05:6a21:9992:b0:125:4d74:cd6a with SMTP id ve18-20020a056a21999200b001254d74cd6amr2023723pzb.3.1689154873749; Wed, 12 Jul 2023 02:41:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689154873; cv=pass; d=google.com; s=arc-20160816; b=EhOBU6xTSH3TNo1j4cu9lzpZiW19zZHvOkiBHtUT5oXiDo3AQ87UdXXXF6Ux7g2mco kmqKc59kzDqx/dgO7+uwg7kEeSl8PQzjdGTSWsRpxMzaLbJi3rCBHbWUl2T8hhXPqUtA qJcw15IVMymagZYRXkSpTbXPaklom6LLRcBmndXN88D4G637982qj3dcPypVs7sxTkxu 1FWCdRhkRdLA/ZIxueE3H5E2iyXZVxnEuSirfy9LFIlkI+2/AY5l+MXhwm0rCtPqQyEg gt3hCr1n7QelUyXTvwwCEwhOJVioSrtaVnMFqWQdmKg6PKTc6Zr1x17mkwsrSPcHeQ2s l23A== 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=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; fh=L6a04twCHIdsZG1P+JaPyJCOhMeAtDRESGAgyEv6fUo=; b=DsPfjxlS9Fff8RmdiXh2Krl1WQiwnb1tifGIx1yiGpt0XykoWhapIN1NUD5s0FUJpV V7zJhDBOq0XxB4krZKDKsYe9bU1kCVlrNQcrwlWpvklAN/fMnB6BFPGIkln80vl4wnKI z1RKMFfNrWZiIKttZtjig7vSEgzO3fVGAxgl9b3NEyOtHExz1nNkGuc8f2fT/cXb53dD 3Hcpsg9Ovlt6m6VufozSi/dwKcDxoV1Ckizf9kSQw3jRnrjXxEr8x3AYcxFECOlJdQKh 2iTDIC0CbDgvrRAcrBqF8ldy3Kz+eXZM2dxr8mdOVb0rR43LxXn5c6uhJa3xGQoCgml6 YDnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=oqhemZW5; 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 b7-20020a656687000000b0055bcb258715si2947911pgw.52.2023.07.12.02.41.00; Wed, 12 Jul 2023 02:41:13 -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=oqhemZW5; 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 S229446AbjGLJef (ORCPT + 99 others); Wed, 12 Jul 2023 05:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233272AbjGLJd7 (ORCPT ); Wed, 12 Jul 2023 05:33:59 -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 A9AD119A0; Wed, 12 Jul 2023 02:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GcvMKRIXzEVZwyH6FN2emI5iSmvNsQ8DztwmSaKDwwkcEX9X5GLOieRPMH9CqmffaTBVYjGCxsuZBVYGKXrU+kTJRuSN5cBU+QsmiILj9UsTPDcvsRYrZ5Fn0PGDYxGQE2eaJHScc72dvi+qHXNyLjBSVqJbEPIWnriB70QvDIdlizYubeGKIGTIMMPhyDbShNBTAGodfrAzgAmFyT1/BDJfB6/R+HIPjt0Yw/F990deAEuEwr72jDVsXzDqNGGmmI2V6KQcFfaF2bsrTznxWp7Hv1Z1tM9gU7acQdFudRCcYPvlaT7fOlLQzHBVYkBqZxHrZz0n4jPGxxpB2vN4AQ== 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=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=O9guvuIeHI4wtCwYLdyxx/6OKb4aio3nHjMnGx1SavJA4Vsxz/oJGDe1ZCviskwxnZQV0DjD/nUA3ioiRYUeZ2P563iUgl8ORKLwT56Rf6tfJPkQh9TTZQAt7bhylylhatnkhd9JCH+XqvlrVIS7NwdEno/FjU4fLe4fAiymxQBjXI3SN/QQTV/fqMc2LHZdv5vDShwL22razErN0VM9dMNHJV9UihygkqgdJCP38x/pREiEDjC9w6H6t9bwhHuBsbegzW/jfiFM3+m+1yUKO1YIkdIrFMsxZu6XG0U8wQ+ngHU+EWXjGgv6IqFi9fkSW0bG6Htl/oXDRZOMGQZChQ== 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=C+IWyyTdI+3JNaPeR5z5dkNulc/M/Z1sGW+d58kuBYw=; b=oqhemZW5WRABsTPJ07ApY2jS8FE0ih5yT1huvWTOElYWTKANHEPsNpEIskbBDK7zNAbmeU+sA3QXJnRYSI3aLSyncdJn80YE2msL5Dqis40ai8nNfH/9WuHKZNI730SEcWm/evt0+63WJW9DJ4dwMoyxF5ld5mVyr8QLWTc18BX1SCW4w0+uwxY2HcWyCOBL24GOCc5HrYgbtA8k8UCGdzkNgwfIw8LmssICvbrF/5aQMO13zI0LmzSgSAo+Y0teM4YjQnMk00C1vU2gno3xqWo1pFKG8HYl058xsacitHb9f/VwM0wmRh/SnzCnFk1FzyehVk4NUqOQtn4nDPZSGA== 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:51 +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:51 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/19] cpufreq: imx-cpufreq-dt: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:13 +0800 Message-Id: <20230712093322.37322-10-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: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MpceXVcx25I1doBJ175W1Bvvqa6tUhZ1Z3FIuP5D5zcWw0SCo/qGGAAaX9lw0qunVtUjYb4BwuqNTjXpe24jGsmtuyufrxnXb/IKkSrdFhl78zryvonBOWNOkbJKrsJwLmTArylrSOHonh9POCH033WsZg5XsfI6KGTxPdKRtJifCPHtdkX4AqVeWwU7GiIp4ZyZkBNMDr9WxG/T5r5LYuM20uR0LeItmIdIqIjK4ClFx7RAvQZsC3eJNKvdw1GbQGDQZw9U1HFM86BoVSS/EmQ0jJ26ztcyv90knU/8u1g3Q7Y5hEM4aK0aabcjjC9wfMZd2pWCPPPt0Hsf3zKgkh+kiCmdDorrk9y7xR3sorR49QXiGzWX25rKWCxBQu4dYFBYOa+CsME2oNpi9wgu8UsV35eaTTBo4ubMesd1DZKE23u264n8NkgJtJWQhfdVKGWBGTodd6PzAqeMfagZ2UGPCf0HV9Y10AavB5WBr8RtTavH0qRjIN3Pld57Lb0RUQAya7fZP3iZIFpQ0z2XYaoemj7ypovqkvYWWnVgLR9ZxUEg8/zDCV9bPHvtQUmmrRftpaKb3hLp+E96yzHmCAZbskihID90+RiBA06eEnmG6srSj0klj6VinLauvID4 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)(7416002)(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?9sSZ46VyUGCjeRUxDp5/6Ax1NdLk?= =?utf-8?q?WSqYNM8zvvrfa7oQ9JVJCjPrdJVKf4bw/5XUv9GGCBx3m1NyWKK5afW7A+Z981fty?= =?utf-8?q?oZ42l8MAytTzXPwPv9ZkQFUw+5qXOQRklDRHPLBvAOfODwcqsM7TvzSy5fLuE7/UU?= =?utf-8?q?UU2yF/cB+KZPhwU4DbwbhgCn6vskA+0kc75PfY/0Woo4T1t+Lm/0pZ8a6hv5aqYS4?= =?utf-8?q?K8qZQMisXj9t07mfAE9RA/K4507zEZy18q+scEINj8Az+0rXrdSO7r8j03uF2foL6?= =?utf-8?q?0b9klACnkGqBJShuDdMsJlO0lxRK9HUpMyip8LOiud12+6BPgWoPYM7lFw28oAQAD?= =?utf-8?q?vaq6WYyyPZ5y++AEk7Y99gh33KuaiOU9qM/HWo10ingJmKsOUfSN6mXfJsRwDalKA?= =?utf-8?q?i3x0fMQEIQ9hRkmz7gzjfL81UEY7thpaaruobRQPiHNESXBOyrtUHic+9O88pZN2j?= =?utf-8?q?Tij83VeI4fpkKBDwt96Rf15LxjgDlDxNv3U4ubBpS0VKcRaqdYZYvNr3LrXoIV+mL?= =?utf-8?q?yEzu1iZDY160y0IorUsFw4a1iuD78tOMcGSS6bodWQqwg1iGxm2w4XtUjrXXMngIU?= =?utf-8?q?SJOuaL1hXCH3D4+6x6PhNdKwh23VAZLakRKbM6Pt1HnrPptiDUVG37CGZh6r44Y1B?= =?utf-8?q?VF6lSGlvC+9cGQYrsq3u03P7GzlVoLPTOJRZXtmk0m1WUaQkKAnD4hM3WT/6o0x0L?= =?utf-8?q?hjW5jUmkNa26LndJlz46y9ouBaZ9of9EHS5t8oftb0pnKw3WqxvwOTv1rZPKwozCG?= =?utf-8?q?nWg3NluZ0pnh653mE1Uwl7mFe8QhZrUf7Cx6JgNtIxZBFlUvdxC6DL8pWhGRt8Zz5?= =?utf-8?q?TJmU46PK5gNXnhqVdslZVwf4tVcMZy5jkz6OmaOfbwMFGMF1ie63CNpG1la3Cg52+?= =?utf-8?q?El/ilOBJTXSPVqE8tebYMcHTJTwwOWgudtqiqe3ITiFc5f8I4Q3hkVtpgJpi4xOBT?= =?utf-8?q?75Y9dteqQmJfanjXoWLSdACXm1nGy8Y3iU96r7JrqlZpmSz9luYTgoQSoriUBfqd4?= =?utf-8?q?wx2M9vabA0PHc9ISJRmwFNXfTGDtGCySm3XRkMiHOchcffi6GNFm94QYWMCTQ4G+m?= =?utf-8?q?PI5LmYdGhESIFcb1fBoVQyeoECf5IK+3uA8JmC8ipYakdbHIlIyR4lb0X2noG6kxL?= =?utf-8?q?I4BV/HBImYK162NfTgzt3hKcKW+ROTSHxOume2mX0ExHpo5S11cESCpYWy6HHsVzp?= =?utf-8?q?18ZT0C66TDJldQcnt8IslPAmIbaEZ8JhqJTjOSSyFsBw04XFMx2jThizhsWqrQZhW?= =?utf-8?q?CocRIZPM2HxyXN/PrFhG7CbJR4ymSVRRguoremh3ICahNpCy4Krcbx6JxbuNCefjj?= =?utf-8?q?PWjGCPWzhWgDyK2baKJV9+SZc8e2t9Y3bAlrDF1OJcDLME5g6rlv4cJdK3OX7921l?= =?utf-8?q?sgKXUGFOLNu3jYafcBlePv/Oz4bSmtVB/ZG2zisTSCUns8wSnCezvPYdvVWZ5vSJ0?= =?utf-8?q?HTx025ecCfJFASa9WRjPGgUl7SgxZPQFMNlhJZgNP4ZJVyxGjzbBCQcpr5AYu+VXm?= =?utf-8?q?0YnLS/rVLcIx?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bbb9c65-1ff5-4573-12a9-08db82bb1a40 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:51.5357 (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: XmqQVDvEVxDYXAeXN6hLs7bMbwBQB9NpDChTM9uiTELkaZS8HVq8sPesvTz4VIcQRLJz9l918fFXmNgEcoR3TA== 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: 1771207260603083093 X-GMAIL-MSGID: 1771207260603083093 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/imx-cpufreq-dt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c index 535867a7dfdd..577bb9e2f112 100644 --- a/drivers/cpufreq/imx-cpufreq-dt.c +++ b/drivers/cpufreq/imx-cpufreq-dt.c @@ -172,20 +172,18 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) return 0; } -static int imx_cpufreq_dt_remove(struct platform_device *pdev) +static void imx_cpufreq_dt_remove(struct platform_device *pdev) { platform_device_unregister(cpufreq_dt_pdev); if (!of_machine_is_compatible("fsl,imx7ulp")) dev_pm_opp_put_supported_hw(cpufreq_opp_token); else clk_bulk_put(ARRAY_SIZE(imx7ulp_clks), imx7ulp_clks); - - return 0; } static struct platform_driver imx_cpufreq_dt_driver = { .probe = imx_cpufreq_dt_probe, - .remove = imx_cpufreq_dt_remove, + .remove_new = imx_cpufreq_dt_remove, .driver = { .name = "imx-cpufreq-dt", }, 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?X5ueqERGuDxhgzLLKVvtz2hWxdi2BjahK8SH5Us8RAiCAn6zfqVGAybp/q7fnR0+y?= =?utf-8?q?DYHhUT6099CNHEjHVU/lcva9poHVMtybXonR+Bx43rblxGePSocznTYFM0pvEYZnj?= =?utf-8?q?R8qpWI3avjNVZS091mXLETMGRcvq+uc0PgnSR1oHP3wSQt0+dpgQP6R5Rg1ZL6NAS?= =?utf-8?q?t3QnMMdHpbmguz9XYADvh0Szhh2vHH4060D8AGtzUgf0VPiOL7+clHb699235H1i5?= =?utf-8?q?yZd5yhktY98005DY9HXiQkssP4mL+5zAtwAEg85WxQ3C6v2Pbfg648tTnT0iVDfEw?= =?utf-8?q?mJ41e0To7gZS2LR1Ry1kmLTvpF6KnaXCYYHUdgbRIEMnJ6pnpOH2f9/HmyuBY/xF2?= =?utf-8?q?5/pHwHUOm2svjnaE6kCjim1UJK8e/Kfn1AjlSM/nPxCKt/TD3jgSq9NdNWmPVmHLi?= =?utf-8?q?+J6yPJG8EsqusnRc+XleJQ12g5UZHDoYIKKipBWANSMcMy0vHsKw1EP60UZrbVTKV?= =?utf-8?q?2KxRD2uIocT/1mK3uFR4uncesIbBu7s593dGSbJ1BhCY8P8XDOwpy/noXCLXLYlrB?= =?utf-8?q?K67Oo12uNm7RtTKuIVj+1pAV7oPmxiaUH8KYmUFm993VFPI+sA1ZLwBtfcuN716fP?= =?utf-8?q?/y40anQFS29PBNNsuZ7Jr2eJ6mFuWyIW5tSFl/m0XE34kTXgZufUrvfxXHwn0UBz4?= =?utf-8?q?ByqEgFHDGVaAorjAR1LdlMQwpMaW71O3vdQ29baZnVje6YsQpr0jI7stJc/detM37?= =?utf-8?q?WWSuB3sSX9a1aF+Fj5zRtQeoAITIeY9J8HlVXXF4Zo/HzSuGs1ZBsNb5mx0pUCPGr?= =?utf-8?q?SsAdIVOcnWgxjRGBsVfTX7n8TqwHcVqrsyl/itq4vTxjPzHjPIL9W1SFBsr++Sj1P?= =?utf-8?q?L++47gyq6hjUzUE746yvmTdAFeA35G/L/Guk+csPNLSyfBWG8u6canZeLdvqmL82W?= =?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) From patchwork Wed Jul 12 09:33:15 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: 119035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034436vqm; Wed, 12 Jul 2023 02:58:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEN0AFLKa6pK5NgpSEAdEXlMOYmGkS1WAt66wlM8+diFORIpk7wugQxmF3cHXUGiNPC5/BQ X-Received: by 2002:a05:6808:1923:b0:3a1:9540:feb1 with SMTP id bf35-20020a056808192300b003a19540feb1mr18969339oib.14.1689155922135; Wed, 12 Jul 2023 02:58:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155922; cv=pass; d=google.com; s=arc-20160816; b=yW2BRuIPm5mjQ9WPS+vLR7XlUFSCSij15yAD9RCiRpgzwRRQIPhR90TXeRI+xcgRiH flntGkerwpR71gjwf+fza0zHWFqX7xTTrzUs30vSeheZSDBngxAxz2pKkw6t5YbENVdm qHEcgAbrcTQKQbplRYyLBFmrjhFgOUWO3K7WLUGp71w5d3Hbun7Zc3MQf53D+nYSh89f x+VJF6ENlkSUSIP4jhHUPYvGVQ/w9Hvj6i+DJaiwdRIrMzheLqDsJZXTyNrA/r55A4e+ IJfRtN6KOCtLSkHoXm705y82k3GKnfC1WCTUudmiw5L/bbaD2rOwY+b8nLVD8Sjed7Gs DSzg== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; fh=hWEChrWyK1DsQFR9vyxyrkJen4ppa6V9LyF7T4/QD0o=; b=T0Y6Tnvdb+SmRt8c9bGxM2dgOmvYKLH6xWMCrnxip8avNRM0Lcsz110XLhFd8bHZUH Z9SMWGmYGMWMAUhuk4xSSO+tRrtejqRijIipr9jaH6IgJdFliYlu4dujnTSTVLDGwvqi mxLPDmqLRxKSWCF1SrARxBdBzWrFU8RyhEKYDNNT+yzsVVMM2lFNoUj/UL8+bjP7rwgO TJYt4hIUIZpkMKtjOBZeQhtap+0qfVIJ26paifG31LAi8sQhXCj0/QnufR9ph9w6pjgi Brjw9rrE1DkOXG18/EoekTuPy966VUCxSFZ2zP2DcpWcuTwrfoLMZuFX6blLxEYRiWL9 J7ag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q44B7DOg; 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-20020a6566c5000000b0053ef469281bsi2811201pgw.474.2023.07.12.02.58.29; Wed, 12 Jul 2023 02:58:42 -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=Q44B7DOg; 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 S233011AbjGLJfA (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233318AbjGLJeq (ORCPT ); Wed, 12 Jul 2023 05:34:46 -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 4433B1FE3; Wed, 12 Jul 2023 02:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SnWpmjT+Zqp6EAabjbEYB2WkFjZN+RCLh7gVFWcIeOHGdabivta+uv+FBNHyRaPkiUEeygmqPxCtH2iWFh9V2yImNN4CNRynniQHV8mHGYFCngPWx59hBOKoOvBirmqP414QBDNozkZUAkq8kbUqjM3M4lNlXi274gkWbuwC7GAfP9vIICogpYPjikiaSCmVsmlvj2Sfy8kh3hRVwgXCdOK8jpDRUUnvvp4hrofs/lB+ERNnsHQP/q993hoRenMDlDUvvZdkDn58+RuXEQdkrEuT4GU5PygvpcQGJxMf1d2FW38ZOVYwqTM9DZ0wJH0IXBbJZMcl/xZ8Bbmq1rUVbw== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; b=INzyd/BTzbyEQk/FvKowLsOGmGvy0Hcb52TRbgYhlD8oCVqGQd/ub5XiUu6GyjN7Y7BbEFxDUsD1wP+d8293v4dGoq01WUFQshSA8nOu3HA6KcT/Ab631u1jT/FJgi848u2t2N6Tj/ICJUtrkN/E16FLGcIF++YxO3i/SvMuzI+QWNnztDcAEB6NnJGAozh1oA2AglIHi9CCGdyF/WEHqMfx0zeWi24v6rmGTF2n4+Gp2vOlgwDg5Q1WJr7UWolugyY1Wu4+gZ2wYIiSBJTgKtbDIwLyDgFxbwtPdQWCcCjnbEu2RNJzXqulYwvpZLrM7cs98PQRIOyp/ofm8uaing== 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=7XqapXEpuuFmhuwq/fZXBPf3AQkm9oq/Wl+//p23kIY=; b=Q44B7DOgyIs1xHvfngKdSxVjwRWKZmCjdvouBXoCSrASCIoASTrZxPx6768/RsqBrIZLsR8qel/IKssgkT4HIyeAlla2CkoXyuuAvYnA3vPTIblQj/UxKBrFpXwpd68O6r/VYlUqJV5ocNj1ZNJsbAt4pz4QkBY/V3jMYPHSW7gPM93YgAEs362rQcXEPGW5xu2gm8x4fqqY8GL4Pdi0JvbSiJRELj1nm9bTuwCFbDZ6RwqnMkOQRvlin2jbx75BcKJ6oMsImuHKYTwrCVwK1wPiqGSL27J1MZPpFNQux78jQKlsirIRDv2zS9mICSxXazvHPUourApji/EJCdrE7A== 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:54 +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:54 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Florian Fainelli , Broadcom internal kernel review list Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/19] cpufreq: raspberrypi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:15 +0800 Message-Id: <20230712093322.37322-12-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: 123b8d4d-82ef-48c1-3164-08db82bb1c3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FN5Xuuxp7ea2O7fvbZ6yyYSKGHrNGsF676HMetedTy2WIC6cuClhg1RVC6Gsnyg3xz7plbw9agiErnKTmxrNWn3bokQeqLxnaDviq5baz98ZwEx1FZ3YHltivfef08U7bkI9xoXgE+DyF8p3EfSc5CbALwlNgYB5B3jiFqlYrlEMZv1yIoh4mRiaWMyxQMp5HdYEkNN6pBj7iYxOcKWcO0fWZEyrME8HVoe/a6lHbXdbLhKTPLP+J/kmR1Za1CmCf/LL4xfKFZx/L4aOAGQ1DVQ5bGmWAL34KFuVCsUW0tkPECIwU05VtP9w0AyUFdDQS2okWRUTnwg9q0D/gCxMcR6qeCBN+/gIdZWZJRzXOw2rCifKj73vqRWvUQuzpxcDnBlBP+6A4G9dyvPo61T3qPi8OMwYxFiCQsHOcjBoEdqiBfg6IpRBUQ7zOGO4FR9g55wl6Gd0PTMcXC8Z8SY1l9bOPbPzfVE93G2BbFLULnhebrY/gwCf+U2n/hIB/seZAGIlFeMoBTOxT7HHr68WxEHEpjRn5Sh/cMNHJ74YvTIT1MV9xC9+sA++T8v3ujwt1FvAFt16s6EPBpIzwBgG0wMYGmlWsIWSyWopulfL+doA7C9/B/U/iXj4m7VKGgvm 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?ggm/6bPIk8PDwo3cqlK9yCxWDC9p?= =?utf-8?q?wecTOoXd1BbWVVbmtFwHWanaBosDoijHx9giR1VeoPTQ98zgyf3R0Qiv6/t+18eXt?= =?utf-8?q?kQAshyY2K4Akn6puAr8RpWadliAC1J5M87X2u2RVB4umampWF2DN3FzRarNvn7wlg?= =?utf-8?q?claGvXd/9Nv6YQ2zpowAtFQRknA9L/95EipYi44S1UoNsbIo83xU/EYYbCr4PaNMf?= =?utf-8?q?33VovRC0r7jNkWycRApKF8GruZzzPvrSQsB2HqqCR/kTS5MMXQEitIRNq9OItF4Nj?= =?utf-8?q?BudbikTuzAdzPbmlpSUCbH6kyLHYkfl3KOn9PRUWfFUKqZZcK+E7aIa8EFSHa44Kw?= =?utf-8?q?kCrcSQ8t42QSZwpjwaYDCdBqPZuci9qBxj9Dee23fEcuzx6HWZw2mlHI6U2LqrSQW?= =?utf-8?q?oX/yiImloyx+YmJzuZOJSnoEV8T8O/+Pg0JZO7Gj48ZGwozctIOdgcWPKE7+jcEpb?= =?utf-8?q?AeBsenkc2Y9jSgtL+BzidgNN29eMm8FoidlKJyGSCSIn2KfZFJ9lFkivRkh9wqANs?= =?utf-8?q?FebsMXajqAmKFD8V2gwtLrHcifUHOjbFmX2w1AGAcO6Xse3UDhGmD86rkU/hHDDE8?= =?utf-8?q?YISbbraWrgxJNhqy8M5WBcCTnpQZsiMrRFeTUPpSoVZahaH33I9Mjfag00mY/qq5w?= =?utf-8?q?l6bwvVDbmvccLa7PrG/Ru4unszZV+x+d7ECdufAUJPLZRN+SZDAJI9B8ZsQfo+k1C?= =?utf-8?q?xDkYHPmxnkypuQQnavhjYpBNFnii5On1xAhZM9iE7Qvj8zEH0bY9XL8zVV0S997OL?= =?utf-8?q?GsoKAWnwVsc7fMGNHBFa9r5J5JE7PKBpueZVHdoXt6EcnQ+53HOKyCL+yClQzgPEV?= =?utf-8?q?yo+SoYv23Mg6KZJG7uetgODgl1WNPN+62NzGZTPm4YxHdWMMPfZo6UEBfGN6vbG5U?= =?utf-8?q?h9V+XiNI+gBSHOMdwZX+Wk4boiiYzZA5VcqmyLmfh0XRFA/VKgJe6pLYtRca4eHyS?= =?utf-8?q?DGx5CRDrIAlOeZu3eh+RRnLjAfmt+AvlkbuxAoG0AfsXY6tR2h+VijleSxJCKz28i?= =?utf-8?q?+u8o8yc+b4ZvYNthXKiChcS8M2zmuWeEVpdPASyhIcmaVTmc3Jt5judEPhOOJB8lL?= =?utf-8?q?Ov1SUsiasFCV2Y7/TVpW0RA0swIFHJeRQa+dRfu98FCtkOqtMQCsRnJt40Q06izML?= =?utf-8?q?YM5Nw9wOMrzprby6NF2jvlX3wx9v5YJUVV+DbHevxO8cW+NgRFgdnIk8CAinl+Ast?= =?utf-8?q?3MH55Nfc5MDnurc6GIC9uzy8FqNEEa3/Oro0tq2dcaGmGbjZ8CdKzxkyIjLPb44Kz?= =?utf-8?q?LbtEjz5bxxYo09i60dqXMTwQSZcnPwVpMPfqjftGAE2jtvkddSTI+xoHtrAIXhJI9?= =?utf-8?q?iFGgp2uLEniS27geFsHEbqvMPW6qMlKSR8DSzVc6UW8fvEyY2cxMk0tJgwjF9VOTe?= =?utf-8?q?TyHaxVfrEShg+c6DnHtfrjBzgjXeZizyIWCjMs3IaQ45iYtkwB44ofmvWsvA6l8Wo?= =?utf-8?q?KLOGGg9uUOjNDGNpwDoXm0yTwx7NvsQKIxiqtyEiZpSaSQ0/xhLq0gEsV0jCpgDAV?= =?utf-8?q?7AoU3nRLywaJ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 123b8d4d-82ef-48c1-3164-08db82bb1c3e 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:54.8825 (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: uDRMIcZfMtm9zTRjfCU8aTaMrwFUZFeasC9w+eRYEMpDs3YApps0jKihcEgJg+1VFAT3uDxi8fZSKUK6QCgiVg== 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: 1771208360047764221 X-GMAIL-MSGID: 1771208360047764221 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 Reviewed-by: Florian Fainelli --- drivers/cpufreq/raspberrypi-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/raspberrypi-cpufreq.c b/drivers/cpufreq/raspberrypi-cpufreq.c index 2bc7d9734272..e0705cc9a57d 100644 --- a/drivers/cpufreq/raspberrypi-cpufreq.c +++ b/drivers/cpufreq/raspberrypi-cpufreq.c @@ -65,7 +65,7 @@ static int raspberrypi_cpufreq_probe(struct platform_device *pdev) return ret; } -static int raspberrypi_cpufreq_remove(struct platform_device *pdev) +static void raspberrypi_cpufreq_remove(struct platform_device *pdev) { struct device *cpu_dev; @@ -74,8 +74,6 @@ static int raspberrypi_cpufreq_remove(struct platform_device *pdev) dev_pm_opp_remove_all_dynamic(cpu_dev); platform_device_unregister(cpufreq_dt); - - return 0; } /* @@ -87,7 +85,7 @@ static struct platform_driver raspberrypi_cpufreq_driver = { .name = "raspberrypi-cpufreq", }, .probe = raspberrypi_cpufreq_probe, - .remove = raspberrypi_cpufreq_remove, + .remove_new = raspberrypi_cpufreq_remove, }; module_platform_driver(raspberrypi_cpufreq_driver); From patchwork Wed Jul 12 09:33:16 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: 119038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034572vqm; Wed, 12 Jul 2023 02:59:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOC4E4e+RPJyoCT+Kly0f0J54QbtzZruqGLM2HCAGUWE1i4jYo28kDUwIP3Ecl0XDS9X7R X-Received: by 2002:a05:6a20:3d20:b0:12d:1fba:faca with SMTP id y32-20020a056a203d2000b0012d1fbafacamr23004219pzi.28.1689155944339; Wed, 12 Jul 2023 02:59:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155944; cv=pass; d=google.com; s=arc-20160816; b=YgPK2DhCFocWKGQYS1FPBmKliNj767qpfKY345o+4kwAb4zHBm5ScvxST5xdDJu9rT arKHunLqQNlf0KFv5eKru2Pm1GMYZMVPEngdqa2gAsZoX4RfIhGckkB6VHBasM44RlRw wVgxYUGLK5dORCYmTnjx2lsGJqrQhkJ0AWcEnI4OjZ9pymHXvU3yrbd3kSQaEb3PoH0r jmVOy+wc82oTKWxwbcXl4KNgl3jMG0le8J3DlPiroTOoav/gCTn2QBP9FlwolJXxfjvh pAijlZBiXxGSM0w2ZRMPNk0F9/DBs+8hiIB9yFd0bjFJ7g7OzRRF8G5f1AO/5O28frEF +YBg== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=DN4cvbsKcqise2GkuNCqJXh6NYzVuHfP/LLS2TkJjwBohzt4vOsI+dnrXvvNDCFLgW CTPuBMQoX0U/noS5IO4QMpBrjlXMYHEk7vqhjKARqcXNISmxsbhAQ2RRQ3jmJD1WG3nV jhqOIAA7p6LBfY3tLPq8LR1T2xj6gRsSCcHIOYY6sTMvlzkVE5OCKGu367CpoCmX9iZK +BXCFi3QwCjg57sP8oXnKUyDnyUB9ZfQe5ZqRfr01vWlnnDsYVhy7EWV/+xh6pbGBS6F UPd68PkoRdthFiRzQJE8neOU7FvvlgtHXH9T02d6Hc1U8yPTO6nh3y9sHMcqO4sLi1E6 Qa8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fuhtAMRd; 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 x9-20020a170902a38900b001ac4f733007si2983977pla.549.2023.07.12.02.58.51; Wed, 12 Jul 2023 02:59:04 -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=fuhtAMRd; 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 S233298AbjGLJfG (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233320AbjGLJer (ORCPT ); Wed, 12 Jul 2023 05:34:47 -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 E812F1FF1; Wed, 12 Jul 2023 02:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZrZtV5E1qzrcitTZlF1uV9nbHzJ1wI1tLMhO7qAiZmwEJS2iyG2zt4wcBfGFfl/xHwRCGAb6lSaSXNpgjKA1os4HYI5G5E4V/YVB8iuUvt4rjbiFnw8fNOuWBYhqjfGpe/Gou7GsP3OFYd4fPfq4kXE5Cw01FRU5nfDWspLijbejzWxd7+xl/EG85E7v99GvYYMbLlmgGDsQglKhHaAV4AoeKbgr8B/R2gapD63wRoUmqpuRPBx5+obzb0Sq7EgxifssgBfKZE6SR9s+4B9GJzXaG9JshNbYofYqtl5I8KXqgwD+5C31lv1cFexoA5I+fwNa4YkTiBdK68adjqH1Dg== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; b=UNOcyUNh7al7h5BKwLklCKDiq1naW3AusdKjIGqCFCOnqm6cowMW3cv+HLi2GfbW+LFX2Rh9Nlq68KZoCykVbjEwwVdxhrZUUYMuRQ6mkyn90sFAJTduMxZ7z750/Xcb2N99CfZhYwcgmotU2ajLCxJ293RTVF8+ITlPYbuRVE2O5ywHW29v4K4X9Rqekt0bBWkIr3TRM2/w18HwdLOxaAJ8y9hBHgwSOsCselwRKUWWhh6pYWhg9BbNUkHSyf7sMOUhddAhQDpiw7goG/EMjKP6X3YKynjZxeYKYLlCfBNIfdHfH7KldlqoMIsCcMNOgcjTfmjSgQW4TNKUTXOBRw== 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=RHAWR+GUpAJDQGPWQJfK9K89QVrh/eBdAeEeYad/c7Y=; b=fuhtAMRdxhKYbWda7dyC3eRgOAjCpPLjmtkCx7+aIf12YBZxr1CUyJwuLOYQpMG8aCZ5eJh7ngBFGyw6EmxmrBs7oM+9c6DOJrJCFiYgfUQFhtrHKEXTZavmRJlTkTE1gZI5kXuMNVcqCeiYequC7ibCPj5g74Y65kmuJWlzZi5diQDlLgT0RBnnsgFd9f2a1o5+FVskjB59BIBlxIw2g+Frg53DdRlZN3UbKNkA4mLiPQzig9/9rWm3G/XLb3hsEpvJOzlW/uyKWnELWNIOalNE8Pqos7l9XCaRnvebHLqT+3Th5qWJCYlwegu5hJT+0kAQ5CoytmESU2HjzU/GcA== 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:56 +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:56 +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 13/19] cpufreq: pcc-cpufreq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:16 +0800 Message-Id: <20230712093322.37322-13-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: 292f889f-7359-4be9-1cd5-08db82bb1d17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K8iv0pXMx0d5b+vHXEv+cPGeqh6X9+mafmNcTOSJV4JNWUZO0JhpPnCl0c3x727R8K1+tAzW1pQztKv+tzOKstS8Jts6+DaBhL+o3QMxj9+QxsgszXAWq2RD8psNoSefXRgZqpzYh/3cWgnaqeO/9HH2QpI7u0Pd+35Yc+zCQerArsRuTdM/+NPyDLlIB5D+kF3ysn6H8/D1rd5giddC61KmR4CoriVwUDQHfd3zkJyPFTcc7IJpm76HkLIkqkCGa93WqRFZq13HlG6+gOo8ozAqSjz2RGjRLHppJVuIYNk9FfMfuUu8vlec/8uwc3Ri/YOt3eBvcxLF0hCZWCuWIUi++ji3NIZd/hbHKlSAfKm1qUkZ88K8KdkqGFbiEtkEiZaYInRjDYvnc4vYDGwKn3HI7dZlAAvqMSwvznH81M5ZHmmoCgVDzq1FZ+vNSyqg48fSgwb61F/U8WfsXMdfxHpEC4dXzakS6JucOTsYhxEcpkhNE9drD4NyfoGVryHtgbptTNwN5NiuPrxwztyD24zJ+tMFtjNL1rAEey2nxk3+HJjHAIihpPpRdryJLrOk+5W7+zV9ExUX1dfVcwXHuoe+11y2s8X5n5htNBk29U/lfdVLxSELmWD3szeHjeka 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?v38ZYQU7zZf06L2tHaxX6plTS1Ik?= =?utf-8?q?FGF1uRnTugNdOACfH48NI5CmgbUD9WECn347jA24qAavmVPzB7Ios13JKxlDxDjKb?= =?utf-8?q?JkDs2b3fXqKkLNRhFo2Zo5kMBPEqviX9Wow2y0sH8au2h5hLqxnXY2Uv5sXPm8d86?= =?utf-8?q?Yf8N+hAD+xGMxbakrTex6xtMRj7C2xzdhFchn5oyl20VkzrRRwCvG1YXQBnad0s7/?= =?utf-8?q?oz4PgTaio7hJPqP2qI0oSzcFar9o1eXNZcLpcfDdgw5f/R3O+R6590euwPetyHQOT?= =?utf-8?q?BsdyIqSn4myCNbPpdFxLzkc405idsikhTIehRnTAY6jfZ1/i3dalPtZgeUZmB3uxM?= =?utf-8?q?KGJUSsWbLWYmSFgwQKcqj49HvJU2C1h4//X1x5mI6pz+3FYzbNf0m1/Y3l6oxh07U?= =?utf-8?q?AZBV0yhk/VBIhC2tLgjTfF0WJ5ILVqNigOVd7xB7btb1U3OSAOUWQ0EebnvsPILVm?= =?utf-8?q?ScKqAzSfQOQYscOyVak1UYc0w1qzxLGA07fPORdPHgU94TXonEvWaVU5JSmi9i4Mt?= =?utf-8?q?fG3NtoHUjxWi3C7AL0qwgrSTrCcHcDVqyCfW+Pu95DbFuBWQoVlNay7GtAwFRRkZw?= =?utf-8?q?bo+fuIgDIr1+71kcbn7SqVwtp0vVqmQT1EZ1x9AEbsdXQxN/pcL6PVxfEdVSy6Jgi?= =?utf-8?q?g8UHuM9S3eOyWVabike4r/SpMnqRrbrqBjUEYpaqy3c36QXQqtjMc3jBTNHOWNW+9?= =?utf-8?q?t7wfQ6eUWbdLKAJmQ9rIyFo1S/BOosl3gfFfK6p2066ySdmppLXfM99uUVq1bL5Ef?= =?utf-8?q?781FPzivLklrk22O65HQ/Tk7lPx+bkqRmy3nfCS1ocxRD/OYu9cjqasOIn0Qds11i?= =?utf-8?q?mYJbax8RmkpwXkzc1Cd32kiKSrUKEdpEFQlCIcFWmIfEB5khYUer6ZirKy/8IOXBM?= =?utf-8?q?Q5tB306gg9r7Hz5RYotllpJdij+FTaffbltE3iJfQD5+9oD+lxbwNL+SfXsmaHvSf?= =?utf-8?q?tCg9qYS2qC2RYzVKkozb12fMVuTFEwT28GIBpeZmPzha2WWWzE4pkQaLe27e4hg91?= =?utf-8?q?BDzOrE1OyLXb97sCqlgcuHSmJwQXYkQKLUgS8AQik0ikGwFpDBDWFDfoT7yrzFbbc?= =?utf-8?q?uuIbGje1YAk6XmNtU6gNEqmjxMoGuWW71mY9Vg0n/9gNflF9Y1+zh9AdLJ7tgEkBJ?= =?utf-8?q?olHX9QxWpaxgd0eE2AVnBVcE0RL4QJqo5j/j6Ou3yI1KX5/mf4RTuAYDN7SYY67sZ?= =?utf-8?q?ee1Z0lumfIlpx04HC7r2xYRSb7M/i3pQrAbKEOaqrZwO162+xbtnDNRFNw5s/7E+I?= =?utf-8?q?4HKBDdoOYEFOxRJJkxzNqIfR4mXwIOKiPQTDZzISUGYs7Rdzms8SbHvGQTYNnQHN5?= =?utf-8?q?k0cKwANuRjAdBw7hICPZnWq8sQb8DEgjFk5griyaboMWjvvPe5z3Ak0NTIJeHREfG?= =?utf-8?q?S2L08ikxkX0dys1MChwJPJPltrP5/DiY90mIbvoprUO8Zxd8mT8HOWPaPXujvxydb?= =?utf-8?q?IiYe1eWtVaQKIBk/Z2cYvarV5a2x7HIvsUJQ/Okv7RvTVSZQdjsZXB/jm4uMt50pp?= =?utf-8?q?FeQwWTFBDBEk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 292f889f-7359-4be9-1cd5-08db82bb1d17 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:56.2940 (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: PTOnohbT5o1lO43d4NLr7IANcKW2NHPDA1r0RgJ899uTOkYT9Qlq5LCaTl2attdeXXpWRb+F4P6NBpwMm2Nqgg== 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: 1771208383279342370 X-GMAIL-MSGID: 1771208383279342370 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 Acked-by: Rafael J. Wysocki --- drivers/cpufreq/pcc-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index 73efbcf5513b..84fe37def0f1 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c @@ -608,22 +608,20 @@ static int __init pcc_cpufreq_probe(struct platform_device *pdev) return ret; } -static int pcc_cpufreq_remove(struct platform_device *pdev) +static void pcc_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&pcc_cpufreq_driver); pcc_clear_mapping(); free_percpu(pcc_cpu_info); - - return 0; } static struct platform_driver pcc_cpufreq_platdrv = { .driver = { .name = "pcc-cpufreq", }, - .remove = pcc_cpufreq_remove, + .remove_new = pcc_cpufreq_remove, }; static int __init pcc_cpufreq_init(void) 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/IFj05qNTWmLXPssPupRJiI0W5uyKNqr5J+lJb6TqQ+x37B/gnc?= =?utf-8?q?ULk9tlkZppL1okRossWbLito7xCheRvMmRNTdt9zYs+Ad7jK8IrgoLwGOgb8e2n/u?= =?utf-8?q?nJW+AhyZDsLp0IEq3p5dJNTLUZdYoSzjPBDfQD95erOg1tVeqyauJRB2y92sD2qDh?= =?utf-8?q?Xc33qGtQXtdM2xNHyCD8qMw4jt4a94q4sZRVxT5ztrEbytIHYBz/oSlGh7qewqjDL?= =?utf-8?q?XQ2eXk1GxZ4OluWaJfrz6OodH+IIgZFCTjoVSiUtYF0FUTl7+lSxSqoAR1U/CUn+2?= =?utf-8?q?CobzV234SmiPQ9L3+7jhqaCuOw6VBNz/K7W4Y9MXxSsiFO8GzsdUs/CMi66ZnNahJ?= =?utf-8?q?hxppj896OZ01Hg3UGgNwHJYqcMOcp21lam14a2qG0YyajBgkeu9S7Jm9oY7sz9Pcr?= =?utf-8?q?CxUkIB+JxNsZS9HYcYyHa5EvqvEb3UJAzP+OieLyl/Q0Gq+HHC3R9jEHKHxDBpc1m?= =?utf-8?q?cSuGUnBKWKaUrPv47MDSReWEedu5JOTTx2RedZbIC1qPP6JAHvnG47D6FvluvCKzv?= =?utf-8?q?gp4sVR6soqrWwPZl054+Jv1LIHGtq9PXMg8ycAHvywRi70choAI81Xj/eSgQ3YCGf?= =?utf-8?q?Mv88fqBjQ5Fu/4lffhgVHvQFMHGs5Kq9BUqHOi8xc+mfDuh5Io8Ad20CsqU1pe4PN?= =?utf-8?q?8nBwkDDDZMqyW+fGhgqDS/tgNzPJp01pUc95YV1RiaxueUEa5Gd0hXliuiZfzYZo5?= =?utf-8?q?NYiMzbZQAEqFfjV0cRUK9/D4Y/FUXWVeepN2N/hGFFiwVA3itGm4Heak/VyQqaGyh?= =?utf-8?q?0FqniUflIy/fUd4fMtrPGjkhjdnuBSi13AOSYjiiEFeo2bswv341j+9OeFKZOHuwS?= =?utf-8?q?g1lGuteuO2uKusjYUhlBSInAGnkNi3zkGlQtl43sf6G27InShXIei3OHrDy90a8wt?= =?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", }, From patchwork Wed Jul 12 09:33:18 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: 119027 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1030727vqm; Wed, 12 Jul 2023 02:48:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlFhGWoH7VB05Z9Hgh+/XAFYpxm8o8M/Qg9M67hFZi3NbrtK8m6Nd9a/EBKj9ErfQ1Im5Ic0 X-Received: by 2002:ac2:5e7b:0:b0:4fb:8948:2b28 with SMTP id a27-20020ac25e7b000000b004fb89482b28mr14449576lfr.63.1689155318942; Wed, 12 Jul 2023 02:48:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155318; cv=pass; d=google.com; s=arc-20160816; b=zYoLK9y/9/RKwVjDsoZ0+iU737fKrdfZk7HFjXtAUNIx7/Cb8fnOGiyTb/LQSOK/vB KSNSejZqSkFYMgWxnnjSVivbq2qhdNADoiHUD/cQlOyX2sowjilLNPAViVhzheGsKfhU U3edfjbNhSHPXnApAkmMFAhoTWJkbRTp396VQBlalL1/RzWQSS2SUIMN+ZkGFPIpOXEa btrYL5jZTib19sBFTdwM5q/BmkI4YpQP5tx5ifKg8zFzzKB9ZOLv3fwb1Wm4gauopo72 2yWKciEICIdIPa5iGrZVsNaKTcLIiaNSzJVYcr/K5HouTPHtm3JM7a50r8c0GEkZNfmg 5FrA== 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=RDgqDKXKbMkmxHcyQAqoj0mOTiq+h3nRHhuzdeQGeGA=; fh=v5h86vOfr8AaFhiS8k/OCDRjbXtlft6+beLaAPjFh4Y=; b=l3c/e8eMg1trAPeyoEJx7xQ6wosMP2dXlBrDIwYtbS119h3ImiXZv8rWPXZGJQoOLJ kpBJJjjl91TO3Uk6DMPK0++vGyudlKosKpaPKK/POZmG7cbwl9EOmV86MCmLkc09k4iZ 9+BwdG5o8jPK3pJYsj9XuNKT00WeMA1+Iy3oJK0lIt4HQaQxWjeN0BlyLvdEKvKNmq2J FOQxn9dO0bsyYWB33+avtZxLjai0WV9sdQ+JxKpRzkMMtoAAFM97E5E8aX7iyLdwk7r5 eZIF9Ve2DCPhz3MwxWU+o7CnnpOsHCeSPXZQQfgQ2tegXJDCkam3mvoiHIYqgE8H2+6m 3LkA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bYuwmQO0; 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 t13-20020aa7d70d000000b0051e05cc6addsi4138673edq.342.2023.07.12.02.48.15; Wed, 12 Jul 2023 02:48:38 -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=bYuwmQO0; 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 S233326AbjGLJf2 (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbjGLJfA (ORCPT ); Wed, 12 Jul 2023 05:35:00 -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 6536519A6; Wed, 12 Jul 2023 02:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wb65ea1KTwoMX3H4i8iVbWg+vYotOuCCht7horqQdUooxMO80iKE/UXkvhCyeGnOXInb9sDKjdRN+RjIvTexP2R8Wt/yAUaeZ0tHREYpjfSnS8ifDCIe6+C03VSAUbFnVoaZ+9HALk4ctuxc9WQdFwSuOxxEGakiTfZcTTuNCpq+i9sk+5OZgEWDX4Ft8sTZyFd0dVAUF6rnYq9cJaLI9v7BtyEfji1PbJvK6iiHo/TuxyNzHU04/oxYoMekKSR+aszN5NF/Bdm5cGPIR+NpIPPwBk4IEdtAs9WQgt/rW9zULT5gy2HPeC7EFIukvZL+chZSc+fUUs6v+QRj01DUDw== 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=RDgqDKXKbMkmxHcyQAqoj0mOTiq+h3nRHhuzdeQGeGA=; b=OZskxIc1HZW6+smpZy7FV94cBrtqSClNoLDcQ+7Drze7vG9owQ2I5f6PAt0VLnQGYzFK1J4p3lb9LqTnOpB+KSMLFFes6lG8gxIRxQ9WjAKsmQcxMM4fXT2y7mBA3mEeN4YcJk7rMWLRu+aS4EkY2tgScyUjkj+IGijwoOIGjhSIqy7DdURLCA+NcQMGnDj5Uz7cpFULfsndlF3nEWxrIegfEVrd4Vvyp9VFyeakwAHrnYPXZUobJS1ZrcDJ6nyzv/AywzcDCS2rPL2NqH8ahJRf81VaGiP+dLM2x6Xv6Bzq9LzSD+FpQdDOvpxoQUsZf4QzdVgEg7SwtUAEOZONXQ== 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=RDgqDKXKbMkmxHcyQAqoj0mOTiq+h3nRHhuzdeQGeGA=; b=bYuwmQO0Xx34r7blFkOQb1BI+4l4JlYfCbDSYRio2SYlUatJoEmRabXhWBRgDiakTxKcEnVOlyi9zw85YMNMoWirzPTGj1WnX6DSK1zpOEKVVKKag9kMo0uyOrD0BLFO6YJ4THRVuPX0qERjyaS2QqUllMqgtwAJqPmVvn4CeB6K5CrwXPmN3S7u/FuuQ84pnanu3qqFUEzypO5+Wmoxb9K+cC/ykLRjTefUy+KVMS2T+O9WLT37v+wc2i3C8ex1Vqku+mScIU+NuD1RyJIs9HXcq3RZgOjgslsHgL80OE/BFD4mAsvjXR7VM0hKOFoEu49k94vfmNbOK6RdfJYDPQ== 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:59 +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:59 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Ilia Lin , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/19] cpufreq: qcom-nvmem: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:18 +0800 Message-Id: <20230712093322.37322-15-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: 6954258d-ec96-455a-621c-08db82bb1f1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bEI8OyR4aDPoY9zQloH5nnCqdqhWZc8B+NO+BVVtHPQ4/YrjG0hE7RQPUIBXrFMhW3fISdaVzsa2nxFqJ7Pku85eUASQsXf1kYgbT+giLln8xJQ+2nsXi/KZPSMuGnEPcz2Kit1CsWbASAOO626ENdvN+wVTDAwAyvoK6EB9Lpy05mftPbAZVlFvKOSYAIPjVjTLVriUDWA0Sv1KAQ8CEQFNFgeWzQeuethDm0Be381ZrE2PBj0ct7GoAjAOo2es4JbWw5MjCVv/qRnPelfUyxO9uVAxbIa9L4uQYBKD3UqqMwAeqRBRgGJmCYEKRS3I/8KNl9B3vzNAEInJYZ5td4gXRVz1BxVkfOXl4mv6nY+Q8pYwQKbaTSqMUxUMSSoO5u4nA9AMeOuX4HSKLG81YgKbN2gj3oIQC/45png/Fe+jfnbhizmGw2Bu/e5EwsK0mpoY01jCZbSi1oVeJxlJ/gIeNZDPmUeHeyY1V6Xdiq3VkOugoxEQFJMtNSSli0LWC072EbN00OjLTynAsnB43F+wVp1lLWnSHbWw9gjD6h5v95WpLdWrLr1Gn1YTrEQ6H2xbCjqK3Dwmle6TbqrYTpM2si4xwMGQeC6ozDFlFFFi1GX46r7eNlCBVCoPVufr 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)(7416002)(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?5gsG5JJNwRwuiUPiVvXluT6LgzFR?= =?utf-8?q?Gi4HWM18SBr5xdaxdsP6/zYZMBnAPZ9Z6b6ueFEGN3RKpaDIEYg5UyGx7Ut54zIhS?= =?utf-8?q?XsSgxj1sFK13wQBs0Xr7uT+rx9SLbe9BFq/1wDVyx9ueyRzvQEf7RjvR7ZC4y7Qeq?= =?utf-8?q?IPtBsi3vaAAK64pbLg7Cv0p3QyiD/JVBEHOvKtA2/VM2FKAswcrL3C49ru+iOo2rc?= =?utf-8?q?Upr4bWD27ebS2kISwiyj9gLqHzHJs2MjlAfqslX1BwFyXh3QBa5Daeom3u85WTcLO?= =?utf-8?q?r3tpbEvz3BXqAvuzp5CwhiV2QaO4Lop4My4p4qJUCVms1w0dIMysrQENwijqn7d52?= =?utf-8?q?djJioQ4z/6uWhgCJDYuC7iC1TwLQnokOPy8NhvIK4nz3wqKB226WnrSr1s3568qwP?= =?utf-8?q?PnjOIb263nn2xAC91lWQYR7RoYQjXJosDluIfjtRtxRKEVQSyhqYQjvWwwOr4/aVn?= =?utf-8?q?YTIr0pdc7bZvjVwgjNTlGc2rGQ2WxmlW215vk3oDP9TyAor8KE/oV/jzs9KOkn2B9?= =?utf-8?q?gwnT32XQ/QHnxgjAdNHppO/0HPl7RPW3sNdJyWwY1z1IXmJIg4zEKEVL2lOw2db05?= =?utf-8?q?eZYFOWpTxnkVIPQjyjBlRuZO/tOHst2U7t8Q2YNUaj8Z0Bx9X7oF/uAZDybKcHQmm?= =?utf-8?q?mgAFFgekA+bmIUMJEImQGyBNPGm5yeXo0BXYsLjJsOZvk/c3A6rCeOXVoeBgDPT6x?= =?utf-8?q?lMUSDi+s9Hb9xko/1qvY4z5KD7Hc62d5MaVXg5rt7f+dp6gRQcs/IFHBCg0lpfv7/?= =?utf-8?q?pdJsrWFAp5wfdgA2TniltW8BE9MnAKxrkhIBECJFqGbkdj4uWfGeR0Q3SLR/LqL06?= =?utf-8?q?7MbSS1EjwoK9ptDeypkzQRBunSS/gSJKUhWLhCe5dc9LA8EulwHUW3vuCWlmuF9Kj?= =?utf-8?q?1WgnuxGCzMgLDicVVHbZ0NMr7/YVJu2inY5RxZzXVA73DXuN6hTaGWvJWX3fQMb2y?= =?utf-8?q?L4D7Dk1GtEXu3NA348p4A6v89EUi5TLMoaR3WzRSu+PglyhWJTADceQwMjnvvBxAv?= =?utf-8?q?SVhnviupAXd9kr5Xf+1zQyc8B1u4AwZ0f01w7PVTcPcKzdGWZPaAxzLFYcprXeLIK?= =?utf-8?q?qfX2HeQO87hHMiOl9iVxwEt2Ke8p51jEJEPQcRMVvanTtD0sJPdrNtPi5Tr9N8kp2?= =?utf-8?q?tm5hSdoVKF3OssaHY8SCxP3ES4DATtgPGHBh912vxQYT3PhPO99dSm0VmZf5FfV6C?= =?utf-8?q?HOBTLNwLEotA7Zu5XMqcEtpL4hY1iTxcbdY2qw7XivrwI7Ea7Eh7Ioi2UY02vUBTf?= =?utf-8?q?LMueCZc9vgB895yzmG/FWd8ddYEL4ccIxgVNuotBBswrsrgcvFyOANXmLk8oVeKn2?= =?utf-8?q?DrMov1KYEHhkrUKUm+3ItSrJPd3XgQcKEbnZpYf2oW6FZEoN1nxUImT0ODXdlTOdf?= =?utf-8?q?pIKCzVi7WfuW1ZTl13xovL4ss84RHu2O5Ai3jWt2qJUDbzNKE7TRHMWdbX97hmXvh?= =?utf-8?q?WfJmqDhwMeJPJFgrNtt7w35ehRzH1uVfjnt0amRrAu6Lun+nR9fI5ja5vAkeb++kX?= =?utf-8?q?mCqbQtPbqoNr?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6954258d-ec96-455a-621c-08db82bb1f1c 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:59.7020 (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: W4/eyHKF1JYR5D+1fi+Q7nCtcAL7nNx2dY3GNG7sw4ZHTopTuuo+ujUZEonG7WqROXjax1VwNNB8mHGc6s4R/Q== 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: 1771207727891753103 X-GMAIL-MSGID: 1771207727891753103 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/qcom-cpufreq-nvmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index a88b6fe5db50..3db58d5957b9 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -334,7 +334,7 @@ static int qcom_cpufreq_probe(struct platform_device *pdev) return ret; } -static int qcom_cpufreq_remove(struct platform_device *pdev) +static void qcom_cpufreq_remove(struct platform_device *pdev) { struct qcom_cpufreq_drv *drv = platform_get_drvdata(pdev); unsigned int cpu; @@ -346,13 +346,11 @@ static int qcom_cpufreq_remove(struct platform_device *pdev) kfree(drv->opp_tokens); kfree(drv); - - return 0; } static struct platform_driver qcom_cpufreq_driver = { .probe = qcom_cpufreq_probe, - .remove = qcom_cpufreq_remove, + .remove_new = qcom_cpufreq_remove, .driver = { .name = "qcom-cpufreq-nvmem", }, From patchwork Wed Jul 12 09:33:19 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: 119042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034934vqm; Wed, 12 Jul 2023 02:59:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvGC4tCIfLyWpvE61ggK963+oP+KLe11WH/10+P1GJ0b4hFzUMho8gEXFL8enkfXRQXtno X-Received: by 2002:a05:6a00:230b:b0:662:f0d0:a77d with SMTP id h11-20020a056a00230b00b00662f0d0a77dmr16983554pfh.30.1689155999173; Wed, 12 Jul 2023 02:59:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155999; cv=pass; d=google.com; s=arc-20160816; b=f0EwMUa7BZHIQvhUzOpBr/WsaaQATIjJdA+bPBvrcJCG/aBS+ikFTHUd07ktwOfMqt 6WURHzbSxQz+NZKlIxX84R9DAOrBfPf2st+f1aP8as4T4KRJ3xCD0UUXOAcUGRbljjqI bSEJ6f3q49THC+qX63Pfn8L6CTGlOIvuX9zfL2H9FYtfgC1+Y4wCEme0DJ3OrDFymYZO 6wKe5bS4DaB95CK1kB1moVSl3OOpQ2EvUDMBfIhGXqcu/+U1LSF7Pt52e6GUYx4vFTO7 ZYioTDjjdRZceoyesUeWuNwPGHY7oJRhoc4/T26W6K3+9yKTyG50q9nYwoKjMyuV4+hR 9QTQ== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; fh=aLrmfDRXO5VR2GT05st/28kNJvSGxJ0c9BofnW6RXsQ=; b=pSeHvtDec5Y6s7lq9sdJaZCUOYR3FuyaTqhR41VoGXZEyiQfPFmFi1YNHh6fEY+4yv ghyjxAFglLFCAPA3a4eFp/jctXvqn6ND/ioS3+q8FUFFN3FA67OUWJekP9C5+RgARcZ6 FIJfSKa7kLenCrINLncYc6+DW8F8NlIUDGZvJSCp7AtkwG7G+dYDumGlLpEFNB4mMedJ 9eC/Ffw9kwlTYaI+U6C2CtCdXpq+yPZvLDauNh5rv0t8J5goec5XsMOOqMs4ckRCO5Og B/V2W/r2YIlsH4Tu1pQfRog5+pdx384M9gb+vO6ptoTbNVn0RuuZ1pIl19CjdCXNLJVa ExqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JelU4UIa; 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 b64-20020a633443000000b0055ab9bb07fbsi2955750pga.395.2023.07.12.02.59.46; Wed, 12 Jul 2023 02:59:59 -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=JelU4UIa; 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 S232221AbjGLJgE (ORCPT + 99 others); Wed, 12 Jul 2023 05:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjGLJfg (ORCPT ); Wed, 12 Jul 2023 05:35:36 -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 A0D8E1BD0; Wed, 12 Jul 2023 02:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BIZ3eTciWWlQ3bkqW/ah/mjxztvXh1163axUCcviXNO4uulo5OYRvuTyLc0jgag7aC3WHAE47S9x6F6K5yQZtmZcZKS/cbfTSC+RpwdAp7a/rYT7BfRoPMplYv5Pr6kqTXaan3wYaAPILju3y6yZ9SgDRLMQqheZQBIrJ1ILIXsRr3+TaT5Ry2FwqQwtpC3mtPKtJ2EtIU27CVpfxalQ9Izwe5rp4bdGw2pgb5ZLis0COW/2DmhWmotoJ3bkwJwo1bQoCHZGki7B0GDKgaFGrSwhMK3/uz/039TFybI/0CVl8A89f7otUL+39doWp+/gNtVxkmlqtfhlFJ0BhRmAzw== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; b=ULc3kncwFTQ/cvNkYc9BnEII6+AtsEu/gXIDZGz9cTwgIa1//Obk0wwg/LyWuMvATKRfMnM9zRYfYFrKn5t8+7PS46nv/M1nd5Gc3qJdxy/Xqp+2NLpWglBj1CTlPi6uN+rZpw251QCJqv0MSamMwk+piDF/P186poGibXbpevSYhU1a+RQ2EGzz+9IIJyBokjcL2gfAHDdOpjX1clrRAiv7cFCneA+jXSZADpwlOvKF2jCfS+YBvqSWkxZx3b20F5nQRHYo+0u/1A/WsAE2bhqQnYRoAPENBza3VTlmpyY+oh09jH+XWXs3hWXyyjJIXUG1fYE+T3TCOtaEwc60Tg== 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=Xxd4pDuQMQTbe3wajRQCtOORyTdekhjvyWLURZTgnKU=; b=JelU4UIaK2FM2KHpCnoCybAOyPuXY4rwUMjzY/p3Ju0EW2H+RSnNTdUljJ1+lwKn6I2aMbsDAoho/Cr/lmGKmTRE84/Xug8oJcUYzdltMETXPwvnDrgVExPcE3H1xswmj9YnqrrvRXWtoM319AZtyRoVDp1PNcRQNODyagRSk+Kwm6WJMImphBP+a3nygptB8Smnq3fQEgNGvS1jeSrh5Cdb1iavB+SXDe4pmrwrF/PuyEWreYYEBIJmlKmZmr1uoUW8BcfOG9gSsPijxG+0KlM25pfLfC/r3fCR3YK26ZP0JgRnmpXkOuIQGWH4rkJ9TOGY3NIF2x2WXTKvs4159g== 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:34:01 +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:34:01 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Viresh Kumar , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/19] cpufreq: tegra186: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:19 +0800 Message-Id: <20230712093322.37322-16-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: 01e25c38-2bbb-4e3d-5c93-08db82bb2027 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1KQf9C/pnrOcaSMLCTTi54ctYqJn/7yVdUzCbkrLBqrza1yFnZ67pPXey48Jqjf85tNuOcJE20VLkyfe/VM1JobcjLzWmV/zL1bAkNZ59yaNKFxK9b1VQBxegjXG4a4+Px5zzo15Hpxrc6uumaUlj/M7wG86QtrxkX8fXgLVMCKXkuWZCNJJXI3yr1RbmN7T0j95gT6SeVzzuyG60mCdoHg7EG7AitKW7G3Abbh5XQ83rqux7AzF3hCrn+inS7NWeZFjVwAR8zVtgw70SZ2NtQEePqdVbbg/Irl9WGtO8lLkYpGaqtsrptNozGcZbK4ShGmQ+Bw7wK2siRicTlcW49YyxVac8JAAoEqJebCDHKBWtXCZ1U52a6U2CpwHubuWYXOZed/O72InpLWXenMxrO/Sb1I8Nm6Wo4Kmbzx+cacj7ns1g5EqvkI0C8agHIkfHY9FZBIOgQ+xxi8w5WF85nvMcTRYHpUUJ2kP0jSK7W4EHbv7rCv94pMogYva/MDhyxSlcBmxQe8ABwIhRO6eCm9My/d6AvzSvvpLhjINBN0/yPHcq8YNQXDsQFSFDto8qFQVzNeWH/61iyGntoLYyNCr/rKM3xDJjialrRRmg0FkFdNGpm8O2vilxtP26DYV 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?OizegItsKRqG+szAwCUgP3l4X8XN?= =?utf-8?q?CAL2nfodPFCt34JA5BqmuRFtrphvrhgOtwFzAC8aZAsnwksSxcA4vC/g/8v6QmG7w?= =?utf-8?q?QfaBYWSpZYqHNXRcV1heT1GNKKeAdlNPHQjtCSsFqhriW8cQGVhBa2yAKgHeBGNKY?= =?utf-8?q?PH7WFOy7wu6EBucjT6xZCZVtT9b3YWSR2ZZN/ncuzdO8ImXKXddSJ2Tzb+DiI0J5A?= =?utf-8?q?qYOnNt0PEsOsjIEK5OhhEvtGBNLRZhaE9/6zlqg75+3bugUuOOkfedAzT/w2y0gKc?= =?utf-8?q?K2/hFw6/uo60rDPRUjxll3e5RVOIV5sov125d5q5XvOYXy7piuFi6kyjTvEn0j5Ep?= =?utf-8?q?mO6T5tkqfuJUlI+ccI7TZ+La9Ll/74qk1xzMMEXnvf5E5KB2G/3dqwHdjO4GxvKxM?= =?utf-8?q?jwbjyyYXrm4nHj+B6ZZw3nCMq2NoGVNxDLq9h2PvIZjX65v8lxwAWg6QYEoXyNG39?= =?utf-8?q?rSrE4IW+06/JC+gcWPWZj5Wi8zGQoxvEj8KaePvEYx4ZX3Qekx2CZhAFPvD/wuW9U?= =?utf-8?q?HYjExv9bvNifodro7VaoIAX0Qrmod8dGrsoiAKRKwabYmu3kPqjlGHcqaqhz7glp7?= =?utf-8?q?TqkwEjFaXCO9yiwgWGv2JrTvEGiHBEAYZZohDYnph03RuljT5yIqFtpRP7Jn65Jc2?= =?utf-8?q?QieGYDx0CouXh/HwR0ExZaJozWHqqQ+HmZmgopc90uUXPJ8DD7UewEzslO9prWn5p?= =?utf-8?q?2eJcHY9v17hH3WAay1tRi0EgXMCtU9tS6Y/PLEHs0i3cieVsT/Qgoq87jmXz9RrDk?= =?utf-8?q?8cmPzuvNXIKqNFHXXkyBdE1CwXPrDNiWVdKX4yzlxPLGhyLnU4qXBvCoQ83Ui0UBd?= =?utf-8?q?8K5YyHEBXdCsnlLJMXUPoZHuA7uq4RWSvN+GQ+hTLZQyhDY6HhkgHRgH7gD+4893U?= =?utf-8?q?blb0usKes/9XI/viDGRzY+TVHIUh8MVdEYLoxr/v17QMVAobXx+J7vXdW/mLK1D03?= =?utf-8?q?WElfxi287lYTC1TOkC4bU1PdkwknBkt1o6XmezxCTn3eqTo5QxcEgRRM037oqS14w?= =?utf-8?q?DOKMsKHuyUzEBLvhGrlMROYE63HQfdxsZIaDteKC1L4W4O3xAOs8lMiwhXIJZGtgQ?= =?utf-8?q?pVXPWdJiwys+wbEL+g+zWPRdK6gD4YNlAfeL8T8Tj0zONkrUUwsEbw6ngjdkMMeiR?= =?utf-8?q?ZsiEuglslJVAJSjwiZRiOUcTUVUIQLtMo09CY1aG0A1NMz62eoZEW48BpUD87pz/2?= =?utf-8?q?l3+S7+lo0+V7Q4dNe6dkfaqf18ayrJwPlUz6RQcnk3+hYTo5PR3oeqnEIT2C3Ar5z?= =?utf-8?q?OfI127CZeqo8e9V36vGSFkeFYQZW/0c1+zrYJpxeSrlGSHnGQc6JYsiO5WVtYRaT8?= =?utf-8?q?GThQr0MQBnqppZsX7NfvuIs5KbCQcIXgeEX0Hrt9fIEw6x3ZTz3fRyvcTEAGEcAUT?= =?utf-8?q?pvwKajV3vIGw7QJSSDtPB/Czb3dJ5+HOhjeDiU8bemVkvji3Khqfe5pkhUXghpGz1?= =?utf-8?q?UJ7qPIXvqqe9SBB9n2ndrHNSMyS4nxgKZO9SRb5KCl0uaPZhOh7rmySptyps+5+OH?= =?utf-8?q?W5DM5snb7V0/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01e25c38-2bbb-4e3d-5c93-08db82bb2027 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:34:01.4646 (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: VKVUeC6+7XJkbTCA5KIsiU0tds/yuWWXxNhn190hM+7TPKW6kSKpy//ONQE9tdoS9Mc7wVyI0UDAGS19MoilWA== 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: 1771208440657763800 X-GMAIL-MSGID: 1771208440657763800 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/tegra186-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c index f98f53bf1011..7b8fcfa55038 100644 --- a/drivers/cpufreq/tegra186-cpufreq.c +++ b/drivers/cpufreq/tegra186-cpufreq.c @@ -259,11 +259,9 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev) return err; } -static int tegra186_cpufreq_remove(struct platform_device *pdev) +static void tegra186_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&tegra186_cpufreq_driver); - - return 0; } static const struct of_device_id tegra186_cpufreq_of_match[] = { @@ -278,7 +276,7 @@ static struct platform_driver tegra186_cpufreq_platform_driver = { .of_match_table = tegra186_cpufreq_of_match, }, .probe = tegra186_cpufreq_probe, - .remove = tegra186_cpufreq_remove, + .remove_new = tegra186_cpufreq_remove, }; module_platform_driver(tegra186_cpufreq_platform_driver); From patchwork Wed Jul 12 09:33:20 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: 119033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034288vqm; Wed, 12 Jul 2023 02:58:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPrhNhsFlSTGzKr1yLWFWQ+5P+xbVg34x6Jjdfj3jp0ijYsaUDv1w4o8MyosSh40bWkvRR X-Received: by 2002:a05:6a21:33a0:b0:131:eb99:d518 with SMTP id yy32-20020a056a2133a000b00131eb99d518mr4913274pzb.41.1689155902749; Wed, 12 Jul 2023 02:58:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155902; cv=pass; d=google.com; s=arc-20160816; b=CAyM1Eg6j/IbAv59hqGMetFBCcuVXeamfJSj2YfRJd4blpedhfcZwTe/My1bOhkaW2 DzbvDVVP+fTG+XLqjmMcB0uN43sd9f9nr57vF9NVbHm4iuOg1D0cG6BsnaGk94tibIBF /LeNBA90LvF77P2psPcLR1cgTK+9V4fzi86JI3ZLkH0qerdZOT2/5qGV2ygZn//JXxDu 1em9DdMVvizs9pqyux649oWljUeODEvT9WH/xxxc+SgiwCFoqCf53CXyMXmfpnXtsfPB 6sbqOBySrFsZ9f9Wyc3DgpNDfKzmLDSKZLb8HXxqKNgzJk/ocxQmKuO9GdKjyRqKxVfD CK8Q== 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=QCJxJqCS0KKYw026hjVugnxJVvGsQ/lL/AxNkg9+mC8=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=fzTiU8T1DF6iIXEd3ZuSVRG+NWHjL9amvYK4GYnRHzhQs0EyLqhKWQdu6Jd7fQbnk4 rH2BoctcLd3enuYSgcdYJnW3Z6oMQluO6EWzKz9d78mnIzTsrCb4FOhg7uNV1cnx8KJU a7I4GqT8ovrz3qiNpVBBAFdCOi1lgu/iYPnIIboFwE4eX7UC+8cJEzPwoidu8ubgTooL WCFWp3yizk3tXK5hYBdKWSaYcBNiO+9hP7W+si+kQz3IngluucJKElpUHjrULGbtt7Ut Kh1ERuSXpTi2AM26UrZXAdMiEsGG65E53qg/7dUTkHf6jK5YSRYDuOYYLvCq9AUJ/Q3J gwHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nWmt8ubd; 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-20020a6566c5000000b0053ef469281bsi2811201pgw.474.2023.07.12.02.58.09; Wed, 12 Jul 2023 02:58:22 -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=nWmt8ubd; 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 S232444AbjGLJgI (ORCPT + 99 others); Wed, 12 Jul 2023 05:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231977AbjGLJfh (ORCPT ); Wed, 12 Jul 2023 05:35:37 -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 B961B1BDF; Wed, 12 Jul 2023 02:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KuT3hNmvNMFAbPANuN3fxUKMTSnRm6y+D6a+tbLPvTW7zv7179xx88rMqODdAwHl8XpT54W70W4Q0m1BaqtLRgHLvJPFzDkuXIChwJaueINqVMBIf6xCS9mc5E8/9L+v9FdmMx41EoHQCURZazBciYUhem7TzdaC5/gdmndBjUzRob7SLwIY2GtjteJvFg+s+WSdy1X7AGiun9bMmnutLdXDO/xe1kBHrXw6MZcLWlE92Zz9bicdLrxTmaxiDvlM85JE5TyinENqUn0djh8b2+EJlD6tLD8t3zAMwkQ580m+HgAbbNQKUCbwHEN7oFibl06lND3eJ7YdE60iBZTvSw== 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=QCJxJqCS0KKYw026hjVugnxJVvGsQ/lL/AxNkg9+mC8=; b=QuXUedM7NX/U0Uo55SAx/kuN7KzJTm6wvopEGo+nFjsK1kMkvElnxgdqBLwXhjA79XFhGJ0uT1VAfaiqXDuXC2Hhppq6HztaYuozMqRe54ESGkH/wA09W1t2SyZDx/Q0Pkg1W0Yp5W0m+eYTW4uMftb41NV8JOeMSoLjmHml438WfZWGwhP02JCyUcHzlhcqZRw8FfrZt7hk2r2ktwA0TcmBAUQhegmAAkI7mxur3pCCmH8VWO2EiqX78+w9W9r/h8bzc5cClxDA08pjFFge7g/1SDN89ZanMG3zgvAuZLmZSCyfrdvOUEEen/twJsAb2Gqsz8IP7QW/VN/ZJeFW/w== 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=QCJxJqCS0KKYw026hjVugnxJVvGsQ/lL/AxNkg9+mC8=; b=nWmt8ubdlOq/bkuoJZhYaVp7QtJIVRuBmJoqv865216Pnjj3ZFBAchCsOdNxr9hMc9viQ9m93HPbfSWb1T9N8aHjSfF69J4jQM6qaAd4AjS1PdsomIhgDxcvO7Xq4RYhx/d4W4Y++WbIXgo7JrYDVrcXxByQwkC1YLY3y8wCYb4A+1mA8+BpHdh5SFaBqHDUNxJw9vmlTWm0/R51WoSTjVVF/a9yYHtJSQiKwCETI52vD6At4o8wII6WglWoC8oHSBnYvGQP5BXNcbgi/nESlWmpLo/azZmG+bbpnuC4T1q8jNz0yEM4NcWIvqQMiMEj7eWa4oMUMbeBh+AkCl4sLA== 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:34:02 +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:34:02 +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 17/19] cpufreq: acpi: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:20 +0800 Message-Id: <20230712093322.37322-17-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: 9b5658ce-a5cb-4a0a-0c8a-08db82bb2105 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dmuGR+XlQ+vsaBwsl7o+pCda837dc9Zn7b/Nl5/McPX8ajaIGzzsiLmPrtc8AYfFE7RiOH/wF4iAJqQee+4b5kLQ9bLRo+ZpzcmCr+Ky49ShEA969X7uNI5zBBT6BI4ChrAmAArpw76PmeN/P+sDlHoqloOorxo01Yx8GmxXWN0o6+y2RFAehXtaAxUDMN1Y6/cHU4SRiWJAqp4VBY2C3Jv2SMrSK6CiWD3ICEwMpey5IJ2oDMGK/LErNE+UQRQAIzA0AXZCedOzyivjuQ5zsAeLw+axDJbrXBNxdYsK66pqcw/4x8ffyLff9KlFGxDcbzaNkCMuKFMmd5zaKqkMHCXxcmXJcZRu/Na6Pai8ufB/tT4FP4Kzvo795lEYGjAPzTRf5sSrl0UtrRcy0qxTyeQ4zq6n3u95wG23BqKF/PHGLXpPPLg7TC813pRqNMWcKW3y9jbIT3sXkjhsaW7HV9mgHiCgGi/LtZaFevuPVCkS1lfk2hIKSnfljnLWCI81knYFpDWD+MlE25jvlNJXrqqI+KajzyiOxjb3EeeMCA7ddhXuszhNvuzn9UQpx0vs3HfS6BESoMSOVLHsqTMphtBNX3kmfpa9slXR4ubZBcS4g31m5lZMcjzv1y/FjdN6 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?MlYlOaDu8uznIfrael+/dIOwbkjV?= =?utf-8?q?IFczY5qF824Aph0tWaz7diSMjW7SpT9C37wkCp2pJNIJh61JsZkMiTtqac4YEpndJ?= =?utf-8?q?ypy5SpgUe1H6URuYlsHg1EsJDjOKaGQ6r1i1NYk5/62uETiM0elHbslYJ0wSy+Q2u?= =?utf-8?q?sdTqjqx/ZsQeRp7Ua1NTEgB/BGeWxE9pKFTZQ+cRtJcJVmvKorlzd+wgwCuRr5SgP?= =?utf-8?q?0Ng8nCKBDVF8jFT4Z/0GCbB7Kskr6zJQKZwnTi41bRk3TV/PUeapgbfPxIDYShVXZ?= =?utf-8?q?cR3et6VBslf07dp5po89ZfRpxyzEJk4nE/r9PYYlUEmIjvc2t7HiW/uWkBfCdRiYK?= =?utf-8?q?S4D6AoZmBWfRQ54mxeYl6ozlHNk9N+Y4SbdM8YynFcfO2fNaSk29OmiEwuJZ5sTOl?= =?utf-8?q?xDOTWtSbjdXAeINZQ3dyVD8L6qTrRjSWqp2xYlbeq9dEf1RXeHzdtzJGEPionrbAe?= =?utf-8?q?+37i5ekYxYRrFvTPR7OgQmtzb1cUOs8pBm50LBaUfcsJ/DZvrPcqrQT3/wyNr3VSr?= =?utf-8?q?NpgvgdEDDTjOuIxvtz9Ga7ob1JiJQqtbKkGSVP0Kt4vmq+CQqSezUkoLTg0CRsQ8h?= =?utf-8?q?Ny7X+ClqxwO4WfkTcVqBzjKlSH2tQgqSEDVtghDuU6NUlN+Woxux5W2ujKb4PXOeE?= =?utf-8?q?xu+pqn1UssTMbnoyAXuVaOHSrtCLwSiPm0Pda5Nc+3ZRw0BYfbslz2ZQ9Z8+qb3xT?= =?utf-8?q?mEyjtGxvygI4wJOb2fCwVdaaxicMZZZXgNu6H9+WToLhTGnuhGYJ2FA4wS/Oybecy?= =?utf-8?q?5jAqdYg78GV087FGep9WsZA27xl21AUr/cyAD/AxmpbS1rZM++UKyWG+jQSHs4/+Q?= =?utf-8?q?kcfJesq19YiMlcAh7qX2dVjCS9TQZ3TS2QZXHJAuSMP/pHgfu3p/mqC4e2hKWHZgQ?= =?utf-8?q?EuaZWgPxoPxfPPniICDNZPXOSGHsqmF1A8qtxI4wPxVLT99IVXcxxswNHK1mXKf9Z?= =?utf-8?q?GV3uFkv/D7ZQ59EnrcdiLTQ2FFA5KFcpiqEirH3Bs7g4q15SeWKeokCMRPCkcwrM8?= =?utf-8?q?WlC2oDDf90QbvjNbaWzE1rqUtDBLzpb8sGvPfr8ktwY73wk45DLUNicnCrdsOiAU7?= =?utf-8?q?a9A2UUqXPUWdVIq6+6EGpJNMLpnxnBpn4ZPaHX1xzY4FJ8zcycnFmeznIrQVPwlA1?= =?utf-8?q?36Fx5voN8iQrQeeLKk3HvNt8h+hfsMQfYjX4SZu83VMQEvWlhSZV8AWDjJnE6HKRV?= =?utf-8?q?BWsNYg0HpzREdoxLTnnMJusSsoAN6EkFUJKLkXPjYez7P0cr1eLmN+5a+ydsiLItM?= =?utf-8?q?enpglK8I6nmE2/TSCBle/7dHPGNLuT1+BfMedGyZ213qJ9EUm7oQWKY9j57jOQcsV?= =?utf-8?q?C9lGylYu1EnXUJa9o9NXHUyrF46kGDrGoZE7Zim2qiCT2G5mMJqJ4dWEnmCo1Sijd?= =?utf-8?q?ShLoAhZmS2n0cD8YajQF883qJigKUE8ccrSaT0qRh0IuVLbP5HH0+iq68a2BjgBR6?= =?utf-8?q?OJKzOY1YYWti62vIlbfI2CfP5OVMioN6aCXZScQhUqgmxVK51pcqLK9E2r4pMzwb/?= =?utf-8?q?eyCGojl7H/PY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b5658ce-a5cb-4a0a-0c8a-08db82bb2105 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:34:02.8930 (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: +O5tqYl8IcGf3O37n5vRGESFvwe51tI8SSV4x8FPQY5RpXgpXtC9wPHxoLHT5dveyyF7Rw6JilYlA+Tfd1p2xA== 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: 1771208339595990345 X-GMAIL-MSGID: 1771208339595990345 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 Acked-by: Rafael J. Wysocki --- drivers/cpufreq/acpi-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index b2f05d27167e..37f1cdf46d29 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -1011,22 +1011,20 @@ static int __init acpi_cpufreq_probe(struct platform_device *pdev) return ret; } -static int acpi_cpufreq_remove(struct platform_device *pdev) +static void acpi_cpufreq_remove(struct platform_device *pdev) { pr_debug("%s\n", __func__); cpufreq_unregister_driver(&acpi_cpufreq_driver); free_acpi_perf_data(); - - return 0; } static struct platform_driver acpi_cpufreq_platdrv = { .driver = { .name = "acpi-cpufreq", }, - .remove = acpi_cpufreq_remove, + .remove_new = acpi_cpufreq_remove, }; static int __init acpi_cpufreq_init(void) From patchwork Wed Jul 12 09:33:21 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: 119029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1031833vqm; Wed, 12 Jul 2023 02:51:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlEb76C1LLXZ03X6/AAAIsPtZfI776Lq6bTE+eEv327ZTcELqqiy0+/jMGbQ/4DIqETARv8B X-Received: by 2002:a17:902:b187:b0:1b8:a39e:ff4b with SMTP id s7-20020a170902b18700b001b8a39eff4bmr1777875plr.32.1689155487361; Wed, 12 Jul 2023 02:51:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155487; cv=pass; d=google.com; s=arc-20160816; b=VUKcXI+omv/mGR/JVeaqDmQc6M0Rb7QkRU6jpMGXwENG0sZaVwqOyOPc7IsBKnvHnu 8j1jZ7xeRxGW/jeeXsEbGPCNa7ZDMLYYrMYV9TD5Bk0NExvENJ9BVE0nKlAZxHsquX4r /ww9SfYXZ/VwFV9iSwCVtTWPKJQ01nyoXdqTPUVgA12XrARP+5irYubJK38SmbuZA5IG CInIIfG8zx8yEmE0Yv/mwL2bchPqm5FuRKrC6zx4a7Q9J2f1f0mCsfw1EbPCC9JObfN+ krXSUbvrBfVT1xRakCLzj+F2dYc8CPNafOo4wl1uZCgPgCBspw43HcOlH/GnsUSRoK+6 G0gA== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; fh=792QnPNe7B6CJvN2sfEQHjHNzAPA4mlp0TVXfBm6Avs=; b=fyD8XUGCxli6mroEdVkr77VPLFQ7jS8VTtyWA6KuyyjA+2iBOIPpKxFBQjFMQtK+DB xjkOJ+ZoZcpQ7xECPob8e+z6Af30NjbK89MtkzBNI5WMyNlYErJRHPn0NsXXlgEwlldl a7xNeG/I94xPdzhrNG5Cd6n4be3Wb3VOfKoscL2JwAx7ZD2qOQCPrWOVQE+iutafSRQZ p0b5V3+G+UHDDMRqndNhem22Scris3XElLQNM9hE+DVuv4Ft7eMPw0QSSyndGkr/D9m3 8/mB2/BHvpZTtHF3jfh7CT2C4Hxrswfe8Etvd5UTmx3cCnLAjkacJrXqh4gvv617AUdQ ooZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QkMeTfab; 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 j190-20020a638bc7000000b005439273f2a4si2878818pge.139.2023.07.12.02.51.13; Wed, 12 Jul 2023 02:51:27 -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=QkMeTfab; 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 S230241AbjGLJfU (ORCPT + 99 others); Wed, 12 Jul 2023 05:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232892AbjGLJew (ORCPT ); Wed, 12 Jul 2023 05:34:52 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2105.outbound.protection.outlook.com [40.107.215.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E777C1739; Wed, 12 Jul 2023 02:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CeDFJhfu1rwGChvtBj5KlLTtH0cvO15KzwOvc6u+Chgfo0lqmxTgPaoEoDeKfU21nd4i6bf2rP+HW2PvS92PaEN17Ol+uNjbw7r5TXFoTrfGDAmuy18WvmzHFaBXTQ0/OXa5RuJlUK87Tf2LmnmUPNFU/p8eUGA+T5b1epweuu5AnUUiYRz2RCIi3jbg852TzC3sRtOvX+uniXZlWD98NM16qdJ2AsYnpy9Ifo5+/Q8GMM3p/4gURiM44DbBDPzDRh/yRWbbgysfYL6DKrlxJ10rmGrZaFkMsiXTdHfRrOmegTUaGDM3xNjn7vi/sO9JxDG7JOpSmJeJGQyERdYORQ== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=bEG6gTPM8ggnVECK33LiDG+ZWy/C2JG+NakTN3ZCD4C3mOW7T3H3L5yGHl9ZpB3kcPNb7+HLh5MFdOqwZ37ecHGLLlqzFH23tjDOUt6gFmKiIpTwQ584bGn3f8HGPW7TSc2AdImPHsYfDnMUyb2+hyiY4l+Sdy4gxt6FHbv2ApW23GYd8H/WsDoLeh1V9H9x2nohQLhwUMJeLZhaN2jTKLCelOsk9ps6SprJ1XpupwZr25PsOzM3qcAEsYB4K9mgUOWk47tmJ/FXOnL43FEjW6eGYKMFtvjrnvF1iq4YOh1kd5yq74lqaIO7fhqfsBFOTOJgxnJqxw3xi8sS9/yfxg== 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=KzVbD8vpWGYcyP7wC5u0fG3SruaXhfw/VzRr4XIqwA4=; b=QkMeTfabHCg0orf7VvbeQwU/KtChKvbgyq/mhWxYnTyDXic/9ndaHYUGe0mn8Y8uNztltJw0OUsmtSooGe7CpmQsAMS8Svzrq3r8xhmpnjx+KLNQgr1XrB98mwonXdbWBLm8FRwgEsxfhSAeBTU98iY2ofSIXcFDI9VHnFbydGuuhMlJgkyvjNryxoGaDZgLp7X2KJV72ndRG+LMbDUdPyeoQ+cB4D5ioIjgKZzest7KPzMUmAttDKIDvRWqO+j8IsRzLwKfOz5xNhLt+FcVZ4+if6Krcc/HNsaU+FCuMzkb3UTp9gK6ch0QWkkROlwmxbEvZwvmtm5VTa1rWaAqUg== 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 SI2PR06MB4091.apcprd06.prod.outlook.com (2603:1096:4:f4::12) 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:34:04 +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:34:04 +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 18/19] cpufreq: qoriq: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:21 +0800 Message-Id: <20230712093322.37322-18-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_|SI2PR06MB4091:EE_ X-MS-Office365-Filtering-Correlation-Id: 42dc6710-9b72-484c-bc91-08db82bb21e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yXrkZ8wcSkWAPriimk6/T2ZXK2A6DyZnpwa0BMlrE7ncbGGeWeGLynbhgPzyUxfbvWzAtx1cn9eavSGO+sVi8pYtdZRNUndm2d7ROX3SwblHpM7ElzZRK2PigqmzfzeHkhr0QmP0j+3bBQ/ObRSLDuXvJOqCLZLeOX8EzwQGiapYywB8cSKojFnfj+4bfoNZ+eBzuNjhaycv4qqPGx5GeCBaAxvq2XilYW2iX419Zk9Fbv+9YeV3cR9x7swcnIwdkMs1oO+p74MwgMcqupjbwHlTJqVLedn/S5cXrQ7g1vz1OKDoHBLBY8asXc4vLR7WjS3TVuohJV6weQHyfz/a2o+CK2TaKs4BpIUd22S1r5bcZKNv3PDjpwQq0eu4lQoEJv7oTeA9GMolxI0w/SN4aejyB5kDkzdLDsCbQxAUd/uhS484ykt3HJh/nLEqES81Hmn0NlFftyJZPCsLmT1hTW/ItaLLcQDnVzpghAkGJaSn3WQvi5CRLYpxId3NjyNXPCm0ER5l5KQMhvwmqQj48FqS6N8CBrmaf/Iw/C0ljaHsGSyQMnqXgWC6g46SymAnLsioFeb/PSeWVhIu4Lm92ZFedn6Wp82FCZj5E2R5Ju0kwI8NhMKuCdNK/yktB5UM 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)(39860400002)(346002)(366004)(136003)(376002)(396003)(451199021)(2906002)(6512007)(38100700002)(38350700002)(83380400001)(2616005)(186003)(26005)(1076003)(86362001)(6506007)(5660300002)(8676002)(36756003)(8936002)(110136005)(54906003)(6486002)(6666004)(52116002)(478600001)(66556008)(66946007)(41300700001)(66476007)(316002)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DjbUPxmiByXq9LhO6xPYI3+X+f56?= =?utf-8?q?uwFMMP3DwWjK83kWrFkZl67yqz6NlzuHPxlgAu3MHN2hO4cNZdYxzvDLcx+lpn4vw?= =?utf-8?q?REobkAin/ZbNrn6F/R2LQwN5iUBJvP/pxOyWH+kmcdOZ/Op4sheot/RaCsbxcwhYC?= =?utf-8?q?+v74XzexkK9L4BGSLk2iZ+2gBrkUUZWoVKDX4Pht50ydXrlAkc8LCkjQ7H1mmX805?= =?utf-8?q?uaqv6pwOwcbh9FrFE3bzXTuEuWqBdsHtsCNXn17cX3Q+2PoFyD2esXutdrLbIU1TS?= =?utf-8?q?zFdZgtxqICV2nnzah3setUE9r4rDEvHPwahUGAc++CqZIlWZBuRJtwqt0c0dxsujk?= =?utf-8?q?MUFGWXMl9uGmi0uQ+vKJEnked1cpCTXYdoFv+5AP5qqtW7gCFfiAxBSXYcYw+6us/?= =?utf-8?q?N2rECrYUW/AHnUs81mNplS0r75ZIGHkjQuwuykCJRFAuSW6/oqqAUcY0K/OyZiOMf?= =?utf-8?q?tQC+Dav7hP+q0OADGlVMdfJzYhe2KMB2pxZxqFx48/B8KiunvqtBTK4+C+djmRayf?= =?utf-8?q?ysBu99IdgbfkKIMmNjOzgRNdZ+aeDuWBLkT+16ASJbSmBYOLHTs0WmAYAgdWmhmcC?= =?utf-8?q?IZCS4EweeRvr26v08smcToIbgnJpBkpfcNNigrF8H87w3SOaz3XqEwR0cMdyfZZ/Y?= =?utf-8?q?LnpnsHGBzJsIO3Y3eMmBQnty6ZCOVXc82eoXo2LYFsYNaYkZ5p1c4TV+mSsZyp48r?= =?utf-8?q?v4krZEREqfpT7aK+7VVgeih3hPLJpJHZ+VAZmtRBDqtSpJScQNqqsgKlX190goAoJ?= =?utf-8?q?gDBAF3HgIwHv6Bmpnjyy0PQ9U1e0VVdZbtDR6O0gawGy72W4GTdh6zPDu9qIOpv2E?= =?utf-8?q?SEvg4KaZ4J0n8oC7cFeN1VZO9clidzKVsinEtK1s0UDt6uOxR5bz+SO/1QDZltYZT?= =?utf-8?q?at1KTs6WtB29qRiHaKSEgM4Fad6VCwxzwOIbam5JSJCWX+xsVKCxqiJHRqxAfdgEo?= =?utf-8?q?0Okh4JwM9K+OgS34QDmUIGSc2h87ZsHGXrm9rWXJ8iHgV6rjNSjYUz3NBVAwAZgwK?= =?utf-8?q?RtSO2VnTQ2H5X2H3ETeZUZpRb72x+sU9QItng/AZ98H9tAFI2BgmbJeW2clvBivoJ?= =?utf-8?q?MpNxyBnKTvMvrOxY598jHOCaFlc9s3P3wi6/jm6yIHIQKAGOzFOUYA2EYGXf+MpaZ?= =?utf-8?q?58g53aGjInRTtL9aTOQ6t0ItnF80tkIP7PxQk39vO9Obrl1wmSKo9o6/939rH+tOe?= =?utf-8?q?xg1ZAA87msq7eL6IpXpqIogXNVkdEN2PZnulRPqcZqO/x962Rm3hrmTgzpF0ecMCH?= =?utf-8?q?qB2zHKqgAkqVdVRzMGesvnk23ik8t3+h0YngG7WEbYwNHDRsbtRojSRdSOKTkK9fZ?= =?utf-8?q?4WjQSsaUxrRWLHbxp4+BCH9QQHqJlVABYIP/tX36buqaFuAV7aCVBm55z+HBA2tNa?= =?utf-8?q?2YvWyHTeah/4AdOZuJ4MS7CRJyHpJ7tkyUFKCL444muerw+OAi3WA5E+Lm4D4GJ5k?= =?utf-8?q?xiMik6ygCn0MIo0o4FwUfxJ+dPCcQqGOl4XYgHqLcfuEH9OaX96ryCWoQ2ORoRYbl?= =?utf-8?q?Yjxt6O9+LE4v?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42dc6710-9b72-484c-bc91-08db82bb21e2 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:34:04.3592 (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: DqRqYoHmT+YwW/3C9s6slLChYDfMPtGvYcYPQ4do7jJNvsjIUZcMqCeEaOp/Lm+etROUr3HJ/01PKO3XhRdKwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4091 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: 1771207904266707477 X-GMAIL-MSGID: 1771207904266707477 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/qoriq-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 573b417e1483..0aecaecbb0e6 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -288,11 +288,9 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev) return 0; } -static int qoriq_cpufreq_remove(struct platform_device *pdev) +static void qoriq_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&qoriq_cpufreq_driver); - - return 0; } static struct platform_driver qoriq_cpufreq_platform_driver = { @@ -300,7 +298,7 @@ static struct platform_driver qoriq_cpufreq_platform_driver = { .name = "qoriq-cpufreq", }, .probe = qoriq_cpufreq_probe, - .remove = qoriq_cpufreq_remove, + .remove_new = qoriq_cpufreq_remove, }; module_platform_driver(qoriq_cpufreq_platform_driver); From patchwork Wed Jul 12 09:33:22 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: 119039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1034748vqm; Wed, 12 Jul 2023 02:59:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlFYM8g2iI5IyNYZjhZRW2uRYlZ39HYhQ72Gv5hELlLVPNGyGwdBGzyjsPPmTljnUI2saSfT X-Received: by 2002:a17:902:ab01:b0:1b8:1fe3:bd2c with SMTP id ik1-20020a170902ab0100b001b81fe3bd2cmr13343715plb.20.1689155972112; Wed, 12 Jul 2023 02:59:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689155972; cv=pass; d=google.com; s=arc-20160816; b=hX5dVV0DPbPxO3vMqczfcPdzlJ399hXCHln1O4A+b9xmPt3y5VzudvrWsHYTKUpFOU ytvNLdHQzimphqhOvjjUAycBEPmMoIyDvX5ayy3+7drA2OBzC1eSoEL2qrNEEeET/Qg1 cYUonQ3q7TyYonfkvuHiFmfP7bc9+N5WVDVbNjjB3Iv/H+tJ1W5RqWLxe/8GMB5+Sk1y 3MvA/tuFLK5JQSGwlfYdXXnzL09iOQvOypuGYtBPTXt2vnjzwMt9nX5ErM1q/H9zjdyO Nue+rUpPyH5uW9wtBHj7pcAJCZG6WpYUKr6UPuZlB+VeFv05HbY4jNOD4DnIjaclcWl3 HxbA== 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=ODrWtgSyv6IxrZtWeftArJlnezTb+OKVjb2Bn6QAOsk=; fh=2vjOeDKXf7eIBRLE0OeFzFmFRrw/jM3CJ5w9Uj87a5U=; b=S08L8I0NEsMkx0tLMKOoZHdK79mmrW7o2Jku/M/AFG2khGm7jqy8knhfpiUGJsADjo TU1jwCrCAwknU9B2Q+wG1hhOAM/Zlk0y6cXDusJHRuLrbZZLhMSFTm8aAaDBZqzGtBE5 6H2AcqoppMZiPGxLqC8PVb1/M2vnmIi0/cAQMNvC5lzei4A2z9v6DdEJYzFZFxKn23/E oSq2XUZZX5WJazp6rHUw9jij86vLNTUHXZmy1IJlytb9+WAb7CMcdV7GnN31iH3PCze3 9SKkQkxclSTXWlLq7NQLayEzsuCI22SZr+lVNa0P3vtDg+isQSJJCbrVGcEe2IthFQA1 if1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=h2hzz1KF; 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 x15-20020a170902ec8f00b001b8920564cesi3276925plg.17.2023.07.12.02.59.19; Wed, 12 Jul 2023 02:59:32 -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=h2hzz1KF; 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 S231494AbjGLJgf (ORCPT + 99 others); Wed, 12 Jul 2023 05:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231309AbjGLJgB (ORCPT ); Wed, 12 Jul 2023 05:36:01 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20717.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::717]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70FC210C; Wed, 12 Jul 2023 02:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tbvur/pRKi8kXhRS7eys95owGe3P/wtsE6/mG0OTzcmxKnjk9pHcdKg+tDcUjOmx+vV9m8iBr97HYJGPlrLph7cPIUSTRLN2oCgVuwHwzmN5+xhwO1bMKIRrOxSuInyEr+atq9fRQAWL/lGP/y9GBlp4Y4U4e8iKDbxtNKsPwRlTJDHdIU3zXse428dgwEgVdX/fczLrjK3JkvBqn62NZxfs7Pmsfq/R5UfwXIIo5N1ZwLHBV017ZWli//UQFIkgOImAYiw6GZ9ndePZ3sV8MARQbkqeJ8sCabWjwPhK2aIPgUq59nZDr7Neut4UXyjSPQfQZO/uvSn/rPwu6ZrrQw== 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=ODrWtgSyv6IxrZtWeftArJlnezTb+OKVjb2Bn6QAOsk=; b=gTfZYjS92d0XR+SYmX1qblgJsPRINkRvsxf9eu0ZnKRzG8O+wd5hPpwuFNDzqPGm0OAwJxzKQ73WlkR2ON/Uyc/9mxIta1icUyK0z2m7LndtQv7RhXtoG3nDfpY/Ugt4Jqxgzi2ONyx5q1+6JCYfdsz4ebmPGsePn1s0ArHIpMNnFGu/ryklxB2P0HOHWRgn1aUVkkklmI6w6cWPKniSJh6r/S8H4JzGejLuGNBoYmVF5maiKK/ABr8xSUU9uS0BGEc8jsuaAASjOibb7DinVmeGgqGpbbH0M6ycH2U99muRBYhCGbDXJwNd8dc3QlkQQTVm82EDUCwpLUcS3sMwOw== 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=ODrWtgSyv6IxrZtWeftArJlnezTb+OKVjb2Bn6QAOsk=; b=h2hzz1KFRbqLCUKZD8WyFEFlfVI1ii672aqUcvZ/l5clnw2CoAtvdGYuJCAqDDxCWtmR6rFJavtRzPRaIjNyl9AisBBemU/XVLHFzowe9YdriREbeNrfDxPdkBJ+geVEsBsVpuI501r1WvPxgExkqjIm3twtijulE1Qlruc25JSjj3iBSc8NFhuTQF+tvmQsFrLHYbqRED94g41JxOZoWV+fAVcW+/bX7vdiHpvui0KcB8CmdJ+1Cb93OMw7jQl/4jdEFf1LA5+L2Y3ngJnvoxpoeqZOzffvRRgvQZhANUsfjxC+KlzUZHAwA4UuOBhQgQa4Ws0u1k58ZpvN/oxwgA== 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 SI2PR06MB4091.apcprd06.prod.outlook.com (2603:1096:4:f4::12) 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:34:06 +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:34:06 +0000 From: Yangtao Li To: Kevin Hilman , "Rafael J. Wysocki" , Viresh Kumar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/19] cpufreq: omap: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:33:22 +0800 Message-Id: <20230712093322.37322-19-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_|SI2PR06MB4091:EE_ X-MS-Office365-Filtering-Correlation-Id: bd2f3c1b-a6af-49af-69a1-08db82bb22df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IjA7tQfQp5TDT0TflhR9cqw2D4Fcm2HIsS6GE7zef6O+5NZ/xWxO5XaJxDkJX336efbuh3nEOu19eaWLW17HeWdDNyfqfoWMgS2tYQziOk3kFnEU0vSzv4ahHjzKJS1XB3oN6dAmATJMmzSPeuzoj4O+MT6l6BwJA3n7OsYy0FVt9eSKuFg+GWzjY9vv+I5tJFrpm/fJopwskD3c7I+lhPxD+yo3TiC5bugfCTwjIVeVL8ZiTCFHO+KANZjmyQNQ/63BkAfSUpHVUi/uRbSJV/C3AhUKKQuqRhmlfLcR5bQBdPKSoJmqIDp3Z+f3QvdEmMUfPSFdmThjSYw+HamPTya8rm+xDNAcv6p6csItiS1sZWNlGbR8hCl0hCVwVyXWr9tllbNO3R7vX4s1r5yHvFOpYAu5SXcjbdFcvd97lrYxWwoC3LiDcXQwQ+uMuA1QmVDdtumWZHXvM/4VNjN7wHETAEVXk1xsISWvqsKFjM/+5fID1LZWfYPvkEuN+U/oKUIx3kBnDI+TxmjvKRDCc/mr174J+reFE0PILWLIFfXQeRk4GhE9WKrkbkbjch8d3QQjG+AGukHGei4teqa4WCV7htIWQ+p9Nai/H5vqOXrvLbyGheWih6Ny2qO5KDAE 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)(39860400002)(346002)(366004)(136003)(376002)(396003)(451199021)(2906002)(6512007)(38100700002)(38350700002)(83380400001)(2616005)(186003)(26005)(1076003)(86362001)(6506007)(5660300002)(8676002)(36756003)(8936002)(110136005)(54906003)(6486002)(6666004)(52116002)(478600001)(66556008)(66946007)(41300700001)(66476007)(316002)(4326008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?n3YDd/L2/8qx3ul69GTZZ8vchpGV?= =?utf-8?q?dS1aEI+7uD19GOktUQmSu430LN2Lyb/73VfEzmTPe7otcX9ZHbSy6cYqaFN93HS/A?= =?utf-8?q?mAQqWW8ATjaPredHR/j2AgykXFrdBT6Uzut7bEzMYHOnPIRaYomLU3RIc8j68ut90?= =?utf-8?q?l+HUA6KwBYj1hEhfXyrKeQmWOASkUnYdvV1TeVybZ6kbQCnLDXc4umw/guxjfFn57?= =?utf-8?q?krIkG6mkUEYtgCzh/y60Iqmk26OZcZlVyjdsAl0ymQQEfE+YqHF7myysgRlYgXQvK?= =?utf-8?q?qARtkxzMhM6bc5jqE0tEf4HLluQ36t6w9RqPVh4st4XielaoiMWzYSu62ZkSngouJ?= =?utf-8?q?VruraCEFpUYzDvpjiNQ4wf2gKY9XBYvUPtXz3SSBzOdG/rPgNuTtwpmQ9WySc873p?= =?utf-8?q?N8c48a4GFYnk/nDvAFOaC4LOET6Yl+m6Ri9PoNK6rnFOCOrL3i4vULRJCyhOWW1sf?= =?utf-8?q?Um/jkcsXFJ8snNDCvYx3makVDr1MFUaU04q+Nm0oyrl3AiyQUUQMqKlw/WWE+xAFV?= =?utf-8?q?6iusfdzBJchZkrwnW/2YXE6WkASrzMjySN1+S8bA+T0WFZM7IuvGk+x81U/c7appU?= =?utf-8?q?33uyrbvPvl86e1Ul0pMrsrGZ08VquKCZh8iz6kFch/RaeBn53sHru9ZwOQqqphW9b?= =?utf-8?q?XCYzGP0/nuTr0z+Abi/qUfXBhrsjSiH/0FdhJeLKhnZB+azEJIC4EhmAd1Da7E1rz?= =?utf-8?q?wqyDoCOGiJW3m+cu6KdfwrkhBt5ft4MUljhc371JNu83xf8w8Udls+3Lwry5ig5om?= =?utf-8?q?FqU0HLcZzgxAu35s86K8M2lqdjZF9w0v8NImvfhyel6GZQgrQPT6OL0bphWsxmLpG?= =?utf-8?q?GVf8tvnUrRrX+n6sgsfTTCVZ7Nn7VUnq5VLHF8/Q03vkBXV+zfTnxKrU0OZtFxFHT?= =?utf-8?q?sKItnEBDxW5GT1/fVQGSQUfNP2tE9DLZLp8bxVT4hERwjdWPY9L3rFjsXj14RZZLz?= =?utf-8?q?quU5Y5/YObX22W9kVH3gGb0CoUzuARCjiyT3ED0lMquN4R7kG4VRJXdFLZvV2tEDA?= =?utf-8?q?B1uuWPz3h8FKtlfMLIRy4U+xVCkP2xMO8Ulr8n665wa/GlDhzJF/w36/q5oXCGSvW?= =?utf-8?q?2sT0v0+kb1xB654uU/98XCGV28c2mM4eVwGPE1tVg4qwYbqTcnTJcBpU7Zz7HKQw+?= =?utf-8?q?bsYR0HU2wDw1PT6sWlqCbtkXjB4OpDN+oF33HRuLUqO+nI+zd7EnyULMY45bHGvLL?= =?utf-8?q?C/FhMiXVXoRnKMyexSBzjJ+FS4ki55NWtJkXnZRRodxUCGp+tOoSEXr+Xnnp33Chb?= =?utf-8?q?RRQpu5EMX2utApqc7u4+vjC9LcQSTPGRW/sGELROIahijZez5vZLvXj4ROR9LLIXA?= =?utf-8?q?+3jaDc/md4grcMV923WpHHeYxcEv5kTp6oT5ZKTyYYZRUzo66yL2m/UYvd8izWuel?= =?utf-8?q?fLqgcoYivXN3mHD+c0t+e85oPpF6170+8O58RQoVmZfVAMY+ES/s9ysCNynwi+Rlq?= =?utf-8?q?daol65XUelANlfICtqSytAjlNkduoBqI3gQkv6gP41CTSF0SnrvQsVcjqk6xsNiH0?= =?utf-8?q?hPvmMocSoHLq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd2f3c1b-a6af-49af-69a1-08db82bb22df 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:34:06.0037 (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: 7wGuP+YZC+lmsbwhHuh2M3JO1XuH8bpPzV5yubApZmfoeCdfinQhCrhQgxIiObH7s78FWfGD3rT1zDnBX1DGWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4091 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, 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: 1771208412564176198 X-GMAIL-MSGID: 1771208412564176198 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/omap-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 81649a1969b6..895690856665 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -182,11 +182,9 @@ static int omap_cpufreq_probe(struct platform_device *pdev) return cpufreq_register_driver(&omap_driver); } -static int omap_cpufreq_remove(struct platform_device *pdev) +static void omap_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&omap_driver); - - return 0; } static struct platform_driver omap_cpufreq_platdrv = { @@ -194,7 +192,7 @@ static struct platform_driver omap_cpufreq_platdrv = { .name = "omap-cpufreq", }, .probe = omap_cpufreq_probe, - .remove = omap_cpufreq_remove, + .remove_new = omap_cpufreq_remove, }; module_platform_driver(omap_cpufreq_platdrv);