public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ADT746X: logical-bitwise & confusion in set_max_duty_at_crit()
@ 2008-03-10  0:04 Roel Kluin
  2008-03-10  7:46 ` Colin Leroy
  0 siblings, 1 reply; 10+ messages in thread
From: Roel Kluin @ 2008-03-10  0:04 UTC (permalink / raw)
  To: colin; +Cc: lkml

logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c
index 9587869..8ea7da2 100644
--- a/drivers/hwmon/adt7473.c
+++ b/drivers/hwmon/adt7473.c
@@ -570,7 +570,7 @@ static ssize_t set_max_duty_at_crit(struct device *dev,
 	struct i2c_client *client = to_i2c_client(dev);
 	struct adt7473_data *data = i2c_get_clientdata(client);
 	int temp = simple_strtol(buf, NULL, 10);
-	temp = temp && 0xFF;
+	temp &= 0xFF;
 
 	mutex_lock(&data->lock);
 	data->max_duty_at_overheat = temp;

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-03-10 22:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10  0:04 ADT746X: logical-bitwise & confusion in set_max_duty_at_crit() Roel Kluin
2008-03-10  7:46 ` Colin Leroy
2008-03-10  8:06   ` Benjamin Herrenschmidt
2008-03-10  8:22     ` Roel Kluin
2008-03-10  9:13       ` Segher Boessenkool
2008-03-10  9:59         ` Roel Kluin
2008-03-10 18:13           ` Darrick J. Wong
2008-03-10 21:17         ` Roel Kluin
2008-03-10 21:56           ` Segher Boessenkool
2008-03-10 22:15             ` Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox