Armin pointed me to the fact that the identifier which is used to ensure the
unique include processing in lunux/include/uapi/linux/can.h is CAN_H.
This clashed with his own source as includes from libraries and APIs should
use an underscore '_' at the identifier start.
This patch fixes the protection identifiers in all CAN relavant includes.
Reported-by: Armin Burchardt <armin@uni-bremen.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
14 files changed:
-#ifndef CAN_CORE_H
-#define CAN_CORE_H
+#ifndef _CAN_CORE_H
+#define _CAN_CORE_H
#include <linux/can.h>
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/skbuff.h>
extern int can_send(struct sk_buff *skb, int loop);
extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
extern int can_send(struct sk_buff *skb, int loop);
extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
+#endif /* !_CAN_CORE_H */
-#ifndef CAN_DEV_H
-#define CAN_DEV_H
+#ifndef _CAN_DEV_H
+#define _CAN_DEV_H
#include <linux/can.h>
#include <linux/can/netlink.h>
#include <linux/can.h>
#include <linux/can/netlink.h>
struct sk_buff *alloc_can_err_skb(struct net_device *dev,
struct can_frame **cf);
struct sk_buff *alloc_can_err_skb(struct net_device *dev,
struct can_frame **cf);
+#endif /* !_CAN_DEV_H */
* published by the Free Software Foundation.
*/
* published by the Free Software Foundation.
*/
-#ifndef CAN_LED_H
-#define CAN_LED_H
+#ifndef _CAN_LED_H
+#define _CAN_LED_H
#include <linux/if.h>
#include <linux/leds.h>
#include <linux/if.h>
#include <linux/leds.h>
+#endif /* !_CAN_LED_H */
-#ifndef _CAN_PLATFORM_CC770_H_
-#define _CAN_PLATFORM_CC770_H_
+#ifndef _CAN_PLATFORM_CC770_H
+#define _CAN_PLATFORM_CC770_H
/* CPU Interface Register (0x02) */
#define CPUIF_CEN 0x01 /* Clock Out Enable */
/* CPU Interface Register (0x02) */
#define CPUIF_CEN 0x01 /* Clock Out Enable */
u8 bcr; /* Bus Configuration Register */
};
u8 bcr; /* Bus Configuration Register */
};
-#endif /* !_CAN_PLATFORM_CC770_H_ */
+#endif /* !_CAN_PLATFORM_CC770_H */
-#ifndef __CAN_PLATFORM_MCP251X_H__
-#define __CAN_PLATFORM_MCP251X_H__
+#ifndef _CAN_PLATFORM_MCP251X_H
+#define _CAN_PLATFORM_MCP251X_H
unsigned long oscillator_frequency;
};
unsigned long oscillator_frequency;
};
-#endif /* __CAN_PLATFORM_MCP251X_H__ */
+#endif /* !_CAN_PLATFORM_MCP251X_H */
-#ifndef _CAN_PLATFORM_SJA1000_H_
-#define _CAN_PLATFORM_SJA1000_H_
+#ifndef _CAN_PLATFORM_SJA1000_H
+#define _CAN_PLATFORM_SJA1000_H
/* clock divider register */
#define CDR_CLKOUT_MASK 0x07
/* clock divider register */
#define CDR_CLKOUT_MASK 0x07
u8 cdr; /* clock divider register */
};
u8 cdr; /* clock divider register */
};
-#endif /* !_CAN_PLATFORM_SJA1000_H_ */
+#endif /* !_CAN_PLATFORM_SJA1000_H */
-#ifndef __CAN_PLATFORM_TI_HECC_H__
-#define __CAN_PLATFORM_TI_HECC_H__
+#ifndef _CAN_PLATFORM_TI_HECC_H
+#define _CAN_PLATFORM_TI_HECC_H
/*
* TI HECC (High End CAN Controller) driver platform header
/*
* TI HECC (High End CAN Controller) driver platform header
u32 version;
void (*transceiver_switch) (int);
};
u32 version;
void (*transceiver_switch) (int);
};
+#endif /* !_CAN_PLATFORM_TI_HECC_H */
-#ifndef CAN_SKB_H
-#define CAN_SKB_H
+#ifndef _CAN_SKB_H
+#define _CAN_SKB_H
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/types.h>
#include <linux/skbuff.h>
+#endif /* !_CAN_SKB_H */
-#ifndef CAN_H
-#define CAN_H
+#ifndef _UAPI_CAN_H
+#define _UAPI_CAN_H
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/types.h>
#include <linux/socket.h>
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
+#endif /* !_UAPI_CAN_H */
-#ifndef CAN_BCM_H
-#define CAN_BCM_H
+#ifndef _UAPI_CAN_BCM_H
+#define _UAPI_CAN_BCM_H
#include <linux/types.h>
#include <linux/can.h>
#include <linux/types.h>
#include <linux/can.h>
#define TX_RESET_MULTI_IDX 0x0200
#define RX_RTR_FRAME 0x0400
#define TX_RESET_MULTI_IDX 0x0200
#define RX_RTR_FRAME 0x0400
+#endif /* !_UAPI_CAN_BCM_H */
-#ifndef CAN_ERROR_H
-#define CAN_ERROR_H
+#ifndef _UAPI_CAN_ERROR_H
+#define _UAPI_CAN_ERROR_H
#define CAN_ERR_DLC 8 /* dlc for error message frames */
#define CAN_ERR_DLC 8 /* dlc for error message frames */
/* controller specific additional information / data[5..7] */
/* controller specific additional information / data[5..7] */
-#endif /* CAN_ERROR_H */
+#endif /* _UAPI_CAN_ERROR_H */
-#ifndef CAN_GW_H
-#define CAN_GW_H
+#ifndef _UAPI_CAN_GW_H
+#define _UAPI_CAN_GW_H
#include <linux/types.h>
#include <linux/can.h>
#include <linux/types.h>
#include <linux/can.h>
* Beware of sending unpacked or aligned structs!
*/
* Beware of sending unpacked or aligned structs!
*/
+#endif /* !_UAPI_CAN_GW_H */
* GNU General Public License for more details.
*/
* GNU General Public License for more details.
*/
-#ifndef CAN_NETLINK_H
-#define CAN_NETLINK_H
+#ifndef _UAPI_CAN_NETLINK_H
+#define _UAPI_CAN_NETLINK_H
#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1)
#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1)
-#endif /* CAN_NETLINK_H */
+#endif /* !_UAPI_CAN_NETLINK_H */
-#ifndef CAN_RAW_H
-#define CAN_RAW_H
+#ifndef _UAPI_CAN_RAW_H
+#define _UAPI_CAN_RAW_H
CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */
};
CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */
};
+#endif /* !_UAPI_CAN_RAW_H */