[PATCH v1 2/3] net: can: j1939: move J1939_MIN_NAMELEN to shared header
From: Oleksij Rempel
Date: Mon Apr 20 2026 - 12:58:24 EST
Move J1939_MIN_NAMELEN macro from socket.c to j1939-priv.h to prepare
for KUnit test infrastructure.
No functional change.
Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
net/can/j1939/j1939-priv.h | 2 ++
net/can/j1939/socket.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/can/j1939/j1939-priv.h b/net/can/j1939/j1939-priv.h
index b82706505103..cf646644f538 100644
--- a/net/can/j1939/j1939-priv.h
+++ b/net/can/j1939/j1939-priv.h
@@ -12,6 +12,8 @@
#include <linux/can/j1939.h>
#include <net/sock.h>
+#define J1939_MIN_NAMELEN CAN_REQUIRED_SIZE(struct sockaddr_can, can_addr.j1939)
+
/* Timeout to receive the abort signal over loop back. In case CAN
* bus is open, the timeout should be triggered.
*/
diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
index 0502b030d238..2191bfe117dc 100644
--- a/net/can/j1939/socket.c
+++ b/net/can/j1939/socket.c
@@ -21,8 +21,6 @@
#include "j1939-priv.h"
-#define J1939_MIN_NAMELEN CAN_REQUIRED_SIZE(struct sockaddr_can, can_addr.j1939)
-
/* conversion function between struct sock::sk_priority from linux and
* j1939 priority field
*/
--
2.47.3