]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtc: remove use of seq_printf return value
authorJoe Perches <joe@perches.com>
Wed, 15 Apr 2015 23:17:51 +0000 (16:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 23:35:24 +0000 (16:35 -0700)
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>
drivers/rtc/rtc-cmos.c
drivers/rtc/rtc-ds1305.c
drivers/rtc/rtc-mrst.c
drivers/rtc/rtc-tegra.c

index 5b2e76159b419854ca8f69b8c3f99919fbab319f..87647f4591985195785ad49c662ea9ab02a88112 100644 (file)
@@ -459,23 +459,25 @@ static int cmos_procfs(struct device *dev, struct seq_file *seq)
        /* NOTE:  at least ICH6 reports battery status using a different
         * (non-RTC) bit; and SQWE is ignored on many current systems.
         */
-       return seq_printf(seq,
-                       "periodic_IRQ\t: %s\n"
-                       "update_IRQ\t: %s\n"
-                       "HPET_emulated\t: %s\n"
-                       // "square_wave\t: %s\n"
-                       "BCD\t\t: %s\n"
-                       "DST_enable\t: %s\n"
-                       "periodic_freq\t: %d\n"
-                       "batt_status\t: %s\n",
-                       (rtc_control & RTC_PIE) ? "yes" : "no",
-                       (rtc_control & RTC_UIE) ? "yes" : "no",
-                       is_hpet_enabled() ? "yes" : "no",
-                       // (rtc_control & RTC_SQWE) ? "yes" : "no",
-                       (rtc_control & RTC_DM_BINARY) ? "no" : "yes",
-                       (rtc_control & RTC_DST_EN) ? "yes" : "no",
-                       cmos->rtc->irq_freq,
-                       (valid & RTC_VRT) ? "okay" : "dead");
+       seq_printf(seq,
+                  "periodic_IRQ\t: %s\n"
+                  "update_IRQ\t: %s\n"
+                  "HPET_emulated\t: %s\n"
+                  // "square_wave\t: %s\n"
+                  "BCD\t\t: %s\n"
+                  "DST_enable\t: %s\n"
+                  "periodic_freq\t: %d\n"
+                  "batt_status\t: %s\n",
+                  (rtc_control & RTC_PIE) ? "yes" : "no",
+                  (rtc_control & RTC_UIE) ? "yes" : "no",
+                  is_hpet_enabled() ? "yes" : "no",
+                  // (rtc_control & RTC_SQWE) ? "yes" : "no",
+                  (rtc_control & RTC_DM_BINARY) ? "no" : "yes",
+                  (rtc_control & RTC_DST_EN) ? "yes" : "no",
+                  cmos->rtc->irq_freq,
+                  (valid & RTC_VRT) ? "okay" : "dead");
+
+       return 0;
 }
 
 #else
index 129add77065d66d355e4711d057b081fa7471a07..12b07158a3664de6aaaa2e3f42ae2266182473be 100644 (file)
@@ -434,9 +434,9 @@ static int ds1305_proc(struct device *dev, struct seq_file *seq)
        }
 
 done:
-       return seq_printf(seq,
-                       "trickle_charge\t: %s%s\n",
-                       diodes, resistors);
+       seq_printf(seq, "trickle_charge\t: %s%s\n", diodes, resistors);
+
+       return 0;
 }
 
 #else
index 3a6fd3a8a2ec63d389a2f4dbf948f5c2090ecc3a..548ea6f6f384b27f78e51b545116948d4c8cc652 100644 (file)
@@ -277,13 +277,15 @@ static int mrst_procfs(struct device *dev, struct seq_file *seq)
        valid = vrtc_cmos_read(RTC_VALID);
        spin_unlock_irq(&rtc_lock);
 
-       return seq_printf(seq,
-                       "periodic_IRQ\t: %s\n"
-                       "alarm\t\t: %s\n"
-                       "BCD\t\t: no\n"
-                       "periodic_freq\t: daily (not adjustable)\n",
-                       (rtc_control & RTC_PIE) ? "on" : "off",
-                       (rtc_control & RTC_AIE) ? "on" : "off");
+       seq_printf(seq,
+                  "periodic_IRQ\t: %s\n"
+                  "alarm\t\t: %s\n"
+                  "BCD\t\t: no\n"
+                  "periodic_freq\t: daily (not adjustable)\n",
+                  (rtc_control & RTC_PIE) ? "on" : "off",
+                  (rtc_control & RTC_AIE) ? "on" : "off");
+
+       return 0;
 }
 
 #else
index d948277057d8223c88e77d3b68e45a2062752de9..60232bd366ef1499fabaf6d23c8f7538961dcf8e 100644 (file)
@@ -261,7 +261,9 @@ static int tegra_rtc_proc(struct device *dev, struct seq_file *seq)
        if (!dev || !dev->driver)
                return 0;
 
-       return seq_printf(seq, "name\t\t: %s\n", dev_name(dev));
+       seq_printf(seq, "name\t\t: %s\n", dev_name(dev));
+
+       return 0;
 }
 
 static irqreturn_t tegra_rtc_irq_handler(int irq, void *data)