* [PATCH] thermal: use %d to print S32 parameters
@ 2016-01-13 8:33 Leo Yan
2016-01-13 9:22 ` Javi Merino
0 siblings, 1 reply; 3+ messages in thread
From: Leo Yan @ 2016-01-13 8:33 UTC (permalink / raw)
To: Zhang Rui, Eduardo Valentin, Javi Merino, Punit Agrawal, linux-pm,
linux-kernel
Cc: Leo Yan
Power allocator's parameters are S32 type, so use %d to print them.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: use %d to print S32 parameters
2016-01-13 8:33 [PATCH] thermal: use %d to print S32 parameters Leo Yan
@ 2016-01-13 9:22 ` Javi Merino
2016-02-18 9:42 ` Leo Yan
0 siblings, 1 reply; 3+ messages in thread
From: Javi Merino @ 2016-01-13 9:22 UTC (permalink / raw)
To: Leo Yan; +Cc: Zhang Rui, Eduardo Valentin, Punit Agrawal, linux-pm,
linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] thermal: use %d to print S32 parameters
2016-01-13 9:22 ` Javi Merino
@ 2016-02-18 9:42 ` Leo Yan
0 siblings, 0 replies; 3+ messages in thread
From: Leo Yan @ 2016-02-18 9:42 UTC (permalink / raw)
To: Javi Merino
Cc: Zhang Rui, Eduardo Valentin, Punit Agrawal, linux-pm,
linux-kernel
On Wed, Jan 13, 2016 at 09:22:16AM +0000, Javi Merino wrote:
> 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>
Rui, Eduardo,
Could you help merge this patch as well?
Thanks,
Leo Yan
>
> 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
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-18 9:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 8:33 [PATCH] thermal: use %d to print S32 parameters Leo Yan
2016-01-13 9:22 ` Javi Merino
2016-02-18 9:42 ` Leo Yan
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).