* [PATCH 1/2] hwmon: jz4740: fix signedness bug
@ 2011-12-08 13:04 Axel Lin
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Axel Lin @ 2011-12-08 13:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars-Peter Clausen, Jean Delvare, Guenter Roeck, lm-sensors
wait_for_completion_interruptible_timeout() may return negative value.
In this case, checking if (t > 0) will return true if t is unsigned.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/hwmon/jz4740-hwmon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c
index 7a48b1e..3d7e590 100644
--- a/drivers/hwmon/jz4740-hwmon.c
+++ b/drivers/hwmon/jz4740-hwmon.c
@@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev,
{
struct jz4740_hwmon *hwmon = dev_get_drvdata(dev);
struct completion *completion = &hwmon->read_completion;
- unsigned long t;
+ long t;
unsigned long val;
int ret;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] jz4740-battery: fix signedness bug
2011-12-08 13:04 [PATCH 1/2] hwmon: jz4740: fix signedness bug Axel Lin
@ 2011-12-08 13:05 ` Axel Lin
2011-12-08 14:08 ` Lars-Peter Clausen
2011-12-08 14:08 ` [PATCH 1/2] hwmon: jz4740: " Lars-Peter Clausen
2011-12-08 14:20 ` Guenter Roeck
2 siblings, 1 reply; 6+ messages in thread
From: Axel Lin @ 2011-12-08 13:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars-Peter Clausen, Anton Vorontsov
wait_for_completion_interruptible_timeout() may return negative value.
In this case, checking if (t > 0) will return true if t is unsigned.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/power/jz4740-battery.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c
index 763f894..5bb1ddd 100644
--- a/drivers/power/jz4740-battery.c
+++ b/drivers/power/jz4740-battery.c
@@ -67,7 +67,7 @@ static irqreturn_t jz_battery_irq_handler(int irq, void *devid)
static long jz_battery_read_voltage(struct jz_battery *battery)
{
- unsigned long t;
+ long t;
unsigned long val;
long voltage;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] hwmon: jz4740: fix signedness bug
2011-12-08 13:04 [PATCH 1/2] hwmon: jz4740: fix signedness bug Axel Lin
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
@ 2011-12-08 14:08 ` Lars-Peter Clausen
2011-12-08 14:20 ` Guenter Roeck
2 siblings, 0 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2011-12-08 14:08 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Jean Delvare, Guenter Roeck, lm-sensors
On 12/08/2011 02:04 PM, Axel Lin wrote:
> wait_for_completion_interruptible_timeout() may return negative value.
> In this case, checking if (t > 0) will return true if t is unsigned.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks
> ---
> drivers/hwmon/jz4740-hwmon.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c
> index 7a48b1e..3d7e590 100644
> --- a/drivers/hwmon/jz4740-hwmon.c
> +++ b/drivers/hwmon/jz4740-hwmon.c
> @@ -59,7 +59,7 @@ static ssize_t jz4740_hwmon_read_adcin(struct device *dev,
> {
> struct jz4740_hwmon *hwmon = dev_get_drvdata(dev);
> struct completion *completion = &hwmon->read_completion;
> - unsigned long t;
> + long t;
> unsigned long val;
> int ret;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] jz4740-battery: fix signedness bug
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
@ 2011-12-08 14:08 ` Lars-Peter Clausen
2012-01-06 1:57 ` Anton Vorontsov
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2011-12-08 14:08 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Anton Vorontsov
On 12/08/2011 02:05 PM, Axel Lin wrote:
> wait_for_completion_interruptible_timeout() may return negative value.
> In this case, checking if (t > 0) will return true if t is unsigned.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks
> ---
> drivers/power/jz4740-battery.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c
> index 763f894..5bb1ddd 100644
> --- a/drivers/power/jz4740-battery.c
> +++ b/drivers/power/jz4740-battery.c
> @@ -67,7 +67,7 @@ static irqreturn_t jz_battery_irq_handler(int irq, void *devid)
>
> static long jz_battery_read_voltage(struct jz_battery *battery)
> {
> - unsigned long t;
> + long t;
> unsigned long val;
> long voltage;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] hwmon: jz4740: fix signedness bug
2011-12-08 13:04 [PATCH 1/2] hwmon: jz4740: fix signedness bug Axel Lin
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
2011-12-08 14:08 ` [PATCH 1/2] hwmon: jz4740: " Lars-Peter Clausen
@ 2011-12-08 14:20 ` Guenter Roeck
2 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2011-12-08 14:20 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Lars-Peter Clausen, Jean Delvare, lm-sensors
On Thu, Dec 08, 2011 at 08:04:12AM -0500, Axel Lin wrote:
> wait_for_completion_interruptible_timeout() may return negative value.
> In this case, checking if (t > 0) will return true if t is unsigned.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] jz4740-battery: fix signedness bug
2011-12-08 14:08 ` Lars-Peter Clausen
@ 2012-01-06 1:57 ` Anton Vorontsov
0 siblings, 0 replies; 6+ messages in thread
From: Anton Vorontsov @ 2012-01-06 1:57 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Axel Lin, linux-kernel
On Thu, Dec 08, 2011 at 03:08:49PM +0100, Lars-Peter Clausen wrote:
> On 12/08/2011 02:05 PM, Axel Lin wrote:
> > wait_for_completion_interruptible_timeout() may return negative value.
> > In this case, checking if (t > 0) will return true if t is unsigned.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Applied, thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-06 1:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08 13:04 [PATCH 1/2] hwmon: jz4740: fix signedness bug Axel Lin
2011-12-08 13:05 ` [PATCH 2/2] jz4740-battery: " Axel Lin
2011-12-08 14:08 ` Lars-Peter Clausen
2012-01-06 1:57 ` Anton Vorontsov
2011-12-08 14:08 ` [PATCH 1/2] hwmon: jz4740: " Lars-Peter Clausen
2011-12-08 14:20 ` Guenter Roeck
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).