diff mbox

IB/hfi1: fix sdma_descq_cnt parameter parsing

Message ID 20150915141927.16196.22394.stgit@phlsvslse11.ph.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Marciniszyn, Mike Sept. 15, 2015, 2:19 p.m. UTC
The boolean tests should have been or-ed.

Reported-by: David Binderman <dcb314@hotmail.com>
Reviewed-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
---
 drivers/staging/rdma/hfi1/sdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Doug Ledford Sept. 18, 2015, 3:50 p.m. UTC | #1
On 09/15/2015 10:19 AM, Mike Marciniszyn wrote:
> The boolean tests should have been or-ed.
> 
> Reported-by: David Binderman <dcb314@hotmail.com>
> Reviewed-by: Jubin John <jubin.john@intel.com>
> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c
index a8c903c..7e01f30 100644
--- a/drivers/staging/rdma/hfi1/sdma.c
+++ b/drivers/staging/rdma/hfi1/sdma.c
@@ -737,7 +737,7 @@  u16 sdma_get_descq_cnt(void)
 	 */
 	if (!is_power_of_2(count))
 		return SDMA_DESCQ_CNT;
-	if (count < 64 && count > 32768)
+	if (count < 64 || count > 32768)
 		return SDMA_DESCQ_CNT;
 	return count;
 }