From patchwork Tue Oct 25 19:15:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 10949 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1174321wru; Tue, 25 Oct 2022 12:17:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WEzPxYTUgrcfV+/+Zyu3VGyD3nVKDMf3tLRI39XB65LkiI+CQusytCKivynML3tvfFAkw X-Received: by 2002:a17:90b:1644:b0:20d:459b:9d81 with SMTP id il4-20020a17090b164400b0020d459b9d81mr45722675pjb.196.1666725463885; Tue, 25 Oct 2022 12:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666725463; cv=none; d=google.com; s=arc-20160816; b=S/9Ea8LeqpTk5M2NXK7TGATmTcKT0G7j/6I3W1DSrPwGsQkXU5yGX6c3dHHXp5J5Zp XYcezem0izKpjul/bUK/HQS6VQsJ4mxsv6KU1rF65Sa07AVD55efbBytY+uB4I3+e6jG ZNjLQRXMpRhDSpVbJ9TremFRVUrciOPYgC/CBDRKhWQRsVsAvrDaPIHK/Jc4BaFabrgM VnNP+Z5nlAB6OnQlunXsteh8J1amxKaaUQmGGrJOCduzDWYM3a0lEf1nT9/kQNMtAJ/J x8CPOTNCKKreZI95tyZBqS13PTpP0UldEulPTpv2g2QRyaJW4XATp1S8FrsmS3aQt1dH VNhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T7L44GLh1Vpy3fYEU2edI0jDVnA8qvZMddOrW4XRkQw=; b=s4ir1DwML/VMMEH+D5jxnqWccFtM2SrPzDD7KS252Qw78P+zyWpXcWKhTkNpvsp8zc U/Gxj0+JqA46HPoduj+J/UomMhs7EFCzCnM+BSyFhIeAJb6MqPK91lPhSypGDJTNiTWY CRlhgVJs7XKwulqJuOiQd0rdUCD/iT+IALEK7vvy4mnkCFdk8aIPiC13sJFMcXWZhTVE +HKq1RlBR44OQ/Tr91m48e7Xib9oLvw4+KteiC1IrnMX8/F4O+326SPcNj+DozODhTLA +PIE4u18Bpbkh1rwfancIRgw82B1c/d+4i1zfNZwsIYOQx31xx6hQPNF0yVLTI+iPJxW G2Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=O3OVR6Gu; 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=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a056a00189800b0053840181203si4705631pfh.117.2022.10.25.12.17.19; Tue, 25 Oct 2022 12:17:43 -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=@ti.com header.s=ti-com-17Q1 header.b=O3OVR6Gu; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbiJYTQR (ORCPT + 99 others); Tue, 25 Oct 2022 15:16:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbiJYTPg (ORCPT ); Tue, 25 Oct 2022 15:15:36 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D367F0B3; Tue, 25 Oct 2022 12:15:35 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFJJM112020; Tue, 25 Oct 2022 14:15:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1666725319; bh=T7L44GLh1Vpy3fYEU2edI0jDVnA8qvZMddOrW4XRkQw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=O3OVR6Gugrx01MazxWrZvcLX9pdJ+1Yy4WBWkeDg845n4p40h0aEfPqhu/Lgx7ZqQ Sm4To9gPFrLBeHMuRcELuv1Iuk92p23Fu2PynOz6HzhvKstUf7BymfWV1XIUtq97qY g1f43i+3wOpDwF5uCwbz3hLXYEFwvEyYnPPxAsVs= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29PJFJex058279 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Oct 2022 14:15:19 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 25 Oct 2022 14:15:19 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Tue, 25 Oct 2022 14:15:19 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFJKQ018057; Tue, 25 Oct 2022 14:15:19 -0500 From: Bryan Brattlof To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Nishanth Menon , Vignesh Raghavendra , Tero Kristo CC: Keerthy , Linux PM , Device Trees , LKML , LKML ARM , Bryan Brattlof Subject: [PATCH v2 01/11] thermal: k3_j72xx_bandgap: simplify k3_thermal_get_temp() function Date: Tue, 25 Oct 2022 14:15:05 -0500 Message-ID: <20221025191515.9151-2-bb@ti.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221025191515.9151-1-bb@ti.com> References: <20221025191515.9151-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1018; h=from:subject; bh=g+YxgOMLXP3w1bq6vyZoRrUwJBsI9oCmt8mLlbeowlY=; b=owNCWmg5MUFZJlNZ00DIPQAAbv///v/Pf39sW92/r9/veX1/t3O+zxeur+Z7S5v/81/wjmawARsY yHqBkDQaaGQDQA0eoMgGRoAaANAHqAAyAAAPUGgMgaADQ0PFNpHqeUep6ahwj1AaAADQGgGgNGgwjQ DIDQDQyDI0NPJAyGjJo0aaHqZHkQNDIYmh6hoBodNMEYEDTJppoBkAGmEyGRo0GTEYg0HpNBkyYgyD BAGg0BkyAAyAAA0BQrwSmeh/OzZB42vG1khoUrQtFYPX021+N8e4kPBAfPYC+sWJSuAKhSpnYIm78h 4KvYfkJsGC+BTy93/IwJsnkQCq2yaGyUXR+JJPOdy4QC3wZ/qGYFsrjYCQ4CogljFI5MaqnGh+voQA eJUILXtWFss7btkLWfbEGpk3Z46RE89XNKpWaiU0INIb/LjEqQdue4RWx/CqarJqHaLgiqO8dNwxF6 tnt4qR/lhXTLwwAdXW9I0JHXjUZ+HlPM7WbzIZCGirV0cGUKHqfyQTk4x2c0x/Wc8KyY23pIV/tXND APVSWb3/bUwaitRcxSlESFODvwDXF4rI3WuvMCMM4HIHHOrXWDvl7Q8f4loVBUolQA5JBzFoQCi1xP MMVsEkWDCdSo6swAtGhLMn0ASBsC2NCVnqpfGmvG+Cq1Th+I1IAG2Olhn+LuSKcKEhpoGQeg== X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747688320060992399?= X-GMAIL-MSGID: =?utf-8?q?1747688320060992399?= The k3_thermal_get_temp() function can be simplified to return only the result of k3_bgp_read_temp() without needing the 'ret' variable Signed-off-by: Bryan Brattlof --- drivers/thermal/k3_j72xx_bandgap.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c index c073b1023bbe7..a9f99a190cb61 100644 --- a/drivers/thermal/k3_j72xx_bandgap.c +++ b/drivers/thermal/k3_j72xx_bandgap.c @@ -249,14 +249,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata, /* Get temperature callback function for thermal zone */ static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp) { - struct k3_thermal_data *data = tz->devdata; - int ret = 0; - - ret = k3_bgp_read_temp(data, temp); - if (ret) - return ret; - - return ret; + return k3_bgp_read_temp(tz->devdata, temp); } static const struct thermal_zone_device_ops k3_of_thermal_ops = {