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: 13019802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1BA1C38A2D for ; Tue, 25 Oct 2022 19:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=27jLhevSZXHJuG+gTWoNotJwFAzlHg2urMan55G5HP4=; b=AqBask8pqchNTw paSaS+eqN3AsY6tk6Wm6T/1R+LHPvXqQvH2wTrnYVJg/2xMmMt0V5/ghdJNPyq0+0XV89Y6OvNJGC GB3JRPQJNEY0JKTKC/XFZ7rZaD0vH7sYf9FfEqnoKe44k9tDHcEPeJLGMa/z3Fe4u9uW/YAirOtXs MJKRQkV2rGtd9hacyXovow4tdMaS6Iox2tN12FI+i2fg7JI1LjGBOqPnsjFxM+H7RrtmEV1HCy0Dx nprvj00ernPtUD8/qpkeBxNnTNKKzfmjtXRr88b7C7x00BrFuNd62igtsJy3RPkIwvuCSE5JoISSs 69+FQ9gU6JMYtCM58NRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onPSJ-006qsJ-LY; Tue, 25 Oct 2022 19:19:21 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onPOf-006pKG-FE for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 19:15:34 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_121533_651272_CFFFCD7C X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 = {