net/netfilter/ipvs/ip_vs_core.c:1666:15: warning: variable 'outer_proto' set but not used

kernel test robot
2023-10-06T13:16:42Z

head: b78b18fb8ee19f7a05f20c3abc865b3bfe182884
commit: 73348fed35d023e998cbd303a28400f2c0ec30a3 ipvs: optimize tunnel dumps for icmp errors
date: 3 years, 6 months ago
config: s390-defconfig (https://download.01.org/0day-ci/archive/20231006/202310062122.XECDXLR6-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231006/202310062122.XECDXLR6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310062122.XECDXLR6-lkp@intel.com/

All warnings (new ones prefixed by >>):

| ^~~~~~~~~~~~
include/net/sch_generic.h:883:9: note: in expansion of macro 'this_cpu_inc'
883 | this_cpu_inc(sch->cpu_qstats->qlen);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_qlen_dec':
arch/s390/include/asm/percpu.h:74:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:25: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:41: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:519:41: note: in expansion of macro 'this_cpu_add'
519 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:521:41: note: in expansion of macro 'this_cpu_sub'
521 | #define this_cpu_dec(pcp) this_cpu_sub(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:888:9: note: in expansion of macro 'this_cpu_dec'
888 | this_cpu_dec(sch->cpu_qstats->qlen);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_requeues_inc':
arch/s390/include/asm/percpu.h:74:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:25: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:41: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:41: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:893:9: note: in expansion of macro 'this_cpu_inc'
893 | this_cpu_inc(sch->cpu_qstats->requeues);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:25: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:41: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:41: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:918:9: note: in expansion of macro 'this_cpu_inc'
918 | this_cpu_inc(sch->cpu_qstats->drops);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'qdisc_update_stats_at_enqueue':
arch/s390/include/asm/percpu.h:74:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:25: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:41: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/net/sch_generic.h:1117:17: note: in expansion of macro 'this_cpu_add'
1117 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'mini_qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:28: warning: comparison is always true due to limited range of data type [-Wtype-limits]
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { \
| ^
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:25: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ^~~~
include/linux/percpu-defs.h:509:41: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:41: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1286:9: note: in expansion of macro 'this_cpu_inc'
1286 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
net/netfilter/ipvs/ip_vs_core.c: In function 'ip_vs_in_icmp':
>> net/netfilter/ipvs/ip_vs_core.c:1666:15: warning: variable 'outer_proto' set but not used [-Wunused-but-set-variable]
1666 | char *outer_proto;
| ^~~~~~~~~~~
In file included from arch/s390/include/asm/bitops.h:39,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12:
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_conn_stats' at net/netfilter/ipvs/ip_vs_core.c:211:2,
inlined from 'ip_vs_sched_persist' at net/netfilter/ipvs/ip_vs_core.c:426:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \
| ^~~
arch/s390/include/asm/atomic_ops.h:27:9: note: in expansion of macro '__ATOMIC_OP'
27 | __ATOMIC_OP(op_name, op_type, op_string, "\n") \
| ^~~~~~~~~~~
arch/s390/include/asm/atomic_ops.h:30:1: note: in expansion of macro '__ATOMIC_OPS'
30 | __ATOMIC_OPS(__atomic_add, int, "laa")
| ^~~~~~~~~~~~
In function 'ip_vs_sched_persist':
cc1: note: source object is likely at address zero
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_conn_stats' at net/netfilter/ipvs/ip_vs_core.c:211:2,
inlined from 'ip_vs_sched_persist' at net/netfilter/ipvs/ip_vs_core.c:426:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \
| ^~~
arch/s390/include/asm/atomic_ops.h:27:9: note: in expansion of macro '__ATOMIC_OP'
27 | __ATOMIC_OP(op_name, op_type, op_string, "\n") \
| ^~~~~~~~~~~
arch/s390/include/asm/atomic_ops.h:30:1: note: in expansion of macro '__ATOMIC_OPS'
30 | __ATOMIC_OPS(__atomic_add, int, "laa")
| ^~~~~~~~~~~~
In function 'ip_vs_sched_persist':
cc1: note: source object is likely at address zero
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_conn_stats' at net/netfilter/ipvs/ip_vs_core.c:211:2,
inlined from 'ip_vs_new_conn_out' at net/netfilter/ipvs/ip_vs_core.c:1220:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \
| ^~~
arch/s390/include/asm/atomic_ops.h:27:9: note: in expansion of macro '__ATOMIC_OP'
27 | __ATOMIC_OP(op_name, op_type, op_string, "\n") \
| ^~~~~~~~~~~
arch/s390/include/asm/atomic_ops.h:30:1: note: in expansion of macro '__ATOMIC_OPS'
30 | __ATOMIC_OPS(__atomic_add, int, "laa")
| ^~~~~~~~~~~~
In function 'ip_vs_new_conn_out':
cc1: note: source object is likely at address zero
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_conn_stats' at net/netfilter/ipvs/ip_vs_core.c:211:2,
inlined from 'ip_vs_new_conn_out' at net/netfilter/ipvs/ip_vs_core.c:1220:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \
| ^~~
arch/s390/include/asm/atomic_ops.h:27:9: note: in expansion of macro '__ATOMIC_OP'
27 | __ATOMIC_OP(op_name, op_type, op_string, "\n") \
| ^~~~~~~~~~~
arch/s390/include/asm/atomic_ops.h:30:1: note: in expansion of macro '__ATOMIC_OPS'
30 | __ATOMIC_OPS(__atomic_add, int, "laa")
| ^~~~~~~~~~~~
In function 'ip_vs_new_conn_out':
cc1: note: source object is likely at address zero
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_out_stats' at net/netfilter/ipvs/ip_vs_core.c:179:3,
inlined from 'handle_response.constprop' at net/netfilter/ipvs/ip_vs_core.c:1325:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \
| ^~~
arch/s390/include/asm/atomic_ops.h:27:9: note: in expansion of macro '__ATOMIC_OP'
27 | __ATOMIC_OP(op_name, op_type, op_string, "\n") \
| ^~~~~~~~~~~
arch/s390/include/asm/atomic_ops.h:30:1: note: in expansion of macro '__ATOMIC_OPS'
30 | __ATOMIC_OPS(__atomic_add, int, "laa")
| ^~~~~~~~~~~~
In function 'handle_response.constprop':
cc1: note: source object is likely at address zero
In function '__atomic_add',
inlined from '__preempt_count_add' at arch/s390/include/asm/preempt.h:58:3,
inlined from '__local_bh_disable_ip' at include/linux/bottom_half.h:12:2,
inlined from 'local_bh_disable' at include/linux/bottom_half.h:19:2,
inlined from 'ip_vs_out_stats' at net/netfilter/ipvs/ip_vs_core.c:179:3,
inlined from 'handle_response.constprop' at net/netfilter/ipvs/ip_vs_core.c:1325:2:
arch/s390/include/asm/atomic_ops.h:18:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
18 | asm volatile( \