From patchwork Wed Jul 12 09:40: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: 702125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B895EB64D9 for ; Wed, 12 Jul 2023 09:40:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231322AbjGLJkt (ORCPT ); Wed, 12 Jul 2023 05:40:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbjGLJke (ORCPT ); Wed, 12 Jul 2023 05:40:34 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2090.outbound.protection.outlook.com [40.107.255.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88A181717; Wed, 12 Jul 2023 02:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FnF8axngaBe3uWYaGW54QyaT/vr8cORlLigovz+/mI0N/4n+kbUuXfcOZjHLPlX7qTn2IoUmxs7/fPdMzSdtg08BHJSZL1v35OaYPpY3N2U4Q3AXR364Ky2aqoD7QVcQeumiPgni2ZcaFsaouaCg63hWZ2Ipvm0euHzZgmmsv/cewd3EN7aWNTM5wF1yV78Pyol0RKTdLJBVjQBM5cVTtbJtzAcyczwXGZbK9MFLdeMftjwHugv+SBL/ItRNwfztAx6nvLrLXBZ+307HED+LkDlk4+B1mqlFoxOToyufmckOBBBpzmRA1ak5340N2gpO7Clusb7dzxWyRSY9kICOag== 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=7nnL6FiV6pbFEm7FrHnb/OvpyUz5yV9y/akirUEhRAg=; b=dM2iW9TtWRcJVb4/dlKY0gQMfdL3LMSqSCp8m5Dvc5kpuGufPhMUwgfiY0H1IA2zsIfyaQQJ8dq0b6K+/KN+TtnPGgXVP+eE58IyA3E6HfAR2XERd2q+MWPwvFkF8vT4OqxZrr/gsgNpq+183VWNVZiqJr3kqOT3vty0Q56wHeOmatibD77UhBz4KyIEVkWJpPDVgsIt9RFPw9vfuJONVtwQXWznv9TpKRraSueQuSWch/aLtE2pocSIfFB7WBK2JUYEmCzIMgYbAsYNAV+PaatrSJNklKPe20OJVnYSimpDYN7Zkz90EvIlyF0QWByIV3uai3imtF5M8vLOa0surw== 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=7nnL6FiV6pbFEm7FrHnb/OvpyUz5yV9y/akirUEhRAg=; b=qeF/QwALCOfu8bm17rjE+uISRm0c8hCvsE63fGRDb2WXAx3CZyg8qbuLHZA/l3FUzSIN78KD5jOjFgG2WPxsJPWD59vfxf/At64FhPf8IxFUwRJyUoA0ltFj5OTdPYF8nt2HcjtsWAWotN5kodAo/QFjsosOzgGmMQjzcgtTOUDjPF/eYrHsLRJD5RCKU7SZEU7b1CMOA+P0TurOfwQCYbJm78HWa5i62sH9DpwO6Vo9zgI11U5cmwiXii/Tm8Usmj1duS8ZSB14NLJJqGFlT69xVLpqX4sTnN0jSo3hGPwoZo43kPcGjWhmVTLEfhoYwKRvi7ac+bqFH/P9CZNP8g== 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 SI2PR06MB4524.apcprd06.prod.outlook.com (2603:1096:4:13b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 09:40:25 +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:40:25 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpuidle: kirkwood: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 17:40:13 +0800 Message-Id: <20230712094014.41787-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR04CA0211.apcprd04.prod.outlook.com (2603:1096:4:187::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4524:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bb4b997-b3e4-4c8e-1561-08db82bc04d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WWd7YaWNvln2pt0jhoOhxi0QL96BCYwcOiCG0Drjg1wb5RnF5DroYuWIVB7wTuy5M+Bb4NSk5/PEDYxza5CSMGd/g4WHqa8UWYpJ7+v7OZmWU6zTCh0JjE6cz0qC1y9Wwp6oMbHW6RYdAM46IEYnHyrYdOPzxGap2S/awJ/WPCaH5Yk5b+SQTiuka7ZlAyHfpCyRi24JawEZPBtVyF21ATvdRttmGxOaIgdGLiEtSrOu3Q67a/C7a5aEvUx+hG/HIwA5l3tazTE33oXcZfDnWRwAFD2Sod6EWzwfcH76lIU773LhQlhb7LEfCkZE5o+LhDuq3IflehEjfElVbGq+ePBc6500gaKZLQ6caFzr1CxpDSBbYxb03GUt9w4QnOpo0NRDe+toc/x3yWkwBrHPkpIkIZaYXFvCzvoZmneh9NaEAkG9COJpoI86lDw5JfoVewLihNlK/RENwB12jYTuEVwcbp1ehuCye9Ux5c2WM7pOjRfNTXLrSmCGB5TAngGL8CPSAwwFA/tSh3l5x+e5GQjfJ43yH8Kkh1NB/PcoGvtd7xmzRstSpsGMa1yTnAvIIMsvXRguJj6JYyYSy+Hx6xkEwJnLz1siZ0j4muqD5teAa2RBZn751sku0Tmc2pgP 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)(346002)(396003)(376002)(366004)(136003)(39860400002)(451199021)(478600001)(186003)(6506007)(86362001)(26005)(1076003)(5660300002)(8936002)(8676002)(41300700001)(6486002)(38100700002)(66556008)(66476007)(4326008)(6666004)(66946007)(38350700002)(2906002)(83380400001)(36756003)(2616005)(110136005)(54906003)(316002)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4ewN041eh+i/JwTAjuadOg9dkD0D?= =?utf-8?q?4Nk4BgUzVYrWlCYU0BMjGpQo8HkUbgILqXLwnf5KJzAhMYqwrWh5ppHKivzbmBXfx?= =?utf-8?q?XVIWRrxHKCmbpHmXpAIqoDrmelcfm1XeAA4gjIB2gCvn0jPk/ayYs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QpzmtDQZg?= =?utf-8?q?Lj5PvKTjK0wYwnNgL4yfhlJchUieZvVWxk1z59CJ31OMs0RNR0cb5wCjndsRx+1wH?= =?utf-8?q?R5U9aMVzhS7S+jbIicp3CrW0Huo+idCG5uhxCv3gTyUZq+2uLGlK+s0cDQFY2o48O?= =?utf-8?q?vmq4RgoVhhCYZW+rZHHWX2KgE7ORtZHCnDDaU8vGTvMfmfb2OH4qnn7zSGpSYZqpC?= =?utf-8?q?5uwPR4kI78dazZOG5ReywPtmawvz4e+vscB1Ty/OOmDuBoJi0FM3/pNlInrDisU2a?= =?utf-8?q?H9sW/BQduZ1+6undvhMRoTNux3QyimVCOr8+6IKzhWc/xa9OXu2NhVRl3p7gd85nB?= =?utf-8?q?IKpZ7STz0mPHx++94o2DJPBWFncnIphFpZ4uzPr6KOLtehZVqkulUSvouuWAp5pOR?= =?utf-8?q?amjb6Piz8mpvdx6DF/KT+utHcTW9I2KDA/ra4XtWLyCjKFF1tc+id7e/xrEGeV135?= =?utf-8?q?QNo0jeqHdjsJYoT4EMJHGgawn8oncocAQ5PBHM3OLtoc8bvnCJNcB8FCyIQgJGfmg?= =?utf-8?q?czVZknLdXF5k?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bb4b997-b3e4-4c8e-1561-08db82bc04d8 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:40:25.1251 (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: Gzdm7J9tj6n16OGbqVGLgnn1sdJtgUIRU8pGLXTLCETxGvFUdLXhq9sLWzxOJwTS9aBZbfJrO8cGuxliOtKgsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4524 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König --- drivers/cpuidle/cpuidle-kirkwood.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c index 13bf743f885b..602c4dfdd7e2 100644 --- a/drivers/cpuidle/cpuidle-kirkwood.c +++ b/drivers/cpuidle/cpuidle-kirkwood.c @@ -59,15 +59,14 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev) return cpuidle_register(&kirkwood_idle_driver, NULL); } -static int kirkwood_cpuidle_remove(struct platform_device *pdev) +static void kirkwood_cpuidle_remove(struct platform_device *pdev) { cpuidle_unregister(&kirkwood_idle_driver); - return 0; } static struct platform_driver kirkwood_cpuidle_driver = { .probe = kirkwood_cpuidle_probe, - .remove = kirkwood_cpuidle_remove, + .remove_new = kirkwood_cpuidle_remove, .driver = { .name = "kirkwood_cpuidle", },