All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <200501292108.56248.shawn.starr@rogers.com>

diff --git a/a/1.txt b/N1/1.txt
index 5bde743..65dcc1c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -3,54 +3,3 @@ Description: Cleanup some cluttered macros, add error checking for fan divisor v
 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>
-
--------------- next part --------------
-
-Description: Cleanup some cluttered macros, add error checking for fan divisor value set.
-
-Approved-by: Greg KH <greg@kroah.com>
-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>
-
---- linux-2.6.11-rc2/drivers/i2c/chips/lm80.c	2005-01-26 02:04:38.000000000 -0500
-+++ linux-2.6.11-rc2-fixes/drivers/i2c/chips/lm80.c	2005-01-26 12:31:26.000000000 -0500
-@@ -99,10 +99,7 @@ static inline long TEMP_FROM_REG(u16 tem
- #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)
-@@ -269,7 +266,17 @@ static ssize_t set_fan_div(struct device
- 			   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)));
-@@ -327,7 +334,7 @@ set_temp(os_hyst, temp_os_hyst, LM80_REG
- 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);
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..fd08919
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,6 @@
+Content-Type: text/plain;
+  charset="iso-8859-1";
+  name="lm80-fixup-3.diff"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment;
+	filename="lm80-fixup-3.diff"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..a0d2566
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,49 @@
+
+Description: Cleanup some cluttered macros, add error checking for fan divisor value set.
+
+Approved-by: Greg KH <greg@kroah.com>
+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>
+
+--- linux-2.6.11-rc2/drivers/i2c/chips/lm80.c	2005-01-26 02:04:38.000000000 -0500
++++ linux-2.6.11-rc2-fixes/drivers/i2c/chips/lm80.c	2005-01-26 12:31:26.000000000 -0500
+@@ -99,10 +99,7 @@ static inline long TEMP_FROM_REG(u16 tem
+ #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)
+@@ -269,7 +266,17 @@ static ssize_t set_fan_div(struct device
+ 			   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)));
+@@ -327,7 +334,7 @@ set_temp(os_hyst, temp_os_hyst, LM80_REG
+ 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);
diff --git a/a/content_digest b/N1/content_digest
index 1813704..adc0951 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,22 +1,23 @@
  "ref\020050127090358.GC1528@kroah.com\0"
  "ref\020050127165646.97935.qmail@web88003.mail.re2.yahoo.com\0"
  "ref\020050129232537.GA14798@kroah.com\0"
- "From\0shawn.starr@rogers.com (Shawn Starr)\0"
+ "From\0Shawn Starr <shawn.starr@rogers.com>\0"
  "Subject\0[PATCH 2.6.11-rc2] I2C: lm80 driver improvement - again...\0"
- "Date\0Thu, 19 May 2005 06:25:34 +0000\0"
+ "Date\0Sat, 29 Jan 2005 21:08:55 -0500\0"
  "To\0Greg KH <greg@kroah.com>\0"
  "Cc\0Aurelien Jarno <aurelien@aurel32.net>"
   linux-kernel@vger.kernel.org
  " lm78@stimpy.netroedge.com\0"
- "\00:1\0"
+ "\01:1\0"
  "b\0"
  "Description: Cleanup some cluttered macros, add error checking for fan divisor value set.\n"
  "\n"
  "Signed-off-by: Sytse Wielinga <s.b.wielinga@student.utwente.nl>\n"
  "Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>\n"
- "Signed-off-by: Shawn Starr <shawn.starr@rogers.com>\n"
- "\n"
- "-------------- next part --------------\n"
+ Signed-off-by: Shawn Starr <shawn.starr@rogers.com>
+ "\01:2\0"
+ "fn\0lm80-fixup-3.diff\0"
+ "b\0"
  "\n"
  "Description: Cleanup some cluttered macros, add error checking for fan divisor value set.\n"
  "\n"
@@ -34,7 +35,7 @@
  "-#define ALARMS_FROM_REG(val)\t\t(val)\n"
  "-\n"
  " #define DIV_FROM_REG(val)\t\t(1 << (val))\n"
- "-#define DIV_TO_REG(val)\t\t\t((val)=8?3:(val)=4?2:(val)=1?0:1)\n"
+ "-#define DIV_TO_REG(val)\t\t\t((val)==8?3:(val)==4?2:(val)==1?0:1)\n"
  " \n"
  " /*\n"
  "  * Client data (each client gets its own)\n"
@@ -67,4 +68,4 @@
  " \n"
   static DEVICE_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min0, set_in_min0);
 
-19b8d0c8ac97972eba70ce62ed52d0ec290f4c4438a347b2412473be0c03e952
+256cb399c004baf73b066b894cb19e7065492712826433e28f471a36da1e0b74

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.