aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-04-15 19:17:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 19:35:24 -0400
commit4395eb1f16cc55406fe3de4546134fc61253a06b (patch)
tree28f879ba2b11fc1d27f39b000ec0c850069e925d /drivers/rtc
parent9f6a240e8b08d3fa711c2b615e7ea901cf59e590 (diff)
rtc: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-cmos.c36
-rw-r--r--drivers/rtc/rtc-ds1305.c6
-rw-r--r--drivers/rtc/rtc-mrst.c16
-rw-r--r--drivers/rtc/rtc-tegra.c4
4 files changed, 34 insertions, 28 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 5b2e76159b41..87647f459198 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -459,23 +459,25 @@ static int cmos_procfs(struct device *dev, struct seq_file *seq)
459 /* NOTE: at least ICH6 reports battery status using a different 459 /* NOTE: at least ICH6 reports battery status using a different
460 * (non-RTC) bit; and SQWE is ignored on many current systems. 460 * (non-RTC) bit; and SQWE is ignored on many current systems.
461 */ 461 */
462 return seq_printf(seq, 462 seq_printf(seq,
463 "periodic_IRQ\t: %s\n" 463 "periodic_IRQ\t: %s\n"
464 "update_IRQ\t: %s\n" 464 "update_IRQ\t: %s\n"
465 "HPET_emulated\t: %s\n" 465 "HPET_emulated\t: %s\n"
466 // "square_wave\t: %s\n" 466 // "square_wave\t: %s\n"
467 "BCD\t\t: %s\n" 467 "BCD\t\t: %s\n"
468 "DST_enable\t: %s\n" 468 "DST_enable\t: %s\n"
469 "periodic_freq\t: %d\n" 469 "periodic_freq\t: %d\n"
470 "batt_status\t: %s\n", 470 "batt_status\t: %s\n",
471 (rtc_control & RTC_PIE) ? "yes" : "no", 471 (rtc_control & RTC_PIE) ? "yes" : "no",
472 (rtc_control & RTC_UIE) ? "yes" : "no", 472 (rtc_control & RTC_UIE) ? "yes" : "no",
473 is_hpet_enabled() ? "yes" : "no", 473 is_hpet_enabled() ? "yes" : "no",
474 // (rtc_control & RTC_SQWE) ? "yes" : "no", 474 // (rtc_control & RTC_SQWE) ? "yes" : "no",
475 (rtc_control & RTC_DM_BINARY) ? "no" : "yes", 475 (rtc_control & RTC_DM_BINARY) ? "no" : "yes",
476 (rtc_control & RTC_DST_EN) ? "yes" : "no", 476 (rtc_control & RTC_DST_EN) ? "yes" : "no",
477 cmos->rtc->irq_freq, 477 cmos->rtc->irq_freq,
478 (valid & RTC_VRT) ? "okay" : "dead"); 478 (valid & RTC_VRT) ? "okay" : "dead");
479
480 return 0;
479} 481}
480 482
481#else 483#else
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 129add77065d..12b07158a366 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -434,9 +434,9 @@ static int ds1305_proc(struct device *dev, struct seq_file *seq)
434 } 434 }
435 435
436done: 436done:
437 return seq_printf(seq, 437 seq_printf(seq, "trickle_charge\t: %s%s\n", diodes, resistors);
438 "trickle_charge\t: %s%s\n", 438
439 diodes, resistors); 439 return 0;
440} 440}
441 441
442#else 442#else
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 3a6fd3a8a2ec..548ea6f6f384 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -277,13 +277,15 @@ static int mrst_procfs(struct device *dev, struct seq_file *seq)
277 valid = vrtc_cmos_read(RTC_VALID); 277 valid = vrtc_cmos_read(RTC_VALID);
278 spin_unlock_irq(&rtc_lock); 278 spin_unlock_irq(&rtc_lock);
279 279
280 return seq_printf(seq, 280 seq_printf(seq,
281 "periodic_IRQ\t: %s\n" 281 "periodic_IRQ\t: %s\n"
282 "alarm\t\t: %s\n" 282 "alarm\t\t: %s\n"
283 "BCD\t\t: no\n" 283 "BCD\t\t: no\n"
284 "periodic_freq\t: daily (not adjustable)\n", 284 "periodic_freq\t: daily (not adjustable)\n",
285 (rtc_control & RTC_PIE) ? "on" : "off", 285 (rtc_control & RTC_PIE) ? "on" : "off",
286 (rtc_control & RTC_AIE) ? "on" : "off"); 286 (rtc_control & RTC_AIE) ? "on" : "off");
287
288 return 0;
287} 289}
288 290
289#else 291#else
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index d948277057d8..60232bd366ef 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -261,7 +261,9 @@ static int tegra_rtc_proc(struct device *dev, struct seq_file *seq)
261 if (!dev || !dev->driver) 261 if (!dev || !dev->driver)
262 return 0; 262 return 0;
263 263
264 return seq_printf(seq, "name\t\t: %s\n", dev_name(dev)); 264 seq_printf(seq, "name\t\t: %s\n", dev_name(dev));
265
266 return 0;
265} 267}
266 268
267static irqreturn_t tegra_rtc_irq_handler(int irq, void *data) 269static irqreturn_t tegra_rtc_irq_handler(int irq, void *data)