Skip to contentSkip to conversation

fs/seq_file.c: Rename the "Fill" label to avoid build failure

PATCH In review Huacai Chen 3 participants 4 messages Apr 24, 2020 – Apr 26, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/seq_file.c: Rename the "Fill" label to avoid build failure

MIPS define a "Fill" macro as a cache operation in cacheops.h, this will cause build failure under some special configurations. To avoid this failure we rename the "Fill" label in seq_file.c.

---
 fs/seq_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/seq_file.c +2 -2
index 70f5fdf..4e6c56be 100644
@@ -213,7 +213,7 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
 			continue;
 		}
 		if (m->count < m->size)
-			goto Fill;
+			goto Fillbuf;
 		m->op->stop(m, p);
 		kvfree(m->buf);
 		m->count = 0;
@@ -225,7 +225,7 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
 	m->op->stop(m, p);
 	m->count = 0;
 	goto Done;
-Fill:
+Fillbuf:
 	/* they want more? let's try to get some more */
 	while (1) {
 		size_t offs = m->count;
Signature · 1 line
2.7.0
#1 lore raw
Quoted 3 lines · Huacai Chen

MIPS define a "Fill" macro as a cache operation in cacheops.h, this will cause build failure under some special configurations. To avoid this failure we rename the "Fill" label in seq_file.c.

You should rename the Fill macro in the mips header instead. I'd suggest Fill_R4000 of R4000_Fill.

#2 lore raw

Hi, Matthew,

Thank you for your comments,

Quoted 8 lines · Matthew Wilcox
Quoted 3 lines · Huacai Chen

MIPS define a "Fill" macro as a cache operation in cacheops.h, this will cause build failure under some special configurations. To avoid this failure we rename the "Fill" label in seq_file.c.

You should rename the Fill macro in the mips header instead. I'd suggest Fill_R4000 of R4000_Fill.

Hi, Thomas,

What do you think about this? If you agree to rename the "Fill" macro in cacheops.h, I want to rename it to Fill_I, because it has the same coding style as other cache operations in cacheops.h.

Thanks,
Huacai

#3 lore raw
Quoted 7 lines · Huacai Chen
Quoted 6 lines · Matthew Wilcox
Quoted 3 lines · Huacai Chen

MIPS define a "Fill" macro as a cache operation in cacheops.h, this will cause build failure under some special configurations. To avoid this failure we rename the "Fill" label in seq_file.c.

Quoted 6 lines
Quoted 2 lines

You should rename the Fill macro in the mips header instead. I'd suggest Fill_R4000 of R4000_Fill.

What do you think about this? If you agree to rename the "Fill" macro in cacheops.h, I want to rename it to Fill_I, because it has the same coding style as other cache operations in cacheops.h.

works for me, I've merged your patch to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]