From patchwork Wed Jul 12 08:12:38 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: 118923 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp994203vqm; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBrGGzcz3WMvAhgcvPmlmQTpLds8cBEX0ZsyQBe2gep/LAlVElOr7EjlnkesRf/uoiDn9J X-Received: by 2002:a2e:b041:0:b0:2b5:8a21:5627 with SMTP id d1-20020a2eb041000000b002b58a215627mr15929820ljl.51.1689150249353; Wed, 12 Jul 2023 01:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689150249; cv=pass; d=google.com; s=arc-20160816; b=dyt8Rg3Vu0LK6YCnpz3FqeB8wbISMyZXI2GX7z5ICCI5o/cYRVIE80HmxAM0xpRQgr iJnqrbaY2TJaLXjjYX6r5QclPInqaRxT2P6baTxaNpwmoIN23IA93QfqFUG0tmXCw7hQ meoyJ6Ub9oZjHGGzgPctnYHgpUGBPp0NHELCD95d2Bt9O7Y9m+F6hf7H5w1SgIbK86SI PC+9iYQo7gMKOxgG8BK6ARJM8JjsKKHviPYqlsURogxMF809K4Ar8u3N+S5EIRiQhr6U GPPs32TrpVcZTGJvTGjJGLTIsS0iI6auq9VkrM7kYK20JWeOO9wnNMFEwUyhCNE+jjtw JY8g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a1709067c4900b0098d373fa9d9si3885373ejp.149.2023.07.12.01.23.46; Wed, 12 Jul 2023 01:24:09 -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 S231218AbjGLIOf (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_Kleine-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> 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?q?zyXYTYY6iNqkL9+EwBfgrByv4KJX?= =?utf-8?q?bHop9UjeQf9BZYOmu2+5C98l0c/kSUfMUs6oYXBBxkWUOJKRZlpe4FLG0YgGYdtqh?= =?utf-8?q?cB7SEodhjBylq9dFeMFXn2fQPFT2+d4NwKRMFZIwIO5yOTw/hGg78pZ6l9sCYpJO9?= =?utf-8?q?RU0r6FqB31YCGClwrfNkBkDGAnGo8CjRdddJlahGiSE1vjhC/sE2aqmLxWay7X78G?= =?utf-8?q?oEnolhUtQhz7Qi2FBjnOlUXBgJZ2X2YAqQsqoYzxWXqvQHAIzUw9QRe28vA8cpfti?= =?utf-8?q?Wvc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ouKTMail/Srl0jm0uWlonKi7D3od5zvL7Rc8cCGS0ayStF9I?= =?utf-8?q?OYyxkdHb/xugVSaDM8dOi05iqtJG0Dd/EJsMWrQ4Vwik6Tv85nERh51XEw0OlOsBg?= =?utf-8?q?F/+/oVD2pWM8QqtX92J6ZcHcmSGsOnFEeuXW8GCmVma3nRhNzsCbZxcj9CeNfGV03?= =?utf-8?q?Nkzqd86Dq+fE8xFvnYf7g0LLjZ5bwrXI6QaWs1cv1gXF9dAbza1+ELcWpDizDlhh5?= =?utf-8?q?fW0o7WgGZB1Cb9PcKxXiobRxgTUcjg0PE+dF9uGLGPBXLwnUNQoBw08jvF8ZClBfo?= =?utf-8?q?XBeNwO0P4oFZm/QHd1dvzhcYhKcATPALMVBJV6likr1c1xr1qHbLH2tErcAWp/qBb?= =?utf-8?q?FLuhlR03EXst?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771202411487554812 X-GMAIL-MSGID: 1771202411487554812 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,