Skip to contentSkip to conversation

can: uapi: move CAN_RAW_FILTER_MAX definition to raw.h

can-next Applied Oliver Hartkopp 2 participants 2 messages Jun 9, 2023 – Jun 20, 2023

Subsystems (2)
lore
Share & tools
lore

Oliver Hartkopp

author maintainer
#0 lore raw

CAN_RAW_FILTER_MAX is only relevant for CAN_RAW sockets and used in linux/can/raw.c or in userspace applications that include the raw.h file anyway.

---
 include/uapi/linux/can.h     | 1 -
 include/uapi/linux/can/raw.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/can.h +0 -1
index dd645ea72306..939db2388208 100644
@@ -283,8 +283,7 @@ struct can_filter {
 	canid_t can_id;
 	canid_t can_mask;
 };
 
 #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
-#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */
 
 #endif /* !_UAPI_CAN_H */
include/uapi/linux/can/raw.h +2 -0
index ff12f525c37c..31622c9b7988 100644
@@ -47,10 +47,12 @@
 #define _UAPI_CAN_RAW_H
 
 #include <linux/can.h>
 
 #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
+#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */
+
 enum {
 	SCM_CAN_RAW_ERRQUEUE = 1,
 };
 
 /* for socket options affecting the socket (not the global system) */
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Oliver Hartkopp

CAN_RAW_FILTER_MAX is only relevant for CAN_RAW sockets and used in linux/can/raw.c or in userspace applications that include the raw.h file anyway.

Applied to linux-can-next.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |