Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1360087imm; Wed, 25 Jul 2018 16:56:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcKf8s3wr/WiA24WQIDsXMCfq2GNlI/vQgro0EAfuZggKCMwFb8XuqXdzwrRaxCTgEfjKHr X-Received: by 2002:a63:6501:: with SMTP id z1-v6mr22718371pgb.419.1532563013556; Wed, 25 Jul 2018 16:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532563013; cv=none; d=google.com; s=arc-20160816; b=nAAQWHS9k39INFMzWx0dcqBJv+4Rp0syXl+lQ5fe86Vxh9gzipj4GJ8Os86SwZVlkf zJ10dBQg9FbEixuWL+Ge4HP5vhIbO8rEPFK8iXrM8D/RzMN/OFBUD51Jfw5HGAv24FoQ W4HyAYAQGxnG/ujhwUcAioIJ4VYMuEGlCtgZR36gJ0ptNLf183hRYbK5GWDN0QAbRiRN QYOVOPqG3lmvtYpp4B8Qnqy8wve7zapkMRRwofga4O2U1GiyKcmGbjm9tb7PmhbtY8pm rbaEOR+/DBf60NTfp37+zOW5lYSGRBdxDnVzYvLj4f8nq1VTAQzPTTI+WWe2QY9EeZed I9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Gv+6Rv6SOVDod4pEGWPGRz0NX93HBELeZcpHl2aJbrU=; b=JEeqe1nPAnt5JniqOgjyVSA/o+JvvcF2DUaktEF4+l/Y3o4FZCDD7ZLDiThMlbkZk6 776WRxYDBeHgENXGq4EB6HTGnvo/iyUbjjFy4u21I3NVuJ9yEoUIaY7uQk3fnqfqc53x 40JeDE+WdtRmT+rDsL2nIVeMoiUxkxR32b+7rs4jQGinIU2G0C5sEdgR6D+0lxnf7fpO 9pDPlY+rWOzsHQ/mVbQgWl7b6AGHslVXkGeEV5EnuACYRURj3GAOzx59bdozU475NHq2 vF2mQZix8MT3ChHun9OpjlOcqpg4zU7WbNc1/yTmx1s9Ai6QqmmBjSo4Nk37PRf8OGId RP0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bSrRLRmg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203-v6si15973147pgh.46.2018.07.25.16.56.37; Wed, 25 Jul 2018 16:56:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bSrRLRmg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731716AbeGYX6i (ORCPT + 99 others); Wed, 25 Jul 2018 19:58:38 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:46318 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731681AbeGYX6i (ORCPT ); Wed, 25 Jul 2018 19:58:38 -0400 Received: by mail-pl0-f68.google.com with SMTP id t17-v6so3885511ply.13 for ; Wed, 25 Jul 2018 15:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Gv+6Rv6SOVDod4pEGWPGRz0NX93HBELeZcpHl2aJbrU=; b=bSrRLRmgiFV/CuQiwi5tRy072G1pULWMCL6vrnxs0zTSGFF1WxUgtdxDHJj0kg4LUo j8NxLFtjprG5wzkLKW9yZBG1c7e23DdERsPyljRc2cb1XLgaUQKFMmJXx1GJTa601g9/ SvnAN3ilWl6MVk+qbo0bf3+OryWQ9mOnuyzlA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Gv+6Rv6SOVDod4pEGWPGRz0NX93HBELeZcpHl2aJbrU=; b=fBlhjYw+eLiaqXtFbfLGlCiHT4DNsxzEsN0Zv3K+EmKBLE6c7IIDDzPDmkj4Gh+ffb Ql4+Wd+b2oXi24tkxVrpI/lBZ2YLnUv0SNsgeVQ/xhkICnAvU0BUmW70eWXEBJlPEFQ6 vPVgZBKB6s1k+zx18VxqkS8G2GhszlrSsBFcUxR6WHs1tKW/9gmv49DxBhhr+/dBNp5Y jxSq5uFuhzxKpQra0CkO53zBlBf5EECgMcRgiHUBpirpvI+oGvIpYVvTZGPx5HkdtWCc FP5zcpIycBiKGhoGZ3KvfJ0NvldvoD64g31dmAJMSktO3ysanoA6kLhpRq2PLVsQW9ax FKbg== X-Gm-Message-State: AOUpUlG9V4xsu6XuQro+bq1e86KRDq8inoiV31pnJwlz2Li+4neNPMuO Y0qomgjM1Uq3zzzxOnGrJ+2DNw== X-Received: by 2002:a17:902:9345:: with SMTP id g5-v6mr22645878plp.10.1532558689355; Wed, 25 Jul 2018 15:44:49 -0700 (PDT) Received: from localhost ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id d123-v6sm22236655pfa.22.2018.07.25.15.44.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 15:44:48 -0700 (PDT) Date: Wed, 25 Jul 2018 15:44:47 -0700 From: Matthias Kaehlcke To: Amit Kucheria Cc: linux-kernel@vger.kernel.org, rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, smohanad@codeaurora.org, andy.gross@linaro.org, dianders@chromium.org, Zhang Rui , linux-pm@vger.kernel.org Subject: Re: [PATCH v1 1/3] thermal: tsens: Rename variable Message-ID: <20180725224447.GR129942@google.com> References: <45062f2bcfd0f20e604f663e3627dcedf01f0be5.1531898088.git.amit.kucheria@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <45062f2bcfd0f20e604f663e3627dcedf01f0be5.1531898088.git.amit.kucheria@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 18, 2018 at 12:55:01PM +0530, Amit Kucheria wrote: > We're actually reading the temperature from the status register. Fix the > variable name to reflect that. > > Signed-off-by: Amit Kucheria > --- > drivers/thermal/qcom/tsens-common.c | 6 +++--- > drivers/thermal/qcom/tsens-v2.c | 10 +++++----- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c > index c22dc18..25e7f24 100644 > --- a/drivers/thermal/qcom/tsens-common.c > +++ b/drivers/thermal/qcom/tsens-common.c > @@ -104,11 +104,11 @@ int get_temp_common(struct tsens_device *tmdev, int id, int *temp) > { > struct tsens_sensor *s = &tmdev->sensor[id]; > u32 code; > - unsigned int sensor_addr; > + unsigned int status_reg; > int last_temp = 0, ret; > > - sensor_addr = S0_ST_ADDR + s->hw_id * SN_ADDR_OFFSET; > - ret = regmap_read(tmdev->map, sensor_addr, &code); > + status_reg = S0_ST_ADDR + s->hw_id * SN_ADDR_OFFSET; > + ret = regmap_read(tmdev->map, status_reg, &code); > if (ret) > return ret; > last_temp = code & SN_ST_TEMP_MASK; > diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c > index f40150f..908e3dc 100644 > --- a/drivers/thermal/qcom/tsens-v2.c > +++ b/drivers/thermal/qcom/tsens-v2.c > @@ -16,11 +16,11 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) > { > struct tsens_sensor *s = &tmdev->sensor[id]; > u32 code; > - unsigned int sensor_addr; > + unsigned int status_reg; > int last_temp = 0, last_temp2 = 0, last_temp3 = 0, ret; > > - sensor_addr = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; > - ret = regmap_read(tmdev->map, sensor_addr, &code); > + status_reg = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; > + ret = regmap_read(tmdev->map, status_reg, &code); > if (ret) > return ret; > last_temp = code & LAST_TEMP_MASK; > @@ -28,7 +28,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) > goto done; > > /* Try a second time */ > - ret = regmap_read(tmdev->map, sensor_addr, &code); > + ret = regmap_read(tmdev->map, status_reg, &code); > if (ret) > return ret; > if (code & STATUS_VALID_BIT) { > @@ -39,7 +39,7 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) > } > > /* Try a third/last time */ > - ret = regmap_read(tmdev->map, sensor_addr, &code); > + ret = regmap_read(tmdev->map, status_reg, &code); > if (ret) > return ret; > if (code & STATUS_VALID_BIT) { Reviewed-by: Matthias Kaehlcke