Message ID | 20230712081258.29254-16-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994219vqm; Wed, 12 Jul 2023 01:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFggqnHsLg183lmkey5UVgKszIS15gngME3J28k3NMK8P7m3TgFfJRRnVk4NnSo+JGx0FLW X-Received: by 2002:a05:6402:1486:b0:51d:a4fa:c62c with SMTP id e6-20020a056402148600b0051da4fac62cmr1834062edv.0.1689150251967; Wed, 12 Jul 2023 01:24:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150251; cv=pass; d=google.com; s=arc-20160816; b=OVAMmvosADJHLul3hMmT2onup/yZ4pQzLpnh9OBtQCQ3OLjUCyWFMHAcQE5Mg/C9oi 27/6qzB8Uj4ePaCoNqt1sGpjBAgqifT4HL4WnEi3jlCtPi/RouSxcvKijM0M2e+YdDoQ Agsq9xYmPXZBlWEScwdiV2NESbTYJ1YJBMVm1iNySKefPnBmLmmQIWCGpA+bW/fK2EAu tAUEz2yX6WtHfxI6O7vDzuO1WSX20q8QBy0O2+Zp0bfsugPgfrrxMPB7/TGKaYQjtGkA EAuHdOSr1kOcz3gNLPnxNQy/MMEJriT7r4VJWoAIhM99tPsf74Mvzv9fooD00A/ryUff p0pA== 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=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; fh=y+NLmohyVnO3+WEghAXA5a6UNlaVwCBTXEzFVpyzKyo=; b=jhU+ngjqjleU8V5ODewd4ox3Jo1o3B+Cf/MBNZtXZZqzv1/Y56beCXggrtjxssfhxa OklDc/2ooWRE6XrJ2YH5dT7kVY8y4phctjWr6TMDpkIK5wKeQyWBEUR/eGUAF4Ickzz7 NuzKG2L4Kg9gPkrCzYkj0dJ7/UbrVQzdlT9z7zs0Wgnn/7d/IrvYCKmPwNl5wmc4elqM 7lA+TBAyp65I+K5z+THvreloMQJM8bTzOrB+Id1PMFgENWaGvkLVEYXs+zgSHz1hV+I1 Ka5bWBa36B7Gzie2tvDqNwsA+47rtIpcJ6g2Wv0BXKW//DyFsxV86ekv+k38lkYz3ue0 0ZWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ChzJhou2; 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 r4-20020aa7cb84000000b0051e248ee5c1si4024668edt.670.2023.07.12.01.23.49; Wed, 12 Jul 2023 01:24:11 -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=ChzJhou2; 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 S232333AbjGLIQa (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Wed, 12 Jul 2023 04:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbjGLIPw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 04:15:52 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2137.outbound.protection.outlook.com [40.107.215.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 263D219BE; Wed, 12 Jul 2023 01:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BWrBO1/jHf/8mTTLOx3kWSAA0WW+AS4t7oIdSDHU/wkBcC9tswZqD/r0NoFBh+pucYWia22Iq7xxSbTiGci32csbo3rV6B1OfCe2y6Pulcb+Jq0fgBImM1TSV1180fzXRilGxi6fzf58XqaH+MmPE9aihxFlgZ5tNjTGDm5P2De5dTOJ3cP/9+V/X8gIhSSpen1PgYJRzD30KlneL0LYkbEumdo1kDpZ8eULgyHVN9BjxcD/BE6HivK9w/zugKrcfwqzf47BowrsVdgGvnRFi1kBrhcHJWn1QwaFurSraoa9TrkzQXdBYQgTJyRyQmvxTD4BUiG1MoPex6zWTSfL1g== 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=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; b=OLQFYZ923x2lLmi/B2dnUCpFldVgJ8/OJ67eOh/2KUnrlKKYPw2rd8F6B70RXk+nywqid9WzMKOLhkQj/qwgisHNnowQ5+ptI/VtB4O++HuWiJd07m3MAAamfuYaQ+Kv78SQfqgpqd5CPgr3MdyMKteQLTTQZTA+AZGdT8kIEJ9zAcXAOtT0u2CRdyfFDMXcJPF266l9KKx8IZROjFFBHaL83+DBW3P83MC1aeUFXu6reo+Ff6kf8/v4++3UmlT10bFDStK0S5827/Ms0aS6JAE1gB/xo4IuQQGQI2C8emAd7ZQ3O7EEu/vwjvEGCo3JJ4VSLSFkxVslh7XMMraGdA== 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=eSB/KMZ2qmrY7kuTIjDmatHss0WgDykp8vjAB+Q9Qlg=; b=ChzJhou2JLragFfPctlDraNLvBw9k1MFWOouiaaPSqe6YgjMx3EKOxF0AfHfLhq9AkgFUItt9onWGbeh2374C3HognKbqvuX1OaGDvWF0ITMmf28F1GBXvBiyb2V6Fi46dY8APZrRKk7UayYluhIlfRDC0FscS4HmFMQ8AVSXu+QCXm5Muh1sMwDArbbjLNnq/yN94bx/21zbIEQg04eW5SZTg6pqCksnXREmEPBPhavZ+JE37fAhjyNpQpND+RMRGoI60V3BKjQjF6Tbsj841/Hp4/ZGoNsEHp2uT3MknKkYpc+ia5vSMnrgu4HcDO0ME1jrDyvJT359L+K+BqaKg== 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 SEYPR06MB6524.apcprd06.prod.outlook.com (2603:1096:101:171::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 08:14:20 +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:20 +0000 From: Yangtao Li <frank.li@vivo.com> To: Support Opensource <support.opensource@diasemi.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/27] thermal/drivers/da9062: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:47 +0800 Message-Id: <20230712081258.29254-16-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|SEYPR06MB6524:EE_ X-MS-Office365-Filtering-Correlation-Id: cd2e76e2-290e-4ee7-b52c-08db82affe5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N80hyibjdVBtnXq4UTFTLqCeKXD5+qdC0O8KYiSLJPx7KeV29xI9P9d+39OP0VoYiQelLWJWeA3v4adtCdVTx0zL4EQO+fGhhz7WPswnuYPGIKLPDyNxpjo7BYWPufRSqshAFOPUp8RwtU6UEj5SOgrgZoY6MMMXGEkfloX/aPH8Nc/tRuTvMF2Joj635bIcwhAUb5E13CDbayRS0Ofolwj7dR6Re8g3AGE6UzYgKrOFMGMhS9mMAQ5jz4gdTRplkuQVrVxgY5pJeLE28bQkCaz6HhBl4qUPvKLbOGLQ6neZ//T3aNEfsp0J44KVXcrLJv1ymzAOUMtwoi1kM+Lr47ep951n2HkgalGPP1coVD83jRRLOU67zqGdIr3K1mpDl43XI9M7r02P7f1buLyh5dTx5rdZRkWiTQF2qBhCN8J5xc/Nen0+fDz+tgega48wkkclHMacG33GPCYB2vIVeSkD2RGjWJh0RaMHX/ncC7YWfHgu9wiVSlIySYBVVYjTNDo3viwckynm5NtklSaQCa+TUn8sS9zyTQgNmY8Dpbz8QANO1l1kkGD73RujGwg0Uwa/FK5gy6QcUhmz0kv7W2uzDpxDnInWCkcPoEqiXtcpQiKxwHqt4H+dox8e8T9l 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)(376002)(346002)(366004)(136003)(39860400002)(396003)(451199021)(8676002)(8936002)(5660300002)(186003)(2616005)(83380400001)(6506007)(26005)(86362001)(41300700001)(1076003)(6666004)(6486002)(52116002)(316002)(6512007)(66476007)(36756003)(2906002)(66946007)(66556008)(54906003)(478600001)(110136005)(4326008)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rwHJTjkJrSIkCmoHoKY+51cuwSSS?= =?utf-8?q?4LkZFtZx2I5rcswTHra4RKga+9BgOgkCTiTCYO697Xn8l5vyQwAAnCGYMfqPNDXmg?= =?utf-8?q?2KBtv+iqBO7fI7LgKIEiiKlAVV9U6bj4OQjvBmOpLA0JvhF0GBXyh11ilvQHpAZVq?= =?utf-8?q?ZBSKUjFcnWsmm8yUFah/vh5AaawNfEE1nFWDctnshqByUDLx7llQlAR6ew6SstmYV?= =?utf-8?q?29AHSXX5mRqubqiBWx0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E/RySNJgOKMNahI+qepvBuTu5tFu0apUP/nJ0?= =?utf-8?q?M/2EmCiPrmjnYN3wioYJeKT35uSWn/z1Jk/WX99oMQqQ8LAf36uEWZlEWrIoia7OD?= =?utf-8?q?NFYyFRfHNgZ31zOjIN+VqyQ87nqmHXQ7bLAAtpDbKeuzXlsAXuBqVAx9xXHTI8g83?= =?utf-8?q?nX/Nkk/+yaEGHIMFeSFTKz+1rToVDApRiAGvRrij2Tgug7gbQzagFUaotQf3s5lat?= =?utf-8?q?oaYJmVhqJ1rp/dNKLzSF5YWQvkwNvecFja0qDCNlMWgq6XV5aeP1JvAFld7L3HLzo?= =?utf-8?q?wS5RK8ZgDjUu7YkLt8HR/u6uJTUUIaatNMhxTqha1HcEF8nQcJY0P5xmtos8lbzi/?= =?utf-8?q?jANT5h2E2ezdpHHIDnp09+kcWeoyaxWntImpfqSy79lMY2Z5TnTyH03nbpOHpY+EU?= =?utf-8?q?eKRT5Hj4Ak7m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd2e76e2-290e-4ee7-b52c-08db82affe5e 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:20.2995 (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: kcqPFc9FFjtTUHj0he0dsfJzu2L3YQh1dCAwGxP0wFpnB1OyrmQ9tQNU5JhqriLEEzUZet2LaJVnywlEXy47tQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6524 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202414150394624 X-GMAIL-MSGID: 1771202414150394624 |
Series |
[01/27] thermal/drivers/amlogic: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 12, 2023, 8:12 a.m. UTC
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/thermal/da9062-thermal.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-thermal.c index 2d31b1f73423..160d64913057 100644 --- a/drivers/thermal/da9062-thermal.c +++ b/drivers/thermal/da9062-thermal.c @@ -239,19 +239,18 @@ static int da9062_thermal_probe(struct platform_device *pdev) return ret; } -static int da9062_thermal_remove(struct platform_device *pdev) +static void da9062_thermal_remove(struct platform_device *pdev) { struct da9062_thermal *thermal = platform_get_drvdata(pdev); free_irq(thermal->irq, thermal); cancel_delayed_work_sync(&thermal->work); thermal_zone_device_unregister(thermal->zone); - return 0; } static struct platform_driver da9062_thermal_driver = { .probe = da9062_thermal_probe, - .remove = da9062_thermal_remove, + .remove_new = da9062_thermal_remove, .driver = { .name = "da9062-thermal", .of_match_table = da9062_compatible_reg_id_table,