Skip to content

Commit f5dda31

Browse files
Murali Karicheridavem330
authored andcommitted
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 <[email protected]> Acked-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 29ca3cd commit f5dda31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/hsr/hsr_slave.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
1818
{
1919
struct sk_buff *skb = *pskb;
2020
struct hsr_port *port;
21-
u16 protocol;
21+
__be16 protocol;
2222

2323
if (!skb_mac_header_was_set(skb)) {
2424
WARN_ONCE(1, "%s: skb invalid", __func__);

0 commit comments

Comments
 (0)