提交 86287543 编写于 作者: C Colin Ian King 提交者: David S. Miller

net: atlantic: fix missing | operator when assigning rec->llc

rec->llc is currently being assigned twice, once with the lower 8 bits
from packed_record[8] and then re-assigned afterwards with data from
packed_record[9].  This looks like a type, I believe the second assignment
should be using the |= operator rather than a direct assignment.

Addresses-Coverity: ("Unused value")
Fixes: b8f8a0b7 ("net: atlantic: MACSec ingress offload HW bindings")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NIgor Russkikh <irusskikh@marell.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2abb5792
......@@ -491,7 +491,7 @@ get_ingress_preclass_record(struct aq_hw_s *hw,
rec->snap[1] = packed_record[8] & 0xFF;
rec->llc = (packed_record[8] >> 8) & 0xFF;
rec->llc = packed_record[9] << 8;
rec->llc |= packed_record[9] << 8;
rec->mac_sa[0] = packed_record[10];
rec->mac_sa[0] |= packed_record[11] << 16;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册