Hi Florian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url:
https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-ctnet...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/netfilter/nf_conntrack_netlink.c: In function 'ctnetlink_dump_extinfo':
> net/netfilter/nf_conntrack_netlink.c:520:37: warning: passing
argument 2 of 'ctnetlink_dump_ct_seq_adj' discards 'const' qualifier from
pointer target type [-Wdiscarded-qualifiers]
ctnetlink_dump_ct_seq_adj(skb,
ct) < 0 ||
^~
net/netfilter/nf_conntrack_netlink.c:438:12: note: expected 'struct nf_conn *'
but argument is of type 'const struct nf_conn *'
static int ctnetlink_dump_ct_seq_adj(struct sk_buff *skb, struct nf_conn *ct)
^~~~~~~~~~~~~~~~~~~~~~~~~
> net/netfilter/nf_conntrack_netlink.c:521:38: warning: passing
argument 2 of 'ctnetlink_dump_ct_synproxy' discards 'const' qualifier from
pointer target type [-Wdiscarded-qualifiers]
ctnetlink_dump_ct_synproxy(skb, ct) < 0)
^~
net/netfilter/nf_conntrack_netlink.c:462:12: note: expected 'struct nf_conn *'
but argument is of type 'const struct nf_conn *'
static int ctnetlink_dump_ct_synproxy(struct sk_buff *skb, struct nf_conn *ct)
^~~~~~~~~~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_netlink.c: In function 'ctnetlink_dump_info':
> net/netfilter/nf_conntrack_netlink.c:542:1: warning: control
reaches end of non-void function [-Wreturn-type]
}
^
vim +520 net/netfilter/nf_conntrack_netlink.c
508
509 /* all these functions access ct->ext. Caller must either hold a reference
510 * on ct or prevent its deletion by holding either the bucket spinlock or
511 * pcpu dying list lock.
512 */
513 static int ctnetlink_dump_extinfo(struct sk_buff *skb,
514 const struct nf_conn *ct, u32 type)
515 {
516 if (ctnetlink_dump_acct(skb, ct, type) < 0 ||
517 ctnetlink_dump_timestamp(skb, ct) < 0 ||
518 ctnetlink_dump_helpinfo(skb, ct) < 0 ||
519 ctnetlink_dump_labels(skb, ct) < 0 ||
520 ctnetlink_dump_ct_seq_adj(skb, ct) < 0 ||
521 ctnetlink_dump_ct_synproxy(skb, ct) < 0)
522 return -1;
523
524 return 0;
525 }
526
527 static int ctnetlink_dump_info(struct sk_buff *skb, struct nf_conn *ct)
528 {
529 if (ctnetlink_dump_status(skb, ct) < 0 ||
530 ctnetlink_dump_mark(skb, ct) < 0 ||
531 ctnetlink_dump_secctx(skb, ct) < 0 ||
532 ctnetlink_dump_id(skb, ct) < 0 ||
533 ctnetlink_dump_use(skb, ct) < 0 ||
534 ctnetlink_dump_master(skb, ct) < 0)
535 return -1;
536
537 if (!test_bit(IPS_OFFLOAD_BIT, &ct->status) &&
538 (ctnetlink_dump_timeout(skb, ct) < 0 ||
539 ctnetlink_dump_protoinfo(skb, ct) < 0))
540
541 return 0;
542 }
543
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation