linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure
@ 2020-04-24  8:29 Huacai Chen
  2020-04-24 11:27 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Huacai Chen @ 2020-04-24  8:29 UTC (permalink / raw)
  To: Alexander Viro
  Cc: linux-fsdevel, Fuxin Zhang, Zhangjin Wu, Huacai Chen, 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.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 fs/seq_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/seq_file.c b/fs/seq_file.c
index 70f5fdf..4e6c56be 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -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;
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure
  2020-04-24  8:29 [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure Huacai Chen
@ 2020-04-24 11:27 ` Matthew Wilcox
  2020-04-25  2:54   ` Huacai Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2020-04-24 11:27 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Alexander Viro, linux-fsdevel, Fuxin Zhang, Zhangjin Wu,
	Huacai Chen, linux-mips

On Fri, Apr 24, 2020 at 04:29:04PM +0800, Huacai Chen wrote:
> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure
  2020-04-24 11:27 ` Matthew Wilcox
@ 2020-04-25  2:54   ` Huacai Chen
  2020-04-26 13:46     ` Thomas Bogendoerfer
  0 siblings, 1 reply; 4+ messages in thread
From: Huacai Chen @ 2020-04-25  2:54 UTC (permalink / raw)
  To: Matthew Wilcox, Thomas Bogendoerfer
  Cc: Alexander Viro, linux-fsdevel, Fuxin Zhang, Zhangjin Wu, open list:MIPS

Hi, Matthew,

Thank you for your comments,

On Fri, Apr 24, 2020 at 7:27 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Fri, Apr 24, 2020 at 04:29:04PM +0800, Huacai Chen wrote:
> > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure
  2020-04-25  2:54   ` Huacai Chen
@ 2020-04-26 13:46     ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2020-04-26 13:46 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Matthew Wilcox, Alexander Viro, linux-fsdevel, Fuxin Zhang,
	Zhangjin Wu, open list:MIPS

On Sat, Apr 25, 2020 at 10:54:23AM +0800, Huacai Chen wrote:
> On Fri, Apr 24, 2020 at 7:27 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Fri, Apr 24, 2020 at 04:29:04PM +0800, Huacai Chen wrote:
> > > 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.
> 
> 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-26 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24  8:29 [PATCH] fs/seq_file.c: Rename the "Fill" label to avoid build failure Huacai Chen
2020-04-24 11:27 ` Matthew Wilcox
2020-04-25  2:54   ` Huacai Chen
2020-04-26 13:46     ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).