public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFQ] Rules for accepting patches into the linux-releases tree
@ 2005-03-04 22:21 Greg KH
  2005-03-05  5:08 ` Ian Pilcher
                   ` (6 more replies)
  0 siblings, 7 replies; 26+ messages in thread
From: Greg KH @ 2005-03-04 22:21 UTC (permalink / raw)
  To: Chris Wright, torvalds, Andrew Morton; +Cc: linux-kernel

Anything else anyone can think of?  Any objections to any of these?
I based them off of Linus's original list.

thanks,

greg k-h

------

Rules on what kind of patches are accepted, and what ones are not, into
the "linux-release" tree.

 - It can not bigger than 100 lines, with context.
 - It must fix only one thing.
 - It must fix a real bug that bothers people (not a, "This could be a
   problem..." type thing.)
 - It must fix a problem that causes a build error (but not for things
   marked CONFIG_BROKEN), an oops, a hang, or a real security issue.
 - No "theoretical race condition" issues, unless an explanation of how
   the race can be exploited.
 - It can not contain any "trivial" fixes in it (spelling changes,
   whitespace cleanups, etc.)

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH] I2C: lm80 driver improvement
@ 2005-03-04 20:36 Greg KH
  2005-03-05  5:57 ` [RFQ] Rules for accepting patches into the linux-releases tree Shawn Starr
  0 siblings, 1 reply; 26+ messages in thread
From: Greg KH @ 2005-03-04 20:36 UTC (permalink / raw)
  To: linux-kernel, sensors; +Cc: shawn.starr

ChangeSet 1.2095, 2005/03/02 12:10:18-08:00, shawn.starr@rogers.com

[PATCH] I2C: lm80 driver improvement

Description: Cleanup some cluttered macros, add error checking for fan divisor value set.

Signed-off-by: Sytse Wielinga <s.b.wielinga@student.utwente.nl>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Shawn Starr <shawn.starr@rogers.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/i2c/chips/lm80.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)


diff -Nru a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c
--- a/drivers/i2c/chips/lm80.c	2005-03-04 12:25:03 -08:00
+++ b/drivers/i2c/chips/lm80.c	2005-03-04 12:25:03 -08:00
@@ -99,10 +99,7 @@
 #define TEMP_LIMIT_TO_REG(val)		SENSORS_LIMIT((val)<0?\
 					((val)-500)/1000:((val)+500)/1000,0,255)
 
-#define ALARMS_FROM_REG(val)		(val)
-
 #define DIV_FROM_REG(val)		(1 << (val))
-#define DIV_TO_REG(val)			((val)==8?3:(val)==4?2:(val)==1?0:1)
 
 /*
  * Client data (each client gets its own)
@@ -263,7 +260,17 @@
 			   DIV_FROM_REG(data->fan_div[nr]));
 
 	val = simple_strtoul(buf, NULL, 10);
-	data->fan_div[nr] = DIV_TO_REG(val);
+
+	switch (val) {
+	case 1: data->fan_div[nr] = 0; break;
+	case 2: data->fan_div[nr] = 1; break;
+	case 4: data->fan_div[nr] = 2; break;
+	case 8: data->fan_div[nr] = 3; break;
+	default:
+		dev_err(&client->dev, "fan_div value %ld not "
+			"supported. Choose one of 1, 2, 4 or 8!\n", val);
+		return -EINVAL;
+	}
 
 	reg = (lm80_read_value(client, LM80_REG_FANDIV) & ~(3 << (2 * (nr + 1))))
 	    | (data->fan_div[nr] << (2 * (nr + 1)));
@@ -321,7 +328,7 @@
 static ssize_t show_alarms(struct device *dev, char *buf)
 {
 	struct lm80_data *data = lm80_update_device(dev);
-	return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms));
+	return sprintf(buf, "%u\n", data->alarms);
 }
 
 static DEVICE_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min0, set_in_min0);


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

end of thread, other threads:[~2005-03-07 17:36 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04 22:21 [RFQ] Rules for accepting patches into the linux-releases tree Greg KH
2005-03-05  5:08 ` Ian Pilcher
2005-03-05  5:52   ` Dave Kleikamp
2005-03-05  8:19   ` Valdis.Kletnieks
2005-03-05 12:39   ` Ed Tomlinson
2005-03-05  9:58 ` Adam Sampson
2005-03-05 17:42   ` Greg KH
2005-03-05 18:26   ` Randy.Dunlap
2005-03-05 10:43 ` Andries Brouwer
2005-03-05 17:42   ` Greg KH
2005-03-06 17:10   ` Andres Salomon
2005-03-06 20:10     ` Adam Kropelin
2005-03-07  8:32       ` Andres Salomon
2005-03-07  7:50     ` Paul Jackson
2005-03-07  8:14       ` Andres Salomon
2005-03-05 13:59 ` Adrian Bunk
2005-03-05 17:40   ` Greg KH
2005-03-05 18:31     ` Andre Tomt
2005-03-05 20:01     ` Ian Pilcher
2005-03-06  9:44 ` Marcelo Tosatti
2005-03-07 17:35   ` John W. Linville
2005-03-06 11:20 ` Joel Becker
2005-03-06 11:23 ` Jesper Juhl
  -- strict thread matches above, loose matches on Subject: below --
2005-03-04 20:36 [PATCH] I2C: lm80 driver improvement Greg KH
2005-03-05  5:57 ` [RFQ] Rules for accepting patches into the linux-releases tree Shawn Starr
2005-03-05  6:11   ` Randy.Dunlap
2005-03-05 16:33   ` Greg KH

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