]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Use bool in process_ecn
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Sun, 9 Apr 2017 17:17:30 +0000 (10:17 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 28 Apr 2017 17:56:24 +0000 (13:56 -0400)
commitf1243094fe82a40dc0009e3279c105af077afd79
tree0c6c927b4763da1a749e3a8f2c97122cc78b6c14
parentb112ebb98653b83910b9899af868f301303c3510
IB/hfi1: Use bool in process_ecn

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>
drivers/infiniband/hw/hfi1/hfi.h
drivers/infiniband/hw/hfi1/rc.c