Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8900735rwi; Tue, 25 Oct 2022 12:18:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM785Ad4jc1Bh5o0uSkJv9fCGHIL+k/yx45lyLwpR+2+8nmMA+JDnYw6X8y6qgtJ4qRfZjZQ X-Received: by 2002:a17:902:724b:b0:185:4639:69b1 with SMTP id c11-20020a170902724b00b00185463969b1mr38941053pll.142.1666725488660; Tue, 25 Oct 2022 12:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666725488; cv=none; d=google.com; s=arc-20160816; b=zFxTcHbpUqFTskSfE1Fd3tJ5A9kOSb8HakobFL5R7z1dJzO+tHTI+o5jtrCYiHoQX3 DIK4M9BNKWfxrekAtGlhbFRhivHnoafutj6qSXJLFq1Mxgt8I8Ds/UiY6ajeVIO0nnzr YqFiEL1YDI44AuiukgZqruphLq0mBibRaaw9QGaRjd0kGlKm5H94wOAfg7gpaRoJKW5Z 8chHP92FfGAdq11DMHI1pXjeD1Wt9toMPisUVbqXVP5qhXZ6dt94gAbRhy4ImTdvFwJE lhLgH4t/nfv2EdriYazyfSekuAmXTRLiUsvqk787zb0UDD4KkoT0b7gXohu/djwkt1O1 zScw== 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 Return-Path: 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.57; Tue, 25 Oct 2022 12:18:08 -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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 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 = { -- 2.38.1