diff options
author | Joe Perches <joe@perches.com> | 2015-02-22 13:21:07 -0500 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2015-05-05 15:24:46 -0400 |
commit | 5e33cd0c5a299772b5ec1a493f0a77548664ae06 (patch) | |
tree | ce2245faea49a8d676fc53370188a08a136d4668 | |
parent | b0e9aaa99dfb3036829e91d4f0aae449639e221a (diff) |
ipmi: Remove incorrect use of seq_has_overflowed
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>
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 4 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 4 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 9bb592872532..bf75f6361773 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v) | |||
2000 | seq_printf(m, " %x", intf->channels[i].address); | 2000 | seq_printf(m, " %x", intf->channels[i].address); |
2001 | seq_putc(m, '\n'); | 2001 | seq_putc(m, '\n'); |
2002 | 2002 | ||
2003 | return seq_has_overflowed(m); | 2003 | return 0; |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | static int smi_ipmb_proc_open(struct inode *inode, struct file *file) | 2006 | 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 | ipmi_version_major(&intf->bmc->id), | 2023 | ipmi_version_major(&intf->bmc->id), |
2024 | ipmi_version_minor(&intf->bmc->id)); | 2024 | ipmi_version_minor(&intf->bmc->id)); |
2025 | 2025 | ||
2026 | return seq_has_overflowed(m); | 2026 | return 0; |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | static int smi_version_proc_open(struct inode *inode, struct file *file) | 2029 | static int smi_version_proc_open(struct inode *inode, struct file *file) |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 5e90a18afbaf..468c75e10330 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -3080,7 +3080,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v) | |||
3080 | 3080 | ||
3081 | seq_printf(m, "%s\n", si_to_str[smi->si_type]); | 3081 | seq_printf(m, "%s\n", si_to_str[smi->si_type]); |
3082 | 3082 | ||
3083 | return seq_has_overflowed(m); | 3083 | return 0; |
3084 | } | 3084 | } |
3085 | 3085 | ||
3086 | static int smi_type_proc_open(struct inode *inode, struct file *file) | 3086 | 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 | smi->irq, | 3153 | smi->irq, |
3154 | smi->slave_addr); | 3154 | smi->slave_addr); |
3155 | 3155 | ||
3156 | return seq_has_overflowed(m); | 3156 | return 0; |
3157 | } | 3157 | } |
3158 | 3158 | ||
3159 | static int smi_params_proc_open(struct inode *inode, struct file *file) | 3159 | static int smi_params_proc_open(struct inode *inode, struct file *file) |
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 3c3b7257867b..ee3b8c5e7e21 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c | |||
@@ -1200,7 +1200,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v) | |||
1200 | { | 1200 | { |
1201 | seq_puts(m, "ssif\n"); | 1201 | seq_puts(m, "ssif\n"); |
1202 | 1202 | ||
1203 | return seq_has_overflowed(m); | 1203 | return 0; |
1204 | } | 1204 | } |
1205 | 1205 | ||
1206 | static int smi_type_proc_open(struct inode *inode, struct file *file) | 1206 | static int smi_type_proc_open(struct inode *inode, struct file *file) |