Hi Phil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url:
https://github.com/0day-ci/linux/commits/Phil-Sutter/netfilter-nf_tables-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: i386-randconfig-a012
(
https://download.01.org/0day-ci/archive/20220216/202202160311.x0sGfQ8f-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/49585d5ef2f413b0bef6e50315e6b6c5b...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Phil-Sutter/netfilter-nf_tables-Reject-tables-of-unsupported-family/20220215-200808
git checkout 49585d5ef2f413b0bef6e50315e6b6c5bc85e475
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/netfilter/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/netfilter/nf_tables_api.c: In function 'nft_supported_family':
> net/netfilter/nf_tables_api.c:1096:10: warning: statement will
never be executed [-Wswitch-unreachable]
1096 | return true;
| ^~~~
vim +1096 net/netfilter/nf_tables_api.c
1074
1075 static bool nft_supported_family(int family)
1076 {
1077 switch (family) {
1078 #ifdef CONFIG_NF_TABLES_INET
1079 case NFPROTO_INET:
1080 #endif
1081 #ifdef CONFIG_NF_TABLES_IPV4
1082 case NFPROTO_IPV4:
1083 #endif
1084 #ifdef CONFIG_NF_TABLES_ARP
1085 case NFPROTO_ARP:
1086 #endif
1087 #ifdef CONFIG_NF_TABLES_NETDEV
1088 case NFPROTO_NETDEV:
1089 #endif
1090 #if IS_ENABLED(CONIFG_NF_TABLES_BRIDGE)
1091 case NFPROTO_BRIDGE:
1092 #endif
1093 #ifdef CONFIG_NF_TABLES_IPV6
1094 case NFPROTO_IPV6:
1095 #endif
1096 return true;
1097 default:
1098 return false;
1099 }
1100 }
1101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org