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


Groups > linux.kernel > #1308199

Re: [PATCH] thermal: use %d to print S32 parameters

From Javi Merino <javi.merino@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] thermal: use %d to print S32 parameters
Date 2016-01-13 10:30 +0100
Message-ID <qQpUC-63W-3@gated-at.bofh.it> (permalink)
References <qQp8d-5ru-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jan 13, 2016 at 04:33:56PM +0800, Leo Yan wrote:
> Power allocator's parameters are S32 type, so use %d to print them.

Indeed.  The name of the macro is create_s32_tzp_attr(), it's
explicitly saying that the parameter is signed!

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

Acked-by: Javi Merino <javi.merino@arm.com>

Cheers,
Javi

> ---
>  drivers/thermal/thermal_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index d9e525c..1335df2 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -931,7 +931,7 @@ static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,
>  	struct thermal_zone_device *tz = to_thermal_zone(dev);		\
>  									\
>  	if (tz->tzp)							\
> -		return sprintf(buf, "%u\n", tz->tzp->name);		\
> +		return sprintf(buf, "%d\n", tz->tzp->name);		\
>  	else								\
>  		return -EIO;						\
>  	}								\
> -- 
> 1.9.1
> 

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


Thread

[PATCH] thermal: use %d to print S32 parameters Leo Yan <leo.yan@linaro.org> - 2016-01-13 09:40 +0100
  Re: [PATCH] thermal: use %d to print S32 parameters Javi Merino <javi.merino@arm.com> - 2016-01-13 10:30 +0100

csiph-web