Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1725434

Re: [PATCH 11/13] thermal/drivers/hisi: Convert long to int

From Leo Yan <leo.yan@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 11/13] thermal/drivers/hisi: Convert long to int
Date 2017-09-02 05:50 +0200
Message-ID <ul7Bv-69E-5@gated-at.bofh.it> (permalink)
References <uk6Rb-63h-5@gated-at.bofh.it> <uk6Rc-63h-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Aug 30, 2017 at 10:47:35AM +0200, Daniel Lezcano wrote:
> There is no point to specify the temperature as long variable, the int is
> enough.
> 
> Replace all long variables to int, so making the code consistent.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/thermal/hisi_thermal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
> index 68b625c..9eee82b 100644
> --- a/drivers/thermal/hisi_thermal.c
> +++ b/drivers/thermal/hisi_thermal.c
> @@ -83,12 +83,12 @@ static inline int hisi_thermal_step_to_temp(int step)
>  	return HISI_TEMP_BASE + (step * HISI_TEMP_STEP);
>  }
>  
> -static inline long hisi_thermal_temp_to_step(long temp)
> +static inline int hisi_thermal_temp_to_step(int temp)
>  {
>  	return (temp - HISI_TEMP_BASE) / HISI_TEMP_STEP;
>  }
>  
> -static inline long hisi_thermal_round_temp(int temp)
> +static inline int hisi_thermal_round_temp(int temp)
>  {
>  	return hisi_thermal_step_to_temp(
>  		hisi_thermal_temp_to_step(temp));
> -- 
> 2.7.4
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 11/13] thermal/drivers/hisi: Convert long to int Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-08-30 10:50 +0200
  Re: [PATCH 11/13] thermal/drivers/hisi: Convert long to int Leo Yan <leo.yan@linaro.org> - 2017-09-02 05:50 +0200

csiph-web