HomeFreeBSD

MFC r341568:

Description

MFC r341568:
mlx5ib: Fix sign extension in mlx5_ib_query_device

"fw_rev_min(dev->mdev)" with type "unsigned short" (16 bits, unsigned) is
promoted in "fw_rev_min(dev->mdev) << 16" to type "int" (32 bits, signed), then
sign-extended to type "unsigned long" (64 bits, unsigned). If
"fw_rev_min(dev->mdev) << 16" is greater than 0x7FFFFFFF, the upper bits of the
result will all be 1.

Sponsored by: Mellanox Technologies

Details

Provenance
hselaskyAuthored on
Parents
rS341948: MFC r341567:
Branches
Unknown
Tags
Unknown