From c951291df9941c70683cb1bbdb1c950724cc8b91 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 6 Oct 2023 12:15:53 +0200 Subject: [PATCH] generic: 6.1: fix compilation warning for CONFIG_PROC_STRIPPED Fix compilation warning for CONFIG_PROC_STRIPPED for kernel 6.1. Fix compilation warning: make[4]: Leaving directory '/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-ath79_tiny/linux-6.1.55' net/ipv4/inet_timewait_sock.c: In function '__inet_twsk_schedule': net/ipv4/inet_timewait_sock.c:272:22: error: unused variable 'kill' [-Werror=unused-variable] 272 | bool kill = timeo <= 4*HZ; | ^~~~ cc1: all warnings being treated as errors Signed-off-by: Christian Marangi --- target/linux/generic/hack-6.1/902-debloat_proc.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index 23de30f4923a..33b408a476f6 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -406,3 +406,14 @@ Signed-off-by: Felix Fietkau return register_pernet_subsys(&ip_rt_proc_ops); } +--- a/net/ipv4/inet_timewait_sock.c ++++ b/net/ipv4/inet_timewait_sock.c +@@ -269,7 +269,7 @@ void __inet_twsk_schedule(struct inet_ti + */ + + if (!rearm) { +- bool kill = timeo <= 4*HZ; ++ bool __maybe_unused kill = timeo <= 4*HZ; + + __NET_INC_STATS(twsk_net(tw), kill ? LINUX_MIB_TIMEWAITKILLED : + LINUX_MIB_TIMEWAITED); -- 2.30.2