summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2020-05-06 11:41:07 -0400
committerDavid S. Miller <davem@davemloft.net>2020-05-06 15:00:20 -0700
commitf5dda315b63775fe00f5470687d40ce801ddfb38 (patch)
tree8a5571238db196bf984016acf4726e720ee5369d /net
parent29ca3cdfe13b2792b8624e6f769777e8cb387f9c (diff)
net: hsr: fix incorrect type usage for protocol variable
Fix following sparse checker warning:- net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different base types) net/hsr/hsr_slave.c:38:18: expected unsigned short [unsigned] [usertype] protocol net/hsr/hsr_slave.c:38:18: got restricted __be16 [usertype] h_proto net/hsr/hsr_slave.c:39:25: warning: restricted __be16 degrades to integer net/hsr/hsr_slave.c:39:57: warning: restricted __be16 degrades to integer Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/hsr/hsr_slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index f4b9f7a3ce51..25b6ffba26cd 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -18,7 +18,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
{
struct sk_buff *skb = *pskb;
struct hsr_port *port;
- u16 protocol;
+ __be16 protocol;
if (!skb_mac_header_was_set(skb)) {
WARN_ONCE(1, "%s: skb invalid", __func__);