[ofa-general] [PATCH] RDMA/nes: remove compiler warning nes_verbs.c:1955

Chien Tung chien.tin.tung at intel.com
Fri Apr 10 10:09:40 PDT 2009


Initialize pbl_count_256 to 0 to get rid of this warning.

    drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_reg_mr':
    drivers/infiniband/hw/nes/nes_verbs.c:1955: warning: 'pbl_count_256'
 may be used uninitialized in this function

Reported-by: Roland Dreier <rdreier at cisco.com>
Signed-off-by: Chien Tung <chien.tin.tung at intel.com>
---
 drivers/infiniband/hw/nes/nes_verbs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 7e5b5ba..9279d05 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1952,7 +1952,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
 	int ret;
 	struct nes_adapter *nesadapter = nesdev->nesadapter;
 	uint pg_cnt = 0;
-	u16 pbl_count_256;
+	u16 pbl_count_256 = 0;
 	u16 pbl_count = 0;
 	u8  use_256_pbls = 0;
 	u8  use_4k_pbls = 0;
-- 
1.5.3.3




More information about the general mailing list