* [nf-next:master 14/14] net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true'
@ 2021-05-29 5:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-29 5:28 UTC (permalink / raw)
To: Florian Westphal
Cc: kbuild-all, clang-built-linux, netfilter-devel, coreteam,
Pablo Neira Ayuso
[-- Attachment #1: Type: text/plain, Size: 2666 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head: 62cd0c1853667efb2b929682dcefe4cbf00502a4
commit: 62cd0c1853667efb2b929682dcefe4cbf00502a4 [14/14] netfilter: nf_tables: remove xt_action_param from nft_pktinfo
config: x86_64-randconfig-a003-20210529 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=62cd0c1853667efb2b929682dcefe4cbf00502a4
git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
git fetch --no-tags nf-next master
git checkout 62cd0c1853667efb2b929682dcefe4cbf00502a4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (&xt.hotdrop)
~~ ~~~^~~~~~~
1 warning generated.
vim +113 net/netfilter/nft_compat.c
98
99 static void nft_target_eval_bridge(const struct nft_expr *expr,
100 struct nft_regs *regs,
101 const struct nft_pktinfo *pkt)
102 {
103 void *info = nft_expr_priv(expr);
104 struct xt_target *target = expr->ops->data;
105 struct sk_buff *skb = pkt->skb;
106 struct xt_action_param xt;
107 int ret;
108
109 nft_compat_set_par(&xt, pkt, target, info);
110
111 ret = target->target(skb, &xt);
112
> 113 if (&xt.hotdrop)
114 ret = NF_DROP;
115
116 switch (ret) {
117 case EBT_ACCEPT:
118 regs->verdict.code = NF_ACCEPT;
119 break;
120 case EBT_DROP:
121 regs->verdict.code = NF_DROP;
122 break;
123 case EBT_CONTINUE:
124 regs->verdict.code = NFT_CONTINUE;
125 break;
126 case EBT_RETURN:
127 regs->verdict.code = NFT_RETURN;
128 break;
129 default:
130 regs->verdict.code = ret;
131 break;
132 }
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39180 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-29 5:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29 5:28 [nf-next:master 14/14] net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true' kernel test robot
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).