Roland Dreier wrote:
@@ -1502,7 +1506,7 @@ int mthca_tavor_post_send(struct ib_qp *
int i;
int size;
int size0 = 0;
- u32 f0 = 0;
+ u32 f0;
This causes compile warnings for me that 'f0' might be used uninitialized.
@@ -1843,7 +1849,7 @@ int
Sean This causes compile warnings for me that 'f0' might be used
Sean uninitialized.
Yes, but they're bogus.
- R.
___
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe,
Quoting r. Roland Dreier [EMAIL PROTECTED]:
Subject: Re: [PATCH] mthca: make IB_SEND_FENCE work
Sean This causes compile warnings for me that 'f0' might be used
Sean uninitialized.
Yes, but they're bogus.
Yes, I see lots of such bogus warnings in kernel code too.
And it seems
Michael S. Tsirkin wrote:
Yes, I see lots of such bogus warnings in kernel code too.
And it seems obvious that since compiler isn't smart enough to
figure out the initialization isn't needed, it will generate
unecessary code if we *do* add initilization just to shut it up.
Can we relocate the
Quoting r. Sean Hefty [EMAIL PROTECTED]:
This could eliminate the warning, and remove an if statement from executing
on
each iteration.
We still need to test size0 to set size0 = size.
So we just reuse the extra branch, and I agree with Roland
this way code is clearer.
--
MST
Michael S. Tsirkin wrote:
We still need to test size0 to set size0 = size.
So we just reuse the extra branch, and I agree with Roland
this way code is clearer.
You're right; I missed where size0 was used below the loop.
Then I think we can also do without initializing op0 = 0, and we can
Quoting r. Sean Hefty [EMAIL PROTECTED]:
Subject: Re: [PATCH] mthca: make IB_SEND_FENCE work
Michael S. Tsirkin wrote:
We still need to test size0 to set size0 = size.
So we just reuse the extra branch, and I agree with Roland
this way code is clearer.
You're right; I missed where
Michael Maybe compile with -Wno-uninitialized?
This is discussed periodically on lkml.
The problem with -Wno-uninitialized is that it shuts up the good is
used uninitialized warnings also (in addition to the may be used
warnings, which are often bogus).
- R.
Similarly I just checked this in:
(BTW Muli -- I think anonymous enum is better than define because it
lets the compiler have human-readable names for values, rather than
throwing the info away at the preprocessor stage -- so error messages
can be better, etc)
commit
IB/mthca: make IB_SEND_FENCE work
Fence bit must be set in the doorbell, not only in WQE
Signed-off-by: Michael S. Tsirkin [EMAIL PROTECTED]
diff --git a/drivers/infiniband/hw/mthca/mthca_doorbell.h
b/drivers/infiniband/hw/mthca/mthca_doorbell.h
index dd9a44d..e5f0ad6 100644
---
On Wed, Aug 09, 2006 at 10:04:35AM +0300, Michael S. Tsirkin wrote:
diff --git a/drivers/infiniband/hw/mthca/mthca_doorbell.h
b/drivers/infiniband/hw/mthca/mthca_doorbell.h
index dd9a44d..e5f0ad6 100644
--- a/drivers/infiniband/hw/mthca/mthca_doorbell.h
+++
Quoting r. Muli Ben-Yehuda [EMAIL PROTECTED]:
+enum {
+ MTHCA_SEND_DOORBELL_FENCE = 1 5
+};
Does anonymous enum have any benefit over define for this?
Not really, no.
--
MST
___
openib-general mailing list
openib-general@openib.org
On Wed, Aug 09, 2006 at 10:37:20AM +0300, Michael S. Tsirkin wrote:
Quoting r. Muli Ben-Yehuda [EMAIL PROTECTED]:
+enum {
+ MTHCA_SEND_DOORBELL_FENCE = 1 5
+};
Does anonymous enum have any benefit over define for this?
Not really, no.
Good, because I think #define is the
Quoting r. Muli Ben-Yehuda [EMAIL PROTECTED]:
Subject: Re: [PATCH] mthca: make IB_SEND_FENCE work
On Wed, Aug 09, 2006 at 10:37:20AM +0300, Michael S. Tsirkin wrote:
Quoting r. Muli Ben-Yehuda [EMAIL PROTECTED]:
+enum {
+ MTHCA_SEND_DOORBELL_FENCE = 1 5
+};
Does
14 matches
Mail list logo