[openib-general] [PATCH] amso1100: Fix && typo

Jean Delvare khali at linux-fr.org
Thu Nov 9 12:02:26 PST 2006


Fix the AMSO1100 firmware version computation, which was broken
due to "&&" being used where "&" should have.

Signed-off-by: Jean Delvare <khali at linux-fr.org>
---
 drivers/infiniband/hw/amso1100/c2_rnic.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.19-rc5.orig/drivers/infiniband/hw/amso1100/c2_rnic.c	2006-11-09 10:30:33.000000000 +0100
+++ linux-2.6.19-rc5/drivers/infiniband/hw/amso1100/c2_rnic.c	2006-11-09 20:50:28.000000000 +0100
@@ -157,8 +157,8 @@
 
 	props->fw_ver =
 		((u64)be32_to_cpu(reply->fw_ver_major) << 32) |
-		((be32_to_cpu(reply->fw_ver_minor) && 0xFFFF) << 16) |
-		(be32_to_cpu(reply->fw_ver_patch) && 0xFFFF);
+		((be32_to_cpu(reply->fw_ver_minor) & 0xFFFF) << 16) |
+		(be32_to_cpu(reply->fw_ver_patch) & 0xFFFF);
 	memcpy(&props->sys_image_guid, c2dev->netdev->dev_addr, 6);
 	props->max_mr_size         = 0xFFFFFFFF;
 	props->page_size_cap       = ~(C2_MIN_PAGESIZE-1);


-- 
Jean Delvare




More information about the general mailing list