linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thara Gopinath <thara.gopinath@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>, rui.zhang@intel.com
Cc: mjg59@codon.org.uk, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, amitk@kernel.org
Subject: Re: [PATCH 3/6] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro
Date: Mon, 11 Jan 2021 18:17:50 -0500	[thread overview]
Message-ID: <8a7ca60c-8f94-b8e3-22d6-32ea2e00459a@linaro.org> (raw)
In-Reply-To: <20201214233811.485669-3-daniel.lezcano@linaro.org>



On 12/14/20 6:38 PM, Daniel Lezcano wrote:
> The THERMAL_TRIPS_NONE is equal to -1, it is pointless to do a
> conversion in this function.

It is pointless because you have removed force_passive and
will be removing THERMAL_TRIPS_NONE in the following patches.
Maybe that should be mentioned in the commit message.
Otherwise,

Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>

> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>   drivers/thermal/thermal_sysfs.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
> index 4e7f9e880d76..345917a58f2f 100644
> --- a/drivers/thermal/thermal_sysfs.c
> +++ b/drivers/thermal/thermal_sysfs.c
> @@ -875,10 +875,7 @@ trip_point_show(struct device *dev, struct device_attribute *attr, char *buf)
>   	instance =
>   	    container_of(attr, struct thermal_instance, attr);
>   
> -	if (instance->trip == THERMAL_TRIPS_NONE)
> -		return sprintf(buf, "-1\n");
> -	else
> -		return sprintf(buf, "%d\n", instance->trip);
> +	return sprintf(buf, "%d\n", instance->trip);
>   }
>   
>   ssize_t
> 

-- 
Warm Regards
Thara

  reply	other threads:[~2021-01-12  0:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 23:38 [PATCH 1/6] thermal/core: Remove the 'forced_passive' option Daniel Lezcano
2020-12-14 23:38 ` [PATCH 2/6] thermal/core: Remove unused functions rebind/unbind exception Daniel Lezcano
2021-01-11 23:15   ` Thara Gopinath
2020-12-14 23:38 ` [PATCH 3/6] thermal/core: Remove pointless test with the THERMAL_TRIPS_NONE macro Daniel Lezcano
2021-01-11 23:17   ` Thara Gopinath [this message]
2020-12-14 23:38 ` [PATCH 4/6] acpi/drivers/thermal: Remove TRIPS_NONE cooling device binding Daniel Lezcano
2021-01-05 15:44   ` Daniel Lezcano
2021-01-07  5:10     ` Zhang, Rui
2021-01-07 16:46       ` Daniel Lezcano
2020-12-14 23:38 ` [PATCH 5/6] thermal/core: Remove THERMAL_TRIPS_NONE test Daniel Lezcano
2021-01-11 23:18   ` Thara Gopinath
2020-12-14 23:38 ` [PATCH 6/6] thermal/core: Remove unused macro THERMAL_TRIPS_NONE Daniel Lezcano
2021-01-11 23:18   ` Thara Gopinath
2020-12-22 17:05 ` [PATCH 1/6] thermal/core: Remove the 'forced_passive' option Daniel Lezcano
2021-01-11 23:13 ` Thara Gopinath

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=8a7ca60c-8f94-b8e3-22d6-32ea2e00459a@linaro.org \
    --to=thara.gopinath@linaro.org \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mjg59@codon.org.uk \
    --cc=rui.zhang@intel.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;
as well as URLs for NNTP newsgroup(s).