OSDN Git Service

NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Mar 2019 09:23:26 +0000 (12:23 +0300)
committerJon Mason <jdmason@kudzu.us>
Thu, 13 Jun 2019 12:59:18 +0000 (08:59 -0400)
commit1e590dec3ed6852dba6fcbcc7e5300c893914fd7
tree28cbc05fd2c898cb8aca4d9891acd549233825e4
parentff148d8ac53e59802645bd3200c811620317eb9f
NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask()

This code triggers a Smatch warning:

    drivers/ntb/hw/amd/ntb_hw_amd.c:336 amd_ntb_db_vector_mask()
    warn: should '(1 << db_vector)' be a 64 bit type?

I don't think "db_vector" can be higher than 16 so this doesn't affect
runtime, but it's nice to silence the static checker warning and we
might increase "ndev->db_count" in the future.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/amd/ntb_hw_amd.c