]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ipmi: Remove incorrect use of seq_has_overflowed
authorJoe Perches <joe@perches.com>
Sun, 22 Feb 2015 18:21:07 +0000 (10:21 -0800)
committerCorey Minyard <cminyard@mvista.com>
Tue, 5 May 2015 19:24:46 +0000 (14:24 -0500)
commit d6c5dc18d863 ("ipmi: Remove uses of return value of seq_printf")
incorrectly changed the return value of various proc_show functions
to use seq_has_overflowed().

These functions should return 0 on completion rather than 1/true
on overflow.  1 is the same as #define SEQ_SKIP which would cause
the output to not be emitted (skipped) instead.

This is a logical defect only as the length of these outputs are
all smaller than the initial allocation done by the seq filesystem.

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 9bb592872532b1853efb00930c001e54df5fa7ed..bf75f63617731595d958765b7c1582f79452f3cb 100644 (file)
@@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
                seq_printf(m, " %x", intf->channels[i].address);
        seq_putc(m, '\n');
 
-       return seq_has_overflowed(m);
+       return 0;
 }
 
 static int smi_ipmb_proc_open(struct inode *inode, struct file *file)
@@ -2023,7 +2023,7 @@ static int smi_version_proc_show(struct seq_file *m, void *v)
                   ipmi_version_major(&intf->bmc->id),
                   ipmi_version_minor(&intf->bmc->id));
 
-       return seq_has_overflowed(m);
+       return 0;
 }
 
 static int smi_version_proc_open(struct inode *inode, struct file *file)
index 5e90a18afbafa23270aff3718a91f6c010524971..468c75e103300b39070c1e404f0ef864d71e8ab1 100644 (file)
@@ -3080,7 +3080,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
 
        seq_printf(m, "%s\n", si_to_str[smi->si_type]);
 
-       return seq_has_overflowed(m);
+       return 0;
 }
 
 static int smi_type_proc_open(struct inode *inode, struct file *file)
@@ -3153,7 +3153,7 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
                   smi->irq,
                   smi->slave_addr);
 
-       return seq_has_overflowed(m);
+       return 0;
 }
 
 static int smi_params_proc_open(struct inode *inode, struct file *file)
index 3c3b7257867b6ebd17eb9f1d1e6fb27762f4b521..ee3b8c5e7e2155907fcaeaafaf37e365a5242c4b 100644 (file)
@@ -1200,7 +1200,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
 {
        seq_puts(m, "ssif\n");
 
-       return seq_has_overflowed(m);
+       return 0;
 }
 
 static int smi_type_proc_open(struct inode *inode, struct file *file)