Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 1607

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 2 Sep 2010 23:23:44 -0400
Subject: [infiniband] iw_cxgb3: always define states[]
Message-id: <20100902232344.10621.85994.stgit@brian.englab.brq.redhat.com>
Patchwork-id: 28037
O-Subject: [RHEL5.6 BZ629634 PATCH 2/5] iw_cxgb3: always define states[]
Bugzilla: 629634
RH-Acked-by: David S. Miller <davem@redhat.com>
RH-Acked-by: Jiri Pirko <jpirko@redhat.com>
RH-Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>

Make sure states[] is defined even for !DEBUG build.
This to prevent a compile error later when pr_debug (and thus PDBG too)
will always check for syntax errors.

Upstream does the same.

diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 8d98e32..704606f 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -47,7 +47,6 @@
 #include "iwch_provider.h"
 #include "iwch_cm.h"
 
-#ifdef DEBUG
 static char *states[] = {
 	"idle",
 	"listen",
@@ -63,7 +62,6 @@ static char *states[] = {
 	"dead",
 	NULL,
 };
-#endif
 
 int peer2peer = 0;
 module_param(peer2peer, int, 0644);