Commit 3712c1c2 authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

ieee802154: 6lowpan: remove unnecessary comparison

The type of dispatch is u8 which is always '<=' 0xff, so the
dispatch <= 0xff is always true, we can remove this comparison.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent cf86a086
...@@ -240,7 +240,7 @@ static inline bool lowpan_is_reserved(u8 dispatch) ...@@ -240,7 +240,7 @@ static inline bool lowpan_is_reserved(u8 dispatch)
return ((dispatch >= 0x44 && dispatch <= 0x4F) || return ((dispatch >= 0x44 && dispatch <= 0x4F) ||
(dispatch >= 0x51 && dispatch <= 0x5F) || (dispatch >= 0x51 && dispatch <= 0x5F) ||
(dispatch >= 0xc8 && dispatch <= 0xdf) || (dispatch >= 0xc8 && dispatch <= 0xdf) ||
(dispatch >= 0xe8 && dispatch <= 0xff)); dispatch >= 0xe8);
} }
/* lowpan_rx_h_check checks on generic 6LoWPAN requirements /* lowpan_rx_h_check checks on generic 6LoWPAN requirements
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment