* [PATCH] erofs: fix compile warnings when moving out include/trace/events/erofs.h
@ 2019-08-26 13:22 Gao Xiang
2019-08-26 13:26 ` [PATCH RESEND] " Gao Xiang
0 siblings, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2019-08-26 13:22 UTC (permalink / raw)
To: Chao Yu, Greg Kroah-Hartman, devel
Cc: LKML, linux-erofs, Chao Yu, Miao Xie, weidu.du, Fang Wei, Gao Xiang
As Stephon reported [1], many compile warnings are raised when
moving out include/trace/events/erofs.h:
In file included from include/trace/events/erofs.h:8,
from <command-line>:
include/trace/events/erofs.h:28:37: warning: 'struct dentry' declared inside parameter list will not be visible outside of this definition or declaration
TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
^~~~~~
include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
static inline void trace_##name(proto) \
^~~~~
include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^~~~~~
include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~~
include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~
include/trace/events/erofs.h:26:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(erofs_lookup,
^~~~~~~~~~~
include/trace/events/erofs.h:28:2: note: in expansion of macro 'TP_PROTO'
TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
^~~~~~~~
That makes me very confused since most original EROFS tracepoint code
was taken from f2fs, and finally I found
commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")
It seems these warnings are generated from KERNEL_HEADER_TEST feature and
ext4/f2fs tracepoint files were in blacklist.
Anyway, let's fix these issues for KERNEL_HEADER_TEST feature instead
of adding to blacklist...
[1] https://lore.kernel.org/lkml/20190826162432.11100665@canb.auug.org.au/
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
Hi Chao and Greg,
It seems the root cause reported by Stephen is the following (sorry for
taking some time...) could you kindly review and merge this patch?
Thanks,
Gao Xiang
include/trace/events/erofs.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h
index bfb2da9c4eee..d239f39cbc8c 100644
--- a/include/trace/events/erofs.h
+++ b/include/trace/events/erofs.h
@@ -6,6 +6,9 @@
#define _TRACE_EROFS_H
#include <linux/tracepoint.h>
+#include <linux/fs.h>
+
+struct erofs_map_blocks;
#define show_dev(dev) MAJOR(dev), MINOR(dev)
#define show_dev_nid(entry) show_dev(entry->dev), entry->nid
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH RESEND] erofs: fix compile warnings when moving out include/trace/events/erofs.h
2019-08-26 13:22 [PATCH] erofs: fix compile warnings when moving out include/trace/events/erofs.h Gao Xiang
@ 2019-08-26 13:26 ` Gao Xiang
2019-08-26 13:51 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2019-08-26 13:26 UTC (permalink / raw)
To: Chao Yu, Greg Kroah-Hartman, devel
Cc: LKML, linux-erofs, Stephen Rothwell, Chao Yu, Miao Xie, weidu.du,
Fang Wei, Gao Xiang
As Stephon reported [1], many compile warnings are raised when
moving out include/trace/events/erofs.h:
In file included from include/trace/events/erofs.h:8,
from <command-line>:
include/trace/events/erofs.h:28:37: warning: 'struct dentry' declared inside parameter list will not be visible outside of this definition or declaration
TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
^~~~~~
include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
static inline void trace_##name(proto) \
^~~~~
include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^~~~~~
include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~~
include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~
include/trace/events/erofs.h:26:1: note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(erofs_lookup,
^~~~~~~~~~~
include/trace/events/erofs.h:28:2: note: in expansion of macro 'TP_PROTO'
TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
^~~~~~~~
That makes me very confused since most original EROFS tracepoint code
was taken from f2fs, and finally I found
commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")
It seems these warnings are generated from KERNEL_HEADER_TEST feature and
ext4/f2fs tracepoint files were in blacklist.
Anyway, let's fix these issues for KERNEL_HEADER_TEST feature instead
of adding to blacklist...
[1] https://lore.kernel.org/lkml/20190826162432.11100665@canb.auug.org.au/
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
[RESEND] Cc Stephen as well. no change at all...
Hi Chao and Greg,
It seems the root cause reported by Stephen is the following (sorry for
taking some time...) could you kindly review and merge this patch?
Thanks,
Gao Xiang
include/trace/events/erofs.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h
index bfb2da9c4eee..d239f39cbc8c 100644
--- a/include/trace/events/erofs.h
+++ b/include/trace/events/erofs.h
@@ -6,6 +6,9 @@
#define _TRACE_EROFS_H
#include <linux/tracepoint.h>
+#include <linux/fs.h>
+
+struct erofs_map_blocks;
#define show_dev(dev) MAJOR(dev), MINOR(dev)
#define show_dev_nid(entry) show_dev(entry->dev), entry->nid
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH RESEND] erofs: fix compile warnings when moving out include/trace/events/erofs.h
2019-08-26 13:26 ` [PATCH RESEND] " Gao Xiang
@ 2019-08-26 13:51 ` Chao Yu
2019-08-26 14:26 ` Gao Xiang
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2019-08-26 13:51 UTC (permalink / raw)
To: Gao Xiang, Chao Yu, Greg Kroah-Hartman, devel
Cc: LKML, linux-erofs, Stephen Rothwell, Miao Xie, weidu.du, Fang Wei
On 2019-8-26 21:26, Gao Xiang wrote:
> As Stephon reported [1], many compile warnings are raised when
> moving out include/trace/events/erofs.h:
>
> In file included from include/trace/events/erofs.h:8,
> from <command-line>:
> include/trace/events/erofs.h:28:37: warning: 'struct dentry' declared inside parameter list will not be visible outside of this definition or declaration
> TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
> ^~~~~~
> include/linux/tracepoint.h:233:34: note: in definition of macro '__DECLARE_TRACE'
> static inline void trace_##name(proto) \
> ^~~~~
> include/linux/tracepoint.h:396:24: note: in expansion of macro 'PARAMS'
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
> ^~~~~~
> include/linux/tracepoint.h:532:2: note: in expansion of macro 'DECLARE_TRACE'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~~~~~~~~
> include/linux/tracepoint.h:532:22: note: in expansion of macro 'PARAMS'
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^~~~~~
> include/trace/events/erofs.h:26:1: note: in expansion of macro 'TRACE_EVENT'
> TRACE_EVENT(erofs_lookup,
> ^~~~~~~~~~~
> include/trace/events/erofs.h:28:2: note: in expansion of macro 'TP_PROTO'
> TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
> ^~~~~~~~
>
> That makes me very confused since most original EROFS tracepoint code
> was taken from f2fs, and finally I found
>
> commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")
>
> It seems these warnings are generated from KERNEL_HEADER_TEST feature and
> ext4/f2fs tracepoint files were in blacklist.
For f2fs.h, it will be only used by f2fs module, I guess it's okay to let it
stay in blacklist...
>
> Anyway, let's fix these issues for KERNEL_HEADER_TEST feature instead
> of adding to blacklist...
>
> [1] https://lore.kernel.org/lkml/20190826162432.11100665@canb.auug.org.au/
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH RESEND] erofs: fix compile warnings when moving out include/trace/events/erofs.h
2019-08-26 13:51 ` Chao Yu
@ 2019-08-26 14:26 ` Gao Xiang
0 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2019-08-26 14:26 UTC (permalink / raw)
To: Greg Kroah-Hartman, Chao Yu
Cc: Gao Xiang, Chao Yu, devel, Stephen Rothwell, linux-erofs, LKML,
weidu.du, Fang Wei, Miao Xie
Hi Chao,
On Mon, Aug 26, 2019 at 09:51:35PM +0800, Chao Yu wrote:
> On 2019-8-26 21:26, Gao Xiang wrote:
[]
> > TRACE_EVENT(erofs_lookup,
> > ^~~~~~~~~~~
> > include/trace/events/erofs.h:28:2: note: in expansion of macro 'TP_PROTO'
> > TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
> > ^~~~~~~~
> >
> > That makes me very confused since most original EROFS tracepoint code
> > was taken from f2fs, and finally I found
> >
> > commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")
> >
> > It seems these warnings are generated from KERNEL_HEADER_TEST feature and
> > ext4/f2fs tracepoint files were in blacklist.
>
> For f2fs.h, it will be only used by f2fs module, I guess it's okay to let it
> stay in blacklist...
Yes, it depends on you f2fs folks selection...
Anyway, this file is a new file, therefore it should be better not to add to
blacklist...
>
> >
> > Anyway, let's fix these issues for KERNEL_HEADER_TEST feature instead
> > of adding to blacklist...
> >
> > [1] https://lore.kernel.org/lkml/20190826162432.11100665@canb.auug.org.au/
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
>
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks for reviewing :)
Thanks,
Gao Xiang
>
> Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-26 14:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26 13:22 [PATCH] erofs: fix compile warnings when moving out include/trace/events/erofs.h Gao Xiang
2019-08-26 13:26 ` [PATCH RESEND] " Gao Xiang
2019-08-26 13:51 ` Chao Yu
2019-08-26 14:26 ` Gao Xiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®