[ipxe-devel] [PATCH] [infiniband] Fix uninitialized variables warning
Miller, Shao
Shao.Miller at yrdsb.edu.on.ca
Tue Jun 1 17:44:54 UTC 2010
Also at ipxe.org:/home/sha0/ipxe/ -- qib7322 branch. - Shao
>From d4ea5ab47fc59ae44759f670dfad6162070fb660 Mon Sep 17 00:00:00 2001
From: Shao Miller <shao.miller at yrdsb.edu.on.ca>
Date: Tue, 1 Jun 2010 17:19:33 +0000
Subject: [PATCH] [infiniband] Fix uninitialized variables warning
Trivial patch for GCC 3.3.3 (Debian 20040429)
Signed-off-by: Shao Miller <shao.miller at yrdsb.edu.on.ca>
---
src/drivers/infiniband/qib7322.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/drivers/infiniband/qib7322.c
b/src/drivers/infiniband/qib7322.c
index 9e8185d..14fe5ee 100644
--- a/src/drivers/infiniband/qib7322.c
+++ b/src/drivers/infiniband/qib7322.c
@@ -641,7 +641,7 @@ static int qib7322_init_send ( struct qib7322
*qib7322 ) {
unsigned long baseaddr_largepio;
unsigned long baseaddr_vl15_port0;
unsigned long baseaddr_vl15_port1;
- int rc;
+ int rc = -ENOERR;
/* Create send buffer sets */
qib7322_readq ( qib7322, &sendbufbase,
QIB_7322_SendBufBase_offset );
@@ -701,7 +701,7 @@ static int qib7322_init_send ( struct qib7322
*qib7322 ) {
BIT_FILL_1 ( &sendctrl, SendBufAvailUpd, 1 );
qib7322_writeq ( qib7322, &sendctrl, QIB_7322_SendCtrl_offset );
- return 0;
+ return rc;
free_dma ( qib7322->sendbufavail, sizeof (
*qib7322->sendbufavail ) );
err_alloc_sendbufavail:
@@ -1665,7 +1665,7 @@ static unsigned int qib7322_link_speed_supported (
struct qib7322 *qib7322,
unsigned int port ) {
struct QIB_7322_feature_mask features;
struct QIB_7322_Revision revision;
- unsigned int supported;
+ unsigned int supported = 0;
unsigned int boardid;
/* Read the active feature mask */
--
1.5.3.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-infiniband-Fix-uninitialized-variables-warning.patch
Type: application/octet-stream
Size: 1604 bytes
Desc: 0001-infiniband-Fix-uninitialized-variables-warning.patch
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20100601/0637aab5/attachment.obj>
More information about the ipxe-devel
mailing list