Skip to content
Commit 49c32037 authored by Nicolas Iooss's avatar Nicolas Iooss Committed by Greg Kroah-Hartman
Browse files

staging/rdma/hfi1: do not use u8 to store a 32-bit integer



hfi1_rc_hdrerr() stores the result of be32_to_cpu() into opcode, which
is a local variable declared as u8.  Later this variable is used in a
24-bit logical right shift, which makes clang complains (when building
an allmodconfig kernel with LLVMLinux patches):

    drivers/staging/rdma/hfi1/rc.c:2399:9: warning: shift count >= width
    of type [-Wshift-count-overflow]
        opcode >>= 24;
               ^   ~~

All of this lead to the point that opcode may have been designed to be
a 32-bit integer instead of an 8-bit one.  Therefore make this variable
u32.

Signed-off-by: default avatarNicolas Iooss <nicolas.iooss_linux@m4x.org>
Acked-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 713519c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment