diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-10-17 15:32:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-19 13:04:32 +0100 |
commit | 9a03c3d398c17eadfc5bc470c1084beb71c088f1 (patch) | |
tree | 2091433de0df2d70996ed29f4063a0ad52f1b61a /Documentation/xillybus.txt | |
parent | a90cca7c75907380b3be7110c2e3007b743553b4 (diff) | |
download | linux-9a03c3d398c17eadfc5bc470c1084beb71c088f1.tar.gz |
thunderbolt: Fix a couple right shifting to zero bugs
The problematic code looks like this:
res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK;
res_seq >>= TB_XDOMAIN_SN_SHIFT;
TB_XDOMAIN_SN_SHIFT is 27, and right shifting a u8 27 bits is always
going to result in zero. The fix is to declare these variables as u32.
Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/xillybus.txt')
0 files changed, 0 insertions, 0 deletions