diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/can/dev.h | 6 | ||||
| -rw-r--r-- | include/linux/inetdevice.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 6992afc6ba7f..b37ea95bc348 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -99,6 +99,12 @@ inval_skb: | |||
| 99 | return 1; | 99 | return 1; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline bool can_is_canfd_skb(const struct sk_buff *skb) | ||
| 103 | { | ||
| 104 | /* the CAN specific type of skb is identified by its data length */ | ||
| 105 | return skb->len == CANFD_MTU; | ||
| 106 | } | ||
| 107 | |||
| 102 | /* get data length from can_dlc with sanitized can_dlc */ | 108 | /* get data length from can_dlc with sanitized can_dlc */ |
| 103 | u8 can_dlc2len(u8 can_dlc); | 109 | u8 can_dlc2len(u8 can_dlc); |
| 104 | 110 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 0068708161ff..0a21fbefdfbe 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -242,7 +242,7 @@ static inline void in_dev_put(struct in_device *idev) | |||
| 242 | static __inline__ __be32 inet_make_mask(int logmask) | 242 | static __inline__ __be32 inet_make_mask(int logmask) |
| 243 | { | 243 | { |
| 244 | if (logmask) | 244 | if (logmask) |
| 245 | return htonl(~((1<<(32-logmask))-1)); | 245 | return htonl(~((1U<<(32-logmask))-1)); |
| 246 | return 0; | 246 | return 0; |
| 247 | } | 247 | } |
| 248 | 248 | ||
