Commit 5e33cd0c authored by Joe Perches's avatar Joe Perches Committed by Corey Minyard

ipmi: Remove incorrect use of seq_has_overflowed

commit d6c5dc18 ("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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent b0e9aaa9
...@@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v) ...@@ -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_printf(m, " %x", intf->channels[i].address);
seq_putc(m, '\n'); seq_putc(m, '\n');
return seq_has_overflowed(m); return 0;
} }
static int smi_ipmb_proc_open(struct inode *inode, struct file *file) 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) ...@@ -2023,7 +2023,7 @@ static int smi_version_proc_show(struct seq_file *m, void *v)
ipmi_version_major(&intf->bmc->id), ipmi_version_major(&intf->bmc->id),
ipmi_version_minor(&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) static int smi_version_proc_open(struct inode *inode, struct file *file)
......
...@@ -3080,7 +3080,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v) ...@@ -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]); 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) 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) ...@@ -3153,7 +3153,7 @@ static int smi_params_proc_show(struct seq_file *m, void *v)
smi->irq, smi->irq,
smi->slave_addr); smi->slave_addr);
return seq_has_overflowed(m); return 0;
} }
static int smi_params_proc_open(struct inode *inode, struct file *file) static int smi_params_proc_open(struct inode *inode, struct file *file)
......
...@@ -1200,7 +1200,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v) ...@@ -1200,7 +1200,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
{ {
seq_puts(m, "ssif\n"); seq_puts(m, "ssif\n");
return seq_has_overflowed(m); return 0;
} }
static int smi_type_proc_open(struct inode *inode, struct file *file) static int smi_type_proc_open(struct inode *inode, struct file *file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment