Skip to content

Commit 5e33cd0

Browse files
JoePerchescminyard
authored andcommitted
ipmi: Remove incorrect use of seq_has_overflowed
commit d6c5dc1 ("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>
1 parent b0e9aaa commit 5e33cd0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/char/ipmi/ipmi_msghandler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ static int smi_ipmb_proc_show(struct seq_file *m, void *v)
20002000
seq_printf(m, " %x", intf->channels[i].address);
20012001
seq_putc(m, '\n');
20022002

2003-
return seq_has_overflowed(m);
2003+
return 0;
20042004
}
20052005

20062006
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)
20232023
ipmi_version_major(&intf->bmc->id),
20242024
ipmi_version_minor(&intf->bmc->id));
20252025

2026-
return seq_has_overflowed(m);
2026+
return 0;
20272027
}
20282028

20292029
static int smi_version_proc_open(struct inode *inode, struct file *file)

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,7 +3080,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
30803080

30813081
seq_printf(m, "%s\n", si_to_str[smi->si_type]);
30823082

3083-
return seq_has_overflowed(m);
3083+
return 0;
30843084
}
30853085

30863086
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)
31533153
smi->irq,
31543154
smi->slave_addr);
31553155

3156-
return seq_has_overflowed(m);
3156+
return 0;
31573157
}
31583158

31593159
static int smi_params_proc_open(struct inode *inode, struct file *file)

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ static int smi_type_proc_show(struct seq_file *m, void *v)
12001200
{
12011201
seq_puts(m, "ssif\n");
12021202

1203-
return seq_has_overflowed(m);
1203+
return 0;
12041204
}
12051205

12061206
static int smi_type_proc_open(struct inode *inode, struct file *file)

0 commit comments

Comments
 (0)