The process_ecn intends to return a bool value. However it is doing
so incorrectly by ANDing the fecn mask. The fecn bit is bit 31. Bool is
not a native data type and is up to the compiler to implement how it
sees fit. It is conceivable that this upper bit gets washed out.
Fix by converting to a bool properly.
Cc: stable@vger.kernel.org
Fixes: Commit fd2b562edca6 ("IB/hfi1: Pull FECN/BECN processing to a common place")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
        bth1 = be32_to_cpu(ohdr->bth[1]);
        if (unlikely(bth1 & (IB_BECN_SMASK | IB_FECN_SMASK))) {
                hfi1_process_ecn_slowpath(qp, pkt, do_cnp);
-               return bth1 & IB_FECN_SMASK;
+               return !!(bth1 & IB_FECN_SMASK);
        }
        return false;
 }
 
        int diff;
        struct ib_reth *reth;
        unsigned long flags;
-       int ret, is_fecn = 0;
+       int ret;
+       bool is_fecn = false;
        bool copy_last = false;
        u32 rkey;