Skip to contentSkip to conversation

cobalt: Adjust dev_addr_set wrapper to 5.10 backport

PATCH New Jan Kiszka 1 participant 1 message Aug 29, 2023

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v4 1/1 cobalt: Adjust dev_addr_set wrapper to 5.10 backport

From: Jan Kiszka <[email protected]>

5.10.188 gained this helper meanwhile as well.

---

v4 is actually what was in next before as v1 but was never posted as such. v2 and v3 tried to address kernels < 5.10 as well, but that is irrelevant for master (dovetail only).

 kernel/cobalt/include/asm-generic/xenomai/wrappers.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/cobalt/include/asm-generic/xenomai/wrappers.h +3 -1
index ea7ed3ad56..c86ab16029 100644
@@ -54,7 +54,9 @@
 #define close_fd(__ufd)	__close_fd(current->files, __ufd)
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) && \
+    (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) || \
+     LINUX_VERSION_CODE < KERNEL_VERSION(5,10,188))
 #define dev_addr_set(dev, addr)		memcpy((dev)->dev_addr, addr, MAX_ADDR_LEN)
 #define eth_hw_addr_set(dev, addr)	memcpy((dev)->dev_addr, addr, ETH_ALEN)
 #endif
Signature · 1 line
2.35.3