aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/can/dev.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
commit92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch)
tree15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/linux/can/dev.h
parent15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff)
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2 Backmerge to get at commit 1b0e3a049efe471c399674fd954500ce97438d30 Author: Imre Deak <imre.deak@intel.com> Date: Thu Nov 5 23:04:11 2015 +0200 drm/i915/skl: disable display side power well support for now so that we can proplery re-eanble skl power wells in -next. Conflicts are just adjacent lines changed, except for intel_fbdev.c where we need to interleave the changs. Nothing nefarious. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/can/dev.h')
-rw-r--r--include/linux/can/dev.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index c3a9c8fc60fa..735f9f8c4e43 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -14,9 +14,10 @@
14#define _CAN_DEV_H 14#define _CAN_DEV_H
15 15
16#include <linux/can.h> 16#include <linux/can.h>
17#include <linux/can/netlink.h>
18#include <linux/can/error.h> 17#include <linux/can/error.h>
19#include <linux/can/led.h> 18#include <linux/can/led.h>
19#include <linux/can/netlink.h>
20#include <linux/netdevice.h>
20 21
21/* 22/*
22 * CAN mode 23 * CAN mode
@@ -77,7 +78,7 @@ struct can_priv {
77#define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) 78#define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC))
78 79
79/* Drop a given socketbuffer if it does not contain a valid CAN frame. */ 80/* Drop a given socketbuffer if it does not contain a valid CAN frame. */
80static inline int can_dropped_invalid_skb(struct net_device *dev, 81static inline bool can_dropped_invalid_skb(struct net_device *dev,
81 struct sk_buff *skb) 82 struct sk_buff *skb)
82{ 83{
83 const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; 84 const struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
@@ -93,12 +94,12 @@ static inline int can_dropped_invalid_skb(struct net_device *dev,
93 } else 94 } else
94 goto inval_skb; 95 goto inval_skb;
95 96
96 return 0; 97 return false;
97 98
98inval_skb: 99inval_skb:
99 kfree_skb(skb); 100 kfree_skb(skb);
100 dev->stats.tx_dropped++; 101 dev->stats.tx_dropped++;
101 return 1; 102 return true;
102} 103}
103 104
104static inline bool can_is_canfd_skb(const struct sk_buff *skb) 105static inline bool can_is_canfd_skb(const struct sk_buff *skb)