linux-next: build warnings after merge of the net-next tree

3 messages, 3 authors, 2015-06-20 · open the first message on its own page

linux-next: build warnings after merge of the net-next tree

From: Stephen Rothwell <hidden>
Date: 2015-06-20 13:13:05

Hi all,

After merging the net-next tree, today's linux-next build (i386 defconfig)
produced these warnings:

In file included from include/net/netfilter/nf_conntrack_tuple.h:13:0,
                 from include/linux/netfilter/nf_conntrack_dccp.h:28,
                 from include/net/netfilter/nf_conntrack.h:22,
                 from net/netfilter/nf_conntrack_core.c:37:
include/linux/netfilter/x_tables.h: In function 'xt_percpu_counter_alloc':
include/linux/netfilter/x_tables.h:373:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   return (__force u64) res;
          ^
include/linux/netfilter/x_tables.h: In function 'xt_percpu_counter_free':
include/linux/netfilter/x_tables.h:381:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   free_percpu((void __percpu *) pcnt);
               ^
In file included from include/asm-generic/percpu.h:6:0,
                 from arch/x86/include/asm/percpu.h:551,
                 from arch/x86/include/asm/preempt.h:5,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from include/linux/mm_types.h:8,
                 from include/linux/kmemcheck.h:4,
                 from include/linux/skbuff.h:18,
                 from include/linux/netfilter.h:5,
                 from net/netfilter/nf_conntrack_core.c:16:
include/linux/netfilter/x_tables.h: In function 'xt_get_this_cpu_counter':
include/linux/netfilter/x_tables.h:388:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   return this_cpu_ptr((void __percpu *) cnt->pcnt);
                       ^
include/linux/percpu-defs.h:206:47: note: in definition of macro '__verify_pcpu_ptr'
  const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                               ^
include/linux/percpu-defs.h:239:27: note: in expansion of macro 'raw_cpu_ptr'
 #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                           ^
include/linux/netfilter/x_tables.h:388:10: note: in expansion of macro 'this_cpu_ptr'
   return this_cpu_ptr((void __percpu *) cnt->pcnt);
          ^

and many more.

Introduced by commit:

  71ae0dff02d7 ("netfilter: xtables: use percpu rule counters")

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

Re: linux-next: build warnings after merge of the net-next tree

From: Florian Westphal <fw@strlen.de>
Date: 2015-06-20 17:40:20

Stephen Rothwell [off-list ref] wrote:
After merging the net-next tree, today's linux-next build (i386 defconfig)
produced these warnings:

In file included from include/net/netfilter/nf_conntrack_tuple.h:13:0,
                 from include/linux/netfilter/nf_conntrack_dccp.h:28,
                 from include/net/netfilter/nf_conntrack.h:22,
                 from net/netfilter/nf_conntrack_core.c:37:
include/linux/netfilter/x_tables.h: In function 'xt_percpu_counter_alloc':
include/linux/netfilter/x_tables.h:373:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   return (__force u64) res;
          ^
include/linux/netfilter/x_tables.h: In function 'xt_percpu_counter_free':
include/linux/netfilter/x_tables.h:381:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   free_percpu((void __percpu *) pcnt);
               ^
In file included from include/asm-generic/percpu.h:6:0,
                 from arch/x86/include/asm/percpu.h:551,
                 from arch/x86/include/asm/preempt.h:5,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from include/linux/mm_types.h:8,
                 from include/linux/kmemcheck.h:4,
                 from include/linux/skbuff.h:18,
                 from include/linux/netfilter.h:5,
                 from net/netfilter/nf_conntrack_core.c:16:
include/linux/netfilter/x_tables.h: In function 'xt_get_this_cpu_counter':
include/linux/netfilter/x_tables.h:388:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   return this_cpu_ptr((void __percpu *) cnt->pcnt);
                       ^
include/linux/percpu-defs.h:206:47: note: in definition of macro '__verify_pcpu_ptr'
  const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                               ^
include/linux/percpu-defs.h:239:27: note: in expansion of macro 'raw_cpu_ptr'
 #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                           ^
include/linux/netfilter/x_tables.h:388:10: note: in expansion of macro 'this_cpu_ptr'
   return this_cpu_ptr((void __percpu *) cnt->pcnt);
          ^

and many more.

Introduced by commit:

  71ae0dff02d7 ("netfilter: xtables: use percpu rule counters")
Yes, sorry about this, should be fixed by dcb8f5c8139ef945cdfd
("netfilter: xtables: fix warnings on 32bit platforms").

Thanks,
Florian

Re: linux-next: build warnings after merge of the net-next tree

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2015-06-20 18:26:16

On Sat, Jun 20, 2015 at 07:40:03PM +0200, Florian Westphal wrote:
[...]
quoted
Introduced by commit:

  71ae0dff02d7 ("netfilter: xtables: use percpu rule counters")
Yes, sorry about this, should be fixed by dcb8f5c8139ef945cdfd
("netfilter: xtables: fix warnings on 32bit platforms").
There's a pending pull to address this fallout:

http://patchwork.ozlabs.org/patch/486819/

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help