net: constify is_skb_forwardable's arguments
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 28 Apr 2016 15:59:28 +0000 (17:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Apr 2016 20:13:36 +0000 (16:13 -0400)
is_skb_forwardable is not supposed to change anything so constify its
arguments

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c

index 934ca866562d9ba9a9d2fb2e34f627660bd0c994..52914a8543869711cdd262ea31ba42ccb9596095 100644 (file)
@@ -3264,7 +3264,8 @@ struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
                                    struct netdev_queue *txq, int *ret);
 int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
-bool is_skb_forwardable(struct net_device *dev, struct sk_buff *skb);
+bool is_skb_forwardable(const struct net_device *dev,
+                       const struct sk_buff *skb);
 
 extern int             netdev_budget;
 
index c2f3d5dbde56050a3b41330690b8f16d62b6ec00..d91dfbec0fc6fbeb80579e48d2b842833149ab10 100644 (file)
@@ -1741,7 +1741,7 @@ static inline void net_timestamp_set(struct sk_buff *skb)
                        __net_timestamp(SKB);           \
        }                                               \
 
-bool is_skb_forwardable(struct net_device *dev, struct sk_buff *skb)
+bool is_skb_forwardable(const struct net_device *dev, const struct sk_buff *skb)
 {
        unsigned int len;