[linux-next:master 8024/8887] include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list

3 messages, 2 authors, 2016-03-01 · open the first message on its own page

[linux-next:master 8024/8887] include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list

From: kbuild test robot <hidden>
Date: 2016-03-01 13:05:01

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6fa6381cb550382528be4392e210be69928f0bcd
commit: e06fac8c4a90db00a27c5f1514e8936774b17f2d [8024/8887] mm/page_ref: add tracepoint to track down page reference manipulation
config: xtensa-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e06fac8c4a90db00a27c5f1514e8936774b17f2d
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   In file included from mm/debug_page_ref.c:1:0:
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:186:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^
   include/linux/tracepoint.h:349:25: note: in expansion of macro 'PARAMS'
      __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
                            ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: its scope is only this definition or declaration, which is probably not what you want
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:186:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^
   include/linux/tracepoint.h:349:25: note: in expansion of macro 'PARAMS'
      __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
                            ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:158:44: note: in definition of macro '__DECLARE_TRACE_RCU'
     static inline void trace_##name##_rcuidle(proto)  \
                                               ^
   include/linux/tracepoint.h:199:28: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),  \
                               ^
   include/linux/tracepoint.h:349:3: note: in expansion of macro '__DECLARE_TRACE'
      __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
      ^
   include/linux/tracepoint.h:349:25: note: in expansion of macro 'PARAMS'
      __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
                            ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:202:38: note: in definition of macro '__DECLARE_TRACE'
     register_trace_##name(void (*probe)(data_proto), void *data) \
                                         ^
   include/linux/tracepoint.h:350:5: note: in expansion of macro 'PARAMS'
        PARAMS(void *__data, proto),  \
        ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:208:43: note: in definition of macro '__DECLARE_TRACE'
     register_trace_prio_##name(void (*probe)(data_proto), void *data,\
                                              ^
   include/linux/tracepoint.h:350:5: note: in expansion of macro 'PARAMS'
        PARAMS(void *__data, proto),  \
        ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:215:40: note: in definition of macro '__DECLARE_TRACE'
     unregister_trace_##name(void (*probe)(data_proto), void *data) \
                                           ^
   include/linux/tracepoint.h:350:5: note: in expansion of macro 'PARAMS'
        PARAMS(void *__data, proto),  \
        ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^
quoted
include/trace/events/page_ref.h:47:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(struct page *page, int v),
     ^
quoted
include/trace/events/page_ref.h:47:18: warning: 'struct page' declared inside parameter list
     TP_PROTO(struct page *page, int v),
                     ^
   include/linux/tracepoint.h:221:46: note: in definition of macro '__DECLARE_TRACE'
     check_trace_callback_type_##name(void (*cb)(data_proto)) \
                                                 ^
   include/linux/tracepoint.h:350:5: note: in expansion of macro 'PARAMS'
        PARAMS(void *__data, proto),  \
        ^
   include/linux/tracepoint.h:472:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:472:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
quoted
include/trace/events/page_ref.h:45:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    ^

vim +47 include/trace/events/page_ref.h

    39			show_page_flags(__entry->flags & ((1UL << NR_PAGEFLAGS) - 1)),
    40			__entry->count,
    41			__entry->mapcount, __entry->mapping, __entry->mt,
    42			__entry->val)
    43	);
    44	
  > 45	DEFINE_EVENT(page_ref_mod_template, page_ref_set,
    46	
  > 47		TP_PROTO(struct page *page, int v),
    48	
    49		TP_ARGS(page, v)
    50	);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[PATCH] mm/page_ref: fix build failure for xtensa

From: <hidden>
Date: 2016-03-01 13:43:26

From: Joonsoo Kim <redacted>

This patch includes struct page definition to fix build failure on xtensa.

Signed-off-by: Joonsoo Kim <redacted>
---
 mm/debug_page_ref.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/mm/debug_page_ref.c b/mm/debug_page_ref.c
index 87e60e8..1aef3d5 100644
--- a/mm/debug_page_ref.c
+++ b/mm/debug_page_ref.c
@@ -1,3 +1,4 @@
+#include <linux/mm_types.h>
 #include <linux/tracepoint.h>
 
 #define CREATE_TRACE_POINTS
-- 
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

Re: [PATCH] mm/page_ref: fix build failure for xtensa

From: Joonsoo Kim <hidden>
Date: 2016-03-01 13:49:35

2016-03-01 22:43 GMT+09:00  [off-list ref]:
quoted hunk
From: Joonsoo Kim <redacted>

This patch includes struct page definition to fix build failure on xtensa.

Signed-off-by: Joonsoo Kim <redacted>
---
 mm/debug_page_ref.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/mm/debug_page_ref.c b/mm/debug_page_ref.c
index 87e60e8..1aef3d5 100644
--- a/mm/debug_page_ref.c
+++ b/mm/debug_page_ref.c
@@ -1,3 +1,4 @@
+#include <linux/mm_types.h>
 #include <linux/tracepoint.h>

 #define CREATE_TRACE_POINTS
Seems like I used wrong message-id for in-reply-to.

Andrew, please fold this patch into
mm-page_ref-add-tracepoint-to-track-down-page-reference-manipulation.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help