Commit d6c5dc18d863338528f4e89e8dba9449c6e30f4e
Committed by
Corey Minyard
1 parent
2d06a0c9b3
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
ipmi: Remove uses of return value of seq_printf
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>
Showing 3 changed files with 26 additions and 16 deletions Side-by-side Diff
drivers/char/ipmi/ipmi_msghandler.c
... | ... | @@ -1998,7 +1998,9 @@ |
1998 | 1998 | seq_printf(m, "%x", intf->channels[0].address); |
1999 | 1999 | for (i = 1; i < IPMI_MAX_CHANNELS; i++) |
2000 | 2000 | seq_printf(m, " %x", intf->channels[i].address); |
2001 | - return seq_putc(m, '\n'); | |
2001 | + seq_putc(m, '\n'); | |
2002 | + | |
2003 | + return seq_has_overflowed(m); | |
2002 | 2004 | } |
2003 | 2005 | |
2004 | 2006 | static int smi_ipmb_proc_open(struct inode *inode, struct file *file) |
... | ... | @@ -2017,9 +2019,11 @@ |
2017 | 2019 | { |
2018 | 2020 | ipmi_smi_t intf = m->private; |
2019 | 2021 | |
2020 | - return seq_printf(m, "%u.%u\n", | |
2021 | - ipmi_version_major(&intf->bmc->id), | |
2022 | - ipmi_version_minor(&intf->bmc->id)); | |
2022 | + seq_printf(m, "%u.%u\n", | |
2023 | + ipmi_version_major(&intf->bmc->id), | |
2024 | + ipmi_version_minor(&intf->bmc->id)); | |
2025 | + | |
2026 | + return seq_has_overflowed(m); | |
2023 | 2027 | } |
2024 | 2028 | |
2025 | 2029 | static int smi_version_proc_open(struct inode *inode, struct file *file) |
drivers/char/ipmi/ipmi_si_intf.c
... | ... | @@ -2979,7 +2979,9 @@ |
2979 | 2979 | { |
2980 | 2980 | struct smi_info *smi = m->private; |
2981 | 2981 | |
2982 | - return seq_printf(m, "%s\n", si_to_str[smi->si_type]); | |
2982 | + seq_printf(m, "%s\n", si_to_str[smi->si_type]); | |
2983 | + | |
2984 | + return seq_has_overflowed(m); | |
2983 | 2985 | } |
2984 | 2986 | |
2985 | 2987 | static int smi_type_proc_open(struct inode *inode, struct file *file) |
... | ... | @@ -3041,16 +3043,18 @@ |
3041 | 3043 | { |
3042 | 3044 | struct smi_info *smi = m->private; |
3043 | 3045 | |
3044 | - return seq_printf(m, | |
3045 | - "%s,%s,0x%lx,rsp=%d,rsi=%d,rsh=%d,irq=%d,ipmb=%d\n", | |
3046 | - si_to_str[smi->si_type], | |
3047 | - addr_space_to_str[smi->io.addr_type], | |
3048 | - smi->io.addr_data, | |
3049 | - smi->io.regspacing, | |
3050 | - smi->io.regsize, | |
3051 | - smi->io.regshift, | |
3052 | - smi->irq, | |
3053 | - smi->slave_addr); | |
3046 | + seq_printf(m, | |
3047 | + "%s,%s,0x%lx,rsp=%d,rsi=%d,rsh=%d,irq=%d,ipmb=%d\n", | |
3048 | + si_to_str[smi->si_type], | |
3049 | + addr_space_to_str[smi->io.addr_type], | |
3050 | + smi->io.addr_data, | |
3051 | + smi->io.regspacing, | |
3052 | + smi->io.regsize, | |
3053 | + smi->io.regshift, | |
3054 | + smi->irq, | |
3055 | + smi->slave_addr); | |
3056 | + | |
3057 | + return seq_has_overflowed(m); | |
3054 | 3058 | } |
3055 | 3059 | |
3056 | 3060 | static int smi_params_proc_open(struct inode *inode, struct file *file) |
drivers/char/ipmi/ipmi_ssif.c
... | ... | @@ -1196,7 +1196,9 @@ |
1196 | 1196 | |
1197 | 1197 | static int smi_type_proc_show(struct seq_file *m, void *v) |
1198 | 1198 | { |
1199 | - return seq_puts(m, "ssif\n"); | |
1199 | + seq_puts(m, "ssif\n"); | |
1200 | + | |
1201 | + return seq_has_overflowed(m); | |
1200 | 1202 | } |
1201 | 1203 | |
1202 | 1204 | static int smi_type_proc_open(struct inode *inode, struct file *file) |
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd
-
mentioned in commit 5e33cd