Linux Power Management development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
Cc: Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Hans de Goede <johannes.goede@oss.qualcomm.com>,
	linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] thermal: qcom-spmi-adc-tm5: drop IIO_VAL_INT check in adc_tm5_get_temp
Date: Sat, 25 Jul 2026 22:40:43 +0100	[thread overview]
Message-ID: <20260725224043.62b15ea3@jic23-huawei> (raw)
In-Reply-To: <20260724-adc-tm5-drop-iio-val-int-check-v1-1-0b85a0895dd7@oss.qualcomm.com>

On Fri, 24 Jul 2026 16:30:24 +0530
Rakesh Kota <rakesh.kota@oss.qualcomm.com> wrote:

> Commit bb21ee31f575 ("iio: Fix iio_multiply_value use in
> iio_read_channel_processed_scale") fixed the
> iio_read_channel_processed_scale to return 0 on success instead
> of IIO_VAL_INT (1). The existing check in adc_tm5_get_temp()
> treated a successful return as an error because it expected
> IIO_VAL_INT. Drop the redundant `ret != IIO_VAL_INT` condition
> and rely solely on the negative error check.
> 
> Fixes: bb21ee31f575 ("iio: Fix iio_multiply_value use in iio_read_channel_processed_scale")
> Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
Ah.  Sorry we missed that!

Change is fine but you might as well just 
return iio_read_channel_processed() as it only returns 0 or negative error.

Either way

Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>

+CC linux-iio for info.
> ---
>  drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index bb6222c8cc5f..af72db6299cd 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -369,9 +369,6 @@ static int adc_tm5_get_temp(struct thermal_zone_device *tz, int *temp)
>  	if (ret < 0)
>  		return ret;
>  
> -	if (ret != IIO_VAL_INT)
> -		return -EINVAL;
> -
>  	return 0;
>  }
>  
> 
> ---
> base-commit: 9eebf259d5352b87080d67758f483583d9e763d7
> change-id: 20260724-adc-tm5-drop-iio-val-int-check-38e27c4018c7
> 
> Best regards,
> --  
> Rakesh Kota <rakesh.kota@oss.qualcomm.com>
> 


      reply	other threads:[~2026-07-25 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 11:00 [PATCH] thermal: qcom-spmi-adc-tm5: drop IIO_VAL_INT check in adc_tm5_get_temp Rakesh Kota
2026-07-25 21:40 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260725224043.62b15ea3@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=amitk@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rakesh.kota@oss.qualcomm.com \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox