Skip to contentSkip to conversation

staging: iio: Fix format string mismatch in ad7280a.c

PATCH Applied Masanari Iida 2 participants 2 messages Apr 28, 2014 – Apr 30, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: Fix format string mismatch in ad7280a.c

Fix two format string mismatch in ad7280a.c

---
 drivers/staging/iio/adc/ad7280a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/adc/ad7280a.c +2 -2
index 1ac11f6..d215edf 100644
@@ -443,7 +443,7 @@ static ssize_t ad7280_show_balance_timer(struct device *dev,
 
 	msecs = (ret >> 3) * 71500;
 
-	return sprintf(buf, "%d\n", msecs);
+	return sprintf(buf, "%u\n", msecs);
 }
 
 static ssize_t ad7280_store_balance_timer(struct device *dev,
@@ -619,7 +619,7 @@ static ssize_t ad7280_read_channel_config(struct device *dev,
 		return -EINVAL;
 	}
 
-	return sprintf(buf, "%d\n", val);
+	return sprintf(buf, "%u\n", val);
 }
 
 static ssize_t ad7280_write_channel_config(struct device *dev,
Signature · 1 line
2.0.0.rc1
maintainer Applied
#1 lore raw
Quoted 3 lines · Masanari Iida

Fix two format string mismatch in ad7280a.c

Applied to the togreg branch of iio.git
Note this will initially get pushed out as testing for the autobuilders to play.

Thanks,

Jonathan

Quoted 27 lines
---
  drivers/staging/iio/adc/ad7280a.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/adc/ad7280a.c +2 -2
index 1ac11f6..d215edf 100644
@@ -443,7 +443,7 @@ static ssize_t ad7280_show_balance_timer(struct device *dev,
 
  	msecs = (ret >> 3) * 71500;
 
-	return sprintf(buf, "%d\n", msecs);
+	return sprintf(buf, "%u\n", msecs);
  }
 
  static ssize_t ad7280_store_balance_timer(struct device *dev,
@@ -619,7 +619,7 @@ static ssize_t ad7280_read_channel_config(struct device *dev,
  		return -EINVAL;
  	}
 
-	return sprintf(buf, "%d\n", val);
+	return sprintf(buf, "%u\n", val);
  }
 
  static ssize_t ad7280_write_channel_config(struct device *dev,