]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ipmi: Remove uses of return value of seq_printf
authorJoe Perches <joe@perches.com>
Tue, 17 Feb 2015 19:10:56 +0000 (11:10 -0800)
committerCorey Minyard <cminyard@mvista.com>
Fri, 20 Feb 2015 02:58:41 +0000 (20:58 -0600)
The seq_printf like functions will soon be changed to return void.

Convert these uses to check seq_has_overflowed instead.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/ipmi/ipmi_ssif.c

index d5a2bd7230b23d9abe778102c00cd95981ec0951..9bb592872532b1853efb00930c001e54df5fa7ed 100644 (file)
@@ -1998,7 +1998,9 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
        seq_printf(m, "%x", intf->channels[0].address);
        for (i = 1; i < IPMI_MAX_CHANNELS; i++)
                seq_printf(m, " %x", intf->channels[i].address);
-       return seq_putc(m, '\n');
+       seq_putc(m, '\n');
+
+       return seq_has_overflowed(m);
 }
 
 static int smi_ipmb_proc_open(struct inode *inode, struct file *file)
@@ -2017,9 +2019,11 @@ static int smi_version_proc_show(struct seq_file *m, void *v)
 {
        ipmi_smi_t intf = m->private;
 
-       return seq_printf(m, "%u.%u\n",
-                      ipmi_version_major(&intf->bmc->id),
-                      ipmi_version_minor(&intf->bmc->id));
+       seq_printf(m, "%u.%u\n",
+                  ipmi_version_major(&intf->bmc->id),
+                  ipmi_version_minor(&intf->bmc->id));
+
+       return seq_has_overflowed(m);
 }
 
 static int smi_version_proc_open(struct inode *inode, struct file *file)
index fd6110f9589d4c0acc16eb7399a5eabe15aa43ab..321ecb26df6afbdbd3d4c7e8657869e185312dd8 100644 (file)
@@ -2979,7 +2979,9 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
 {
        struct smi_info *smi = m->private;
 
-       return seq_printf(m, "%s\n", si_to_str[smi->si_type]);
+       seq_printf(m, "%s\n", si_to_str[smi->si_type]);
+
+       return seq_has_overflowed(m);
 }
 
 static int smi_type_proc_open(struct inode *inode, struct file *file)
@@ -3041,16 +3043,18 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
 {
        struct smi_info *smi = m->private;
 
-       return seq_printf(m,
-                      "%s,%s,0x%lx,rsp=%d,rsi=%d,rsh=%d,irq=%d,ipmb=%d\n",
-                      si_to_str[smi->si_type],
-                      addr_space_to_str[smi->io.addr_type],
-                      smi->io.addr_data,
-                      smi->io.regspacing,
-                      smi->io.regsize,
-                      smi->io.regshift,
-                      smi->irq,
-                      smi->slave_addr);
+       seq_printf(m,
+                  "%s,%s,0x%lx,rsp=%d,rsi=%d,rsh=%d,irq=%d,ipmb=%d\n",
+                  si_to_str[smi->si_type],
+                  addr_space_to_str[smi->io.addr_type],
+                  smi->io.addr_data,
+                  smi->io.regspacing,
+                  smi->io.regsize,
+                  smi->io.regshift,
+                  smi->irq,
+                  smi->slave_addr);
+
+       return seq_has_overflowed(m);
 }
 
 static int smi_params_proc_open(struct inode *inode, struct file *file)
index 74128e6ec77ae6a9f812b67b57720bffa45532ce..f6e378dac5f5b1031530839d5967ab96607f1f7b 100644 (file)
@@ -1196,7 +1196,9 @@ static int ssif_detect(struct i2c_client *client, struct i2c_board_info *info)
 
 static int smi_type_proc_show(struct seq_file *m, void *v)
 {
-       return seq_puts(m, "ssif\n");
+       seq_puts(m, "ssif\n");
+
+       return seq_has_overflowed(m);
 }
 
 static int smi_type_proc_open(struct inode *inode, struct file *file)