Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37996745rwd; Wed, 12 Jul 2023 01:17:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaStZOQC7TqC989KRin//StpsufLgY4XSdgScJcgfeBKQ/V0Nju3wFlcddCgDVULONW8Wu X-Received: by 2002:a54:4d85:0:b0:3a4:ccf:6a63 with SMTP id y5-20020a544d85000000b003a40ccf6a63mr7289626oix.55.1689149844466; Wed, 12 Jul 2023 01:17:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689149844; cv=pass; d=google.com; s=arc-20160816; b=OvdqMUNYc1/CuNGqe9u5pg/QL+fUEZtUD0/vRiqx1sdbSmczX88FJd9zcwbsHluh0+ Oi8uBfMN7DemcLIijcYheY23Y4eWc6MhTIcuhzoTyEWjXx2jsMNlamCIiC8wwxWmuv7t QXclpXDE2mE0x5KfGnTwbvLCbRGPJMw2HCxWN3PLZirfgI/5dShNYJ6rQuGqbcddxSoG 2Pb3dc4/KlCGAbGDmGeuyKWgtadlRCPmB50woaqRk30+qkrAfxsYHO0yDfrZz8Y7TuyD pWYZ/ZBzYedBXZK9n+uouUkoYYC+oepwtKmP210E6hGb41tV8kWPDDxWqN1WkvdvW5pJ kk8w== 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=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; fh=GueWJ/CJdsUjC5mckXB0EvWKynUiEMXN20b0Bxm9NIU=; b=F6qjkrKU9HJ1iNjO7w+fEK8x/YD7kIlRndRHjBIGvobHAHFgOfUtOm5NS7XnONaGsp x4YnnLFSuoT3LAO+mg80LZsNw7lUVI9tFaLpKx8AmG5Dj1WK0OARUr/eni4HDSugY9Lt xWJVQcvwn6+ya6NCDCs7U6mMyRkkF3s/gK3BUA3ce3zoaAxFaHX1ND6vLb3k0/eakCdc brVI4aB7IzY30Lto1ZigwTfheM1qWuciOA7CTIkCcj2HlbDyTkfAmQpbCaJQ0gAw/soL 04Ggn8OBBsOgG3wjIf+Tk5XEdzwsuX7U4ZTl614qV9TKqixGS/IxEx1BE8B55hPzKY4q kJFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=hGHtvtj7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 18-20020a630012000000b0054fe7b18671si2715570pga.809.2023.07.12.01.17.12; Wed, 12 Jul 2023 01:17: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=hGHtvtj7; 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 S232118AbjGLIOf (ORCPT + 99 others); Wed, 12 Jul 2023 04:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjGLIOI (ORCPT ); Wed, 12 Jul 2023 04:14:08 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2116.outbound.protection.outlook.com [40.107.215.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C47E01739; Wed, 12 Jul 2023 01:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HS2QW00QTnkIib3q47e6BEL5w9cKAMlJ6j05+moV4NnMYyWD8ZWlmBDL7d4000+6xOIAGcAR6nY2zaxOQxNfi9sk5d7h+ONvgefTdwnkfJC8LbUE6oPUVrbjqy/XLUQoFDuInKihtXz/ll9CshnpzdkWbgMB5TLARUnjlokPElpFU/7lNpMlerMrA97bphZYGc5urc+M8f5sEWqNKrpQrgNxCgZr6oRs/5bEG1mdOANq08bwJYY/NhrnKC+xa3ZdIyjpO8flYd+B/TmZMjUao3qfS3ZHsaaq2WJBrbT7xwBAG6Yq3//Hh1Sjs/xLycGa244IxfgYygo5EJNN8ZyIxw== 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=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; b=nVu33hVrGml95nUSeRo5OM9dH7VqoGfutlX2iwlQX+LJZ3Q8qQ2gUU9gVJKzZYBSUrFbV32pQkJ5mJaKRIE6LxNDDaiNTDLm/u9ymXSYbrWvTCORM7Ga/Zc7/ncwi4s90mUiWj+8bgI+L/k4VtZYjZUju8uxE56yRN8zvW04vAPPFpzW4jhmowAWlhYfkj+WC9+8TN8AYCIJBZSR2eDUEIJ7f4vdvId+2mffioPd9pT75Qc5jZwiHpD7zk4KJ66w50GQOjtRjyKSTPqGnpZrpCWY25zXDqTFqkRENCOtdnljHE4akN7G3oM1M2uQS4t0BE6zMveNhx6rETTb26PFXQ== 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=O9JmYrx0NP1LgLO3UWT+h7gQiXj9+NS7xepB2bMhlis=; b=hGHtvtj71xabR3iGkMKr9GPCztoc6HnbRc9KNxoaGdRqVj9CcB6kbAk6oSv37qP9ndx6kNBHMMRx4WLDG4Y4l8fXq36wun6yW4eMNbIXQCD2aauxz2PcHYzjtFgcPp/vn+5V319gkJt9FxRM6DUrvCn+hiRaGcrpM6UW1sX5EwwOyFogomsBjlG//RGK927HSI/SrW7s4/ULnslhuJYi710oDu4IRlPwvMkDstH3fCM7NAatkFTtpVyz7P3B1S/z7JLOK6wU2CBXfUPt9u8SiOukwIMJTPTz6rh+v7xaFpQEZc3R6/+2Mg9jqqTJc4VfV4WRIf1tF4lCJUa9GkgxeQ== 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:03 +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:03 +0000 From: Yangtao Li To: Amit Kucheria , Thara Gopinath , Andy Gross , Bjorn Andersson , Konrad Dybcio , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/27] thermal/drivers/qcom: Convert to platform remove callback returning void Date: Wed, 12 Jul 2023 16:12:38 +0800 Message-Id: <20230712081258.29254-7-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_|SG2PR06MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: ae9464a5-d92f-4c45-abd8-08db82aff433 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uaCnpZMnx8nfy642RTdF4Bb9wLfWtG2vBj+FnZU/zHMIB3KWjs/HXuStAFa8BN+HoTnyowqw9rssqv1DfasmTZzdhEQUlDO7Fx2IIq1axNMAXK4tGplCaNhPQNKEqpUU8JIBHS7f1RD0f+6jGumi+D1zJK8VGuhi4Dcpa9aeMUNMMQrJ8TpW2X9hdLtawGE33i1m7kQkfkaoAtglbPsiMKHutVmhr3KU4ikFB4nadrsafJHdtcEWGQ2J5rr+ydsaDn29ZbGD4Xm7qwtAn+j/3rDbk2moTnb2bTkKF9ftuleKkmy6OIErfk7oSAT88Ez1FoyW1BgcFrKikeE5QiRnOBOAk9kEuuoIc+xu2+fACJ7FaxDZvFb8vONpL/92H5ReQoHkrfakTLa1bL4HrSJaeZG13y0orpvOyjWdupF0lsf7SfLFqmIpfkO288rHA9smuRA1eJjynoa44erlb/m0hNYBmXXJf7gKbJ9jhzu6R/2f0GGw1Brr30ES0+QZWVue0HBVTx9izroSXlBN8Fia+tstL3+mQ3L/JAcKOTmpP3jkLwcD2BVAOu/ws5p6geFvyHm4o94EHrjdT6VBgg42/2CXSTIPxYMSPNv2OI+r45HQQjHiJln2XEf+WQMzOaAD 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)(7416002)(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?B?enlYWVRZWTZpTnFrTDkrRXdCZmdyQnl2NEtKWGJIb3A5VWplUWY5QlpZT211?= =?utf-8?B?Mis1Qzk4bDBjL2tTVWZNVXM2b1lYQkJ4a1dVT0pLUlpscGU0RkxHMFlnR1lk?= =?utf-8?B?dHFoY0I3U0VvZGhqQnlscTlkRmVNRlhuMmZRUEZUMitkNE53S1JNRlpJd0lP?= =?utf-8?B?NXlPVHcvaEdnNzhwWjZsOXNDWXBKTzlSVTByNkZxQjMxWUNHQ2x3cmZOa0Jr?= =?utf-8?B?REdBbkdvOENqUmRkZEpsYWhHaVNFMXZqaEMvc0UyYXFtTHhXYXk3WDc4R29F?= =?utf-8?B?bm9saFV0UWh6N1FpMkZCam5PbFVYQmdKWjJYMllBcVFzcW9ZenhXWHF2UUhB?= =?utf-8?B?SXpVdzlRUmUyOHZBOGNwZnRpV3ZjMVh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Id: ae9464a5-d92f-4c45-abd8-08db82aff433 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:03.2525 (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: L3GZB+GwCs6p59PMoObFKlN6PAKgjDuoYL3fzS0tQyAsSFsJ1BF07vttQ9mADapNnv5ENl83hXcZVvPftN7ubA== 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 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/qcom/tsens.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 98c356acfe98..6d7c16ccb44d 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -1319,7 +1319,7 @@ static int tsens_probe(struct platform_device *pdev) return ret; } -static int tsens_remove(struct platform_device *pdev) +static void tsens_remove(struct platform_device *pdev) { struct tsens_priv *priv = platform_get_drvdata(pdev); @@ -1327,13 +1327,11 @@ static int tsens_remove(struct platform_device *pdev) tsens_disable_irq(priv); if (priv->ops->disable) priv->ops->disable(priv); - - return 0; } static struct platform_driver tsens_driver = { .probe = tsens_probe, - .remove = tsens_remove, + .remove_new = tsens_remove, .driver = { .name = "qcom-tsens", .pm = &tsens_pm_ops, -- 2.39.0