From de828e39b2534f79659fb2a580007a0e56576ea7 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Wed, 28 May 2025 21:06:50 -0400 Subject: [PATCH] treewide: Additional fixes for kernel 6.12 + GCC 14.3+ Fixes for: incompatible-pointer-types: (nss gre) int-conversion And ignore warnings for: empty-body Signed-off-by: Sean Khan --- qca-nss-clients/Makefile | 7 ++-- .../0031-kernel-6.12-support.patch | 36 ++++++++++++++++--- .../patches/0031-kernel-6.12-support.patch | 36 ++++++++++++++++--- qca-nss-drv/Makefile | 4 +-- 4 files changed, 70 insertions(+), 13 deletions(-) diff --git a/qca-nss-clients/Makefile b/qca-nss-clients/Makefile index 714ce86..8dc0dc8 100644 --- a/qca-nss-clients/Makefile +++ b/qca-nss-clients/Makefile @@ -810,9 +810,10 @@ ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-wifi-meshmgr),) NSS_CLIENTS_MAKE_OPTS+=wifi-meshmgr=y endif -EXTRA_CFLAGS+= -Wno-incompatible-pointer-types \ - -Wno-missing-prototypes -Wno-int-conversion \ - -Wno-missing-declarations +EXTRA_CFLAGS+= \ + -Wno-missing-prototypes \ + -Wno-missing-declarations \ + -Wno-empty-body define Build/Compile +$(MAKE) -C "$(LINUX_DIR)" $(strip $(NSS_CLIENTS_MAKE_OPTS)) \ diff --git a/qca-nss-clients/patches-11.4/0031-kernel-6.12-support.patch b/qca-nss-clients/patches-11.4/0031-kernel-6.12-support.patch index 1dd6888..9028425 100644 --- a/qca-nss-clients/patches-11.4/0031-kernel-6.12-support.patch +++ b/qca-nss-clients/patches-11.4/0031-kernel-6.12-support.patch @@ -158,15 +158,29 @@ if (IS_ERR(rt)) { nss_connmgr_gre_warning("route look up failed for %pI4\n", &raddr); return GRE_ERR_RADDR_ROUTE_LOOKUP; -@@ -210,7 +218,7 @@ int nss_connmgr_gre_v4_set_config(struct +@@ -208,9 +216,9 @@ int nss_connmgr_gre_v4_set_config(struct + t->parms.o_key = cfg->okey; + } - nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); +- nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); ++ nss_connmgr_gre_set_gre_flags(cfg, (uint16_t *)&t->parms.o_flags, (uint16_t *)&t->parms.i_flags); - strlcpy(t->parms.name, dev->name, IFNAMSIZ); + strscpy(t->parms.name, dev->name, IFNAMSIZ); t->dev = dev; return GRE_SUCCESS; } +@@ -322,8 +330,8 @@ int nss_connmgr_gre_v4_get_config(struct + memcpy(cmsg->src_ip, &src_ip, 4); + memcpy(cmsg->dest_ip, &dest_ip, 4); + +- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags, +- t->parms.i_flags, ++ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags, ++ *t->parms.i_flags, + iphdr->tos, iphdr->ttl, + iphdr->frag_off); + --- a/ipsecmgr/v1.0/nss_ipsecmgr.c +++ b/ipsecmgr/v1.0/nss_ipsecmgr.c @@ -526,7 +526,11 @@ static struct net_device *nss_ipsecmgr_t @@ -771,15 +785,29 @@ } --- a/gre/nss_connmgr_gre_v6.c +++ b/gre/nss_connmgr_gre_v6.c -@@ -324,7 +324,7 @@ int nss_connmgr_gre_v6_set_config(struct +@@ -322,9 +322,9 @@ int nss_connmgr_gre_v6_set_config(struct + t->parms.o_key = cfg->okey; + } - nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); +- nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); ++ nss_connmgr_gre_set_gre_flags(cfg, (uint16_t *)&t->parms.o_flags, (uint16_t *)&t->parms.i_flags); - strlcpy(t->parms.name, dev->name, IFNAMSIZ); + strscpy(t->parms.name, dev->name, IFNAMSIZ); t->dev = dev; return GRE_SUCCESS; } +@@ -359,8 +359,8 @@ int nss_connmgr_gre_v6_get_config(struct + /* + * IPv6 outer tos field is always inherited from inner IP header. + */ +- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags, +- t->parms.i_flags, ++ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags, ++ *t->parms.i_flags, + t->parms.flowinfo, + t->parms.hop_limit, 0); + --- /dev/null +++ b/compat.h @@ -0,0 +1,15 @@ diff --git a/qca-nss-clients/patches/0031-kernel-6.12-support.patch b/qca-nss-clients/patches/0031-kernel-6.12-support.patch index 6ed21b8..23d8d7b 100644 --- a/qca-nss-clients/patches/0031-kernel-6.12-support.patch +++ b/qca-nss-clients/patches/0031-kernel-6.12-support.patch @@ -158,15 +158,29 @@ if (IS_ERR(rt)) { nss_connmgr_gre_warning("route look up failed for %pI4\n", &raddr); return GRE_ERR_RADDR_ROUTE_LOOKUP; -@@ -218,7 +226,7 @@ int nss_connmgr_gre_v4_set_config(struct +@@ -208,9 +216,9 @@ int nss_connmgr_gre_v4_set_config(struct + t->parms.o_key = cfg->okey; + } - nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); +- nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); ++ nss_connmgr_gre_set_gre_flags(cfg, (uint16_t *)&t->parms.o_flags, (uint16_t *)&t->parms.i_flags); - strlcpy(t->parms.name, dev->name, IFNAMSIZ); + strscpy(t->parms.name, dev->name, IFNAMSIZ); t->dev = dev; return GRE_SUCCESS; } +@@ -322,8 +330,8 @@ int nss_connmgr_gre_v4_get_config(struct + memcpy(cmsg->src_ip, &src_ip, 4); + memcpy(cmsg->dest_ip, &dest_ip, 4); + +- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags, +- t->parms.i_flags, ++ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags, ++ *t->parms.i_flags, + iphdr->tos, iphdr->ttl, + iphdr->frag_off); + --- a/ipsecmgr/v1.0/nss_ipsecmgr.c +++ b/ipsecmgr/v1.0/nss_ipsecmgr.c @@ -526,7 +526,11 @@ static struct net_device *nss_ipsecmgr_t @@ -771,15 +785,29 @@ } --- a/gre/nss_connmgr_gre_v6.c +++ b/gre/nss_connmgr_gre_v6.c -@@ -324,7 +324,7 @@ int nss_connmgr_gre_v6_set_config(struct +@@ -322,9 +322,9 @@ int nss_connmgr_gre_v6_set_config(struct + t->parms.o_key = cfg->okey; + } - nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); +- nss_connmgr_gre_set_gre_flags(cfg, &t->parms.o_flags, &t->parms.i_flags); ++ nss_connmgr_gre_set_gre_flags(cfg, (uint16_t *)&t->parms.o_flags, (uint16_t *)&t->parms.i_flags); - strlcpy(t->parms.name, dev->name, IFNAMSIZ); + strscpy(t->parms.name, dev->name, IFNAMSIZ); t->dev = dev; return GRE_SUCCESS; } +@@ -359,8 +359,8 @@ int nss_connmgr_gre_v6_get_config(struct + /* + * IPv6 outer tos field is always inherited from inner IP header. + */ +- cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(t->parms.o_flags, +- t->parms.i_flags, ++ cmsg->flags |= nss_connmgr_gre_get_nss_config_flags(*t->parms.o_flags, ++ *t->parms.i_flags, + t->parms.flowinfo, + t->parms.hop_limit, 0); + --- /dev/null +++ b/compat.h @@ -0,0 +1,15 @@ diff --git a/qca-nss-drv/Makefile b/qca-nss-drv/Makefile index 1d4790c..07c023d 100644 --- a/qca-nss-drv/Makefile +++ b/qca-nss-drv/Makefile @@ -134,8 +134,8 @@ endef EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-dp \ -I$(STAGING_DIR)/usr/include/qca-ssdk \ - -Wno-unused-variable -Wno-enum-conversion \ - -Wno-missing-declarations -Wno-missing-prototypes + -Wno-missing-declarations -Wno-missing-prototypes \ + -Wno-empty-body ifdef CONFIG_NSS_MEM_PROFILE_MEDIUM EXTRA_CFLAGS += -DNSS_MEM_PROFILE_MEDIUM