android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Geert Uytterhoeven 863acae0b8 neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section
commit 2915240eddba96b37de4c7e9a3d0ac6f9548454b upstream.

When CONFIG_IPV6=n, and building with W=1:

    In file included from include/trace/define_trace.h:102,
		     from include/trace/events/neigh.h:255,
		     from net/core/net-traces.c:51:
    include/trace/events/neigh.h: In function ‘trace_event_raw_event_neigh_create’:
    include/trace/events/neigh.h:42:34: error: variable ‘pin6’ set but not used [-Werror=unused-but-set-variable]
       42 |                 struct in6_addr *pin6;
	  |                                  ^~~~
    include/trace/trace_events.h:402:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’
      402 |         { assign; }                                                     \
	  |           ^~~~~~
    include/trace/trace_events.h:44:30: note: in expansion of macro ‘PARAMS’
       44 |                              PARAMS(assign),                   \
	  |                              ^~~~~~
    include/trace/events/neigh.h:23:1: note: in expansion of macro ‘TRACE_EVENT’
       23 | TRACE_EVENT(neigh_create,
	  | ^~~~~~~~~~~
    include/trace/events/neigh.h:41:9: note: in expansion of macro ‘TP_fast_assign’
       41 |         TP_fast_assign(
	  |         ^~~~~~~~~~~~~~
    In file included from include/trace/define_trace.h:103,
		     from include/trace/events/neigh.h:255,
		     from net/core/net-traces.c:51:
    include/trace/events/neigh.h: In function ‘perf_trace_neigh_create’:
    include/trace/events/neigh.h:42:34: error: variable ‘pin6’ set but not used [-Werror=unused-but-set-variable]
       42 |                 struct in6_addr *pin6;
	  |                                  ^~~~
    include/trace/perf.h:51:11: note: in definition of macro ‘DECLARE_EVENT_CLASS’
       51 |         { assign; }                                                     \
	  |           ^~~~~~
    include/trace/trace_events.h:44:30: note: in expansion of macro ‘PARAMS’
       44 |                              PARAMS(assign),                   \
	  |                              ^~~~~~
    include/trace/events/neigh.h:23:1: note: in expansion of macro ‘TRACE_EVENT’
       23 | TRACE_EVENT(neigh_create,
	  | ^~~~~~~~~~~
    include/trace/events/neigh.h:41:9: note: in expansion of macro ‘TP_fast_assign’
       41 |         TP_fast_assign(
	  |         ^~~~~~~~~~~~~~

Indeed, the variable pin6 is declared and initialized unconditionally,
while it is only used and needlessly re-initialized when support for
IPv6 is enabled.

Fix this by dropping the unused variable initialization, and moving the
variable declaration inside the existing section protected by a check
for CONFIG_IPV6.

Fixes: fc651001d2 ("neighbor: Add tracepoint to __neigh_create")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:53:22 +02:00
..
acpi
asm-generic word-at-a-time: use the same return type for has_zero regardless of endianness 2023-08-11 11:53:54 +02:00
clocksource
crypto
drm drm/display/dp: Fix the DP DSC Receiver cap size 2023-08-30 16:27:26 +02:00
dt-bindings
keys
kvm
linux dev_forward_skb: do not scrub skb mark within the same name space 2023-10-25 11:53:20 +02:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-30 16:27:10 +02:00
misc
net tcp: fix excessive TLP and RACK timeouts from HZ rounding 2023-10-25 11:53:21 +02:00
pcmcia
ras
rdma
scsi scsi: core: Use 32-bit hostnum in scsi_host_lookup() 2023-09-23 10:59:51 +02:00
soc firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2023-05-17 11:35:52 +02:00
sound ALSA: pcm: Set per-card upper limit of PCM buffer allocations 2023-08-30 16:27:22 +02:00
target
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2023-10-25 11:53:22 +02:00
uapi bpf: Clarify error expectations from bpf_clone_redirect 2023-10-10 21:46:40 +02:00
vdso
video
xen dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00