diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2020-05-08 11:52:08 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-05-08 22:25:10 -0700 |
commit | 3712c1c2ef2a0cbca633d150e568deb8f63a6f29 (patch) | |
tree | 1d7301a29a788a1f0d0a508afcb5236e8650fd2b /net/ieee802154 | |
parent | cf86a086a18095e33e0637cb78cda1fcf5280852 (diff) | |
download | linux-3712c1c2ef2a0cbca633d150e568deb8f63a6f29.tar.gz linux-3712c1c2ef2a0cbca633d150e568deb8f63a6f29.tar.bz2 linux-3712c1c2ef2a0cbca633d150e568deb8f63a6f29.zip |
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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/6lowpan/rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c index ee179380a766..b34d050c9687 100644 --- a/net/ieee802154/6lowpan/rx.c +++ b/net/ieee802154/6lowpan/rx.c @@ -240,7 +240,7 @@ static inline bool lowpan_is_reserved(u8 dispatch) return ((dispatch >= 0x44 && dispatch <= 0x4F) || (dispatch >= 0x51 && dispatch <= 0x5F) || (dispatch >= 0xc8 && dispatch <= 0xdf) || - (dispatch >= 0xe8 && dispatch <= 0xff)); + dispatch >= 0xe8); } /* lowpan_rx_h_check checks on generic 6LoWPAN requirements |