From patchwork Wed Jul 12 08:12:44 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: 118955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1007035vqm; Wed, 12 Jul 2023 01:54:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlEBSsJVCBsl22S2++h2O2wXSYxriIe86hBUACPkpyk8L+bMQywb6os8jMk5QvrGJotf4w1I X-Received: by 2002:a17:902:e54f:b0:1b8:a54c:6183 with SMTP id n15-20020a170902e54f00b001b8a54c6183mr21844660plf.46.1689152059348; Wed, 12 Jul 2023 01:54:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689152059; cv=pass; d=google.com; s=arc-20160816; b=kU9BOnek8lShgi1VuQxnLotZq6XyrnUDJO7grd45b+m5LNu2+X952LkjcMErRsjh0Q sMpmz4eFaNAhGHywX41u2VGffBhBevVnqb93oOLqWD6VYLu6nWaAg/dpdXy8D0egpE3X AFijVPp63UVpThLYsaX7vhNQIhYaNnHVcUcoNsXOaJwqnUhVHcBYgMpvM5TiE6Z/DzyS bIwxtqLZYJA5q/vgGywotVsHWbC/OsQyJgmYliubHRRuAvaATN2Vs1DRC9Mvf6f6x7fi yno5uiDZMSUjdtHfszTqcwx1hHKacvpuubsKSccklFk2XsPsKnmgJbDfE/547yCksqtw /qOA== 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=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; fh=gF2itGWmtUVqnmzOcHFVFNxYnJ9SOivG91RfrScPkYQ=; b=rB+UH9UqTd+B18hT14CLMj6XeQrCb4b37+Ox9r+WHyBuMCPkaFqdyIuqb1lpYzyJtm xrFVM6Xa7cNdQ7two8x/+HiN84t0DfBblVnOris03xaVl5K+DMNbVMNzymyy9nxF6BEh om32RjJ8cgjKWl512grxqn49zCa7G3hGgGxG+jDHUIZwUsU1nR2d+vo265i+2WB732GO 4XMZbiA/eq05FD0+9xQGvpXD3EHS58wdesbhklc601ppBDio5EUxQWY5D/jyFvx+SszP AkalIgPLObcrUVPohkkPY1/wxpWgte9k6K5cCwkKcV6jeK7Yl7tm00CoZlr1alU6RYPR B1LQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XAjcqdHU; 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 z14-20020a170903018e00b001baff279a5esi28247plg.78.2023.07.12.01.54.06; Wed, 12 Jul 2023 01:54:19 -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=XAjcqdHU; 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 S232371AbjGLITB (ORCPT + 99 others); Wed, 12 Jul 2023 04:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232487AbjGLISA (ORCPT ); Wed, 12 Jul 2023 04:18:00 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2124.outbound.protection.outlook.com [40.107.117.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1B882686; Wed, 12 Jul 2023 01:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DccWMCXJmfc84IJ6au4zZbfbXuCGSrc5jNKE4AXNPicf7S1yTdmn/YFLEgpaYUEcXrH9woCJhtDWFdR2JKeFwaKlz6fB/L6sQSurJKJYb7vuLjNi8Xg6spGA1AaG8q0952WtSrd6sApK8D1yfdqQEyd60dkMYytjNPkKgp2hXw25lyHhBJT0xqYIggQdJmu2/jr763I8bGdc7V6VTLo18LuyKTgbRp5lXgzOD5k9uz7CbJ11ehcFAf+Yd2vfIj/UdJ6p3j7p8l8/Xfrk1Iyr+fiZZdrW19Sfm9qrm7hmvu/516mBlegKFNas3FdQyTe57qZPRPx5EC8gI1XRqudNMQ== 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=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; b=julGXPhaCI/pcRVj1un+vf/3EWqFpOGExNo+YKZPcRJplsgAjVpA70XITAUbxNj9oBSlmkyxRtFVuuVLqASncBwXEvdUqAF1i2GrE5Kc2cvJ0TJSGez1BKSoSOH/DkF6g6Jcg96AJ3ahd7JoTGkbRproNei/vcIV8oMZVY5Uir0eGL0jlTkAD915RfcvnTo+t8GaN2WFnBiLKTfuJAUwACnVgFNpqhDRgCyJGUBZtA85CxF0mgbVe55WWmk5OdikR+y6rlHtgtyVDz4T7lmlAPCUvbitp1Pd1mq7rCfFqoVCpcdlisR7Een7PrxBT3ZZQCl7PdTgf24y5eh5ohkSQw== 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=lYFoLrIYPPMmZGcgCqfwl0/W4Ed+UKsrtwUWwkise+M=; b=XAjcqdHUK70IHI/k7gdInFwQCZWqB3ptQBKjfT3y2LkBh+zsBPK17Kfe2gmaBiHiUCFJOAtkpBfA8obFRC4q9CVQM4ZcE2P0nPDl8diddYuufbkJ+S570Ezhbc22+o0I1HyO9t3odZi1CzuEmg09T+4lyh9B035hJ+5+IMWyNJqukieJYUy8Py4KjUDJCYit9ze0XnnhMVjEbopgTpRxRNurOMzJ9OA7bowjnDCrkC0bL/9Vm78qDCdC1K66S+p55sgBX17CXw2l8SnR4GbVkdzyOCEY1CmSqYiYQw2emmcI/ybDyCmWNSkVDw1RmbKR7YZ4Q10/ba6J2jNGJayasA== 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 SG2PR06MB5382.apcprd06.prod.outlook.com (2603:1096:4:1d5::14) 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 08:14:14 +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 08:14:14 +0000 From: Yangtao Li To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/27] thermal/drivers/k3_j72xx_bandgap: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:44 +0800 Message-Id: <20230712081258.29254-13-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230712081258.29254-1-frank.li@vivo.com> References: <20230712081258.29254-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0208.apcprd04.prod.outlook.com (2603:1096:4:187::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SG2PR06MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: 3fcf2f94-e2bf-4974-3407-08db82affac4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aCD9pwk0nArSQfhrAgVDt37mcjrDdHz4SZ/uHw+17A1PkmMwP30+L8RTH5AnDt94vbBAdsb4tV5wZFhnO2SOkvwwHITEEM+xPsep+1CVUP/VFcTyLGvhHKtlGamUI9bPCiISw8rVbvrHotEqTfQM2vsje3ntZvdx5aT9p/XMwh/ZgXkY8TGAuUXJAK+tKVwlZ/ay2RC/ap5DQ2TOErt0Spk8q4qmp5hLzcAIwSo3aZfgrDIbojf5OyRFJ56EN4b+2QTZvofen0n5mxzUF0VYeIeUuZxPj7ElGDq6INCw00AT1YqbScKm+QOUjacSyCM3gRCXdQbT7n9dy3IPL3td0dYxMIpDV/48iK3BJ6nwcfIYFxQpW4hJXl8XqytsggLMa8zBYgaPn96J3C816uJ4dqV/PEoaq1n+S/XSlBa+x383bEOmM+Pur6rwdfcVkxqWlepZabfYD4e8uhIERY0hapLiYyQcK5HDepdb3Q9oos5ZXFgiaikSTuQQVje9Vpq4soidf55s8526FpHg4+goasnZpADQkq1rlmLBDV7D8Yl4PJsQExuDDS08XSUl3G+v9GSonkM2QA2vkxKRa34QmQIK4APUFglT7I0YFQf+U+lqPf3ChjZdrXAMXDeQdZJZ 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)(366004)(136003)(376002)(346002)(39860400002)(451199021)(6666004)(52116002)(6486002)(478600001)(54906003)(110136005)(6506007)(1076003)(26005)(186003)(6512007)(2906002)(66946007)(41300700001)(66476007)(316002)(8936002)(66556008)(4326008)(5660300002)(38100700002)(38350700002)(8676002)(86362001)(36756003)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FYs2+SadwkHAMXS2F2GlqTfwmA28?= =?utf-8?q?sjsyMaLsDaG5xNKBQRol5Hu1BcS76b4iBeifaFgfAuWXimxVzE1mgSNsDCk183Mls?= =?utf-8?q?l3mM6qo6K+IGPq9/bScd1pvgutNaCH7c8C02bWf42LQwsI/NhRp+pZs9HaR7o4PhI?= =?utf-8?q?WrpLSBUyItc83bTKyvRS0ix0lEZSTmHnlwlSu7/K6LrjSxCf2e/CqKdTjiui+e82B?= =?utf-8?q?mPLrBpgAIGlt1CvQTOmWv1Hn4OTfcWTy973yIwx9AJa51rW3UHEBmPpi6moSggBlT?= =?utf-8?q?vqG0CccLkNJR505XSDa2CYaROQXqujoQsjBDTBwjEKlXeF1amSJrvcl7yhXEI/XNT?= =?utf-8?q?bAEHBWQjI1xlKSl8ZGtK7iFICIZ3+2YYGr1nsp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hyNYsI8FMk6wkBVcKvAzbUsFWLe6z3JUCsXIPc?= =?utf-8?q?TGs2LUGoyEcRw26HCUksHshc6Zv5SWuCNgknavpNuPBfaDD27Qz68UR/sVRgdpB5x?= =?utf-8?q?kU6l7BG0hQ1N1OtvYC2PelmjXsRTtdCVOfC1RqJpp0SBQzoUfrQJp6nbT9dXfrpKB?= =?utf-8?q?rSSBn4BO7QC9my/4Js79ckm0tBoLc/uLFNc7amQxA4xaL0Whxr89VILHKcB2XD2Xa?= =?utf-8?q?77xfDHGuQBh8LJpBi8iMbUKtc7QqKeJyyqjSNKKmxSEQBX0bwF2XV1qRrmr1PsXSL?= =?utf-8?q?SpKCMrnEazCp?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fcf2f94-e2bf-4974-3407-08db82affac4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 08:14:14.2232 (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: CxJweYBw8dTXYvkZRrNZqnxSg37il/9/xa+fU412smeSSd5t4oG88YTOj5qTOL1ntZ8PjJncNd/gHkxdWlMLfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5382 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_NONE, 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: 1771204309575236343 X-GMAIL-MSGID: 1771204309575236343 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/thermal/k3_j72xx_bandgap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index 5be1f09eeb2c..62e24d08f408 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -523,12 +523,10 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) return ret; } -static int k3_j72xx_bandgap_remove(struct platform_device *pdev) +static void k3_j72xx_bandgap_remove(struct platform_device *pdev) { pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = { @@ -554,7 +552,7 @@ MODULE_DEVICE_TABLE(of, of_k3_j72xx_bandgap_match); static struct platform_driver k3_j72xx_bandgap_sensor_driver = { .probe = k3_j72xx_bandgap_probe, - .remove = k3_j72xx_bandgap_remove, + .remove_new = k3_j72xx_bandgap_remove, .driver = { .name = "k3-j72xx-soc-thermal", .of_match_table = of_k3_j72xx_bandgap_match,