From: horms@vergenet.net
To: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>, Peter Huewe <PeterHuewe@gmx.de>
Subject: [patch 4/6] otus: Fix ZM_SEQ_DEBUG macro for no-debug case
Date: Fri, 08 Jan 2010 18:57:52 +1100 [thread overview]
Message-ID: <20100108075921.128458726@vergenet.net> (raw)
In-Reply-To: <20100108075748.059645106@vergenet.net>
[-- Attachment #1: otus-no-effect.patch --]
[-- Type: text/plain, Size: 3150 bytes --]
tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION
is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of
tcp_seq in there too. This allows ZM_SEQ_DEBUG() to be removed from the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file.
This resolves several compile warnings for the
non-ZM_ENABLE_PERFORMANCE_EVALUATION case.
However, the ZM_ENABLE_PERFORMANCE_EVALUATION
case seems to be completely broken.
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
...
drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled':
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of
comma expression has no effect
drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no
effect
...
Signed-off-by: Simon Horman <horms@verge.net.au>
Index: linux-2.6/drivers/staging/otus/80211core/pub_zfi.h
===================================================================
--- linux-2.6.orig/drivers/staging/otus/80211core/pub_zfi.h 2010-01-08 17:36:50.000000000 +1100
+++ linux-2.6/drivers/staging/otus/80211core/pub_zfi.h 2010-01-08 17:39:03.000000000 +1100
@@ -814,7 +814,6 @@ extern void zfiRxPerformanceReg(zdev_t*
#define ZM_PERFORMANCE_RX_AMSDU(dev, buf, len)
#define ZM_PERFORMANCE_RX_FLUSH(dev)
#define ZM_PERFORMANCE_RX_CLEAR(dev)
-#define ZM_SEQ_DEBUG
#define ZM_PERFORMANCE_RX_REORDER(dev)
#endif
/***** End of section 3 *****/
Index: linux-2.6/drivers/staging/otus/80211core/cagg.c
===================================================================
--- linux-2.6.orig/drivers/staging/otus/80211core/cagg.c 2010-01-08 17:38:36.000000000 +1100
+++ linux-2.6/drivers/staging/otus/80211core/cagg.c 2010-01-08 17:38:46.000000000 +1100
@@ -1838,7 +1838,6 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t
u16_t frameType;
u16_t frameCtrl;
u16_t frameSubtype;
- u32_t tcp_seq;
//struct aggSta *agg_sta;
#if ZM_AGG_FPGA_REORDERING
struct agg_tid_rx *tid_rx;
@@ -1863,13 +1862,17 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t
return NULL;
}
#ifdef ZM_ENABLE_PERFORMANCE_EVALUATION
- tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24;
- tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16;
- tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8;
- tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39);
+ {
+ u32_t tcp_seq;
+
+ tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24;
+ tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16;
+ tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8;
+ tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39);
+ ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq);
+ }
#endif
- ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq);
dst0 = zmw_rx_buf_readh(dev, buf, offset+4);
src[0] = zmw_rx_buf_readh(dev, buf, offset+10);
next prev parent reply other threads:[~2010-01-08 8:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-08 7:57 [patch 0/6] otus: build fixes horms
2010-01-08 7:57 ` [patch 1/6] otus: dont mix declarations and code horms
2010-01-08 7:57 ` [patch 2/6] otus: remove unused variables horms
2010-01-08 7:57 ` [patch 3/6] otus: remove unused constants horms
2010-01-08 7:57 ` horms [this message]
2010-01-08 7:57 ` [patch 5/6] otus: zfTkipInit(): increment pointer horms
2010-01-09 8:44 ` [patch] otus: zfTkipInit(): increment another pointer Dan Carpenter
2010-01-12 0:50 ` [patch] tch 5/6 v2] " Simon Horman
2010-01-08 7:57 ` [patch 6/6] otus: zfRateCtrlRateDiff(): remove duplicate comparison horms
2010-01-09 8:44 ` Dan Carpenter
2010-01-11 13:06 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100108075921.128458726@vergenet.net \
--to=horms@vergenet.net \
--cc=PeterHuewe@gmx.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®