From: Divy Le Ray <divy@chelsio.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: Jeff Garzik <jeff@garzik.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/net/cxgb3/xgmac.c: remove dead code
Date: Tue, 31 Jul 2007 16:43:59 -0700 [thread overview]
Message-ID: <46AFC93F.6010104@chelsio.com> (raw)
In-Reply-To: <20070729145544.GA16817@stusta.de>
Adrian Bunk wrote:
>
> This patch removes dead code ("tx_xcnt" can never be != 0 at this place)
> spotted by the Coverity checker.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
Acked-by: Divy Le Ray <divy@chelsio.com>
>
>
> ---
>
> drivers/net/cxgb3/xgmac.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- linux-2.6.22-rc6-mm1/drivers/net/cxgb3/xgmac.c.old 2007-07-24
> 13:55:33.000000000 +0200
> +++ linux-2.6.22-rc6-mm1/drivers/net/cxgb3/xgmac.c 2007-07-24
> 13:57:06.000000000 +0200
> @@ -510,38 +510,35 @@ int t3b2_mac_watchdog_task(struct cmac *
> if (tx_mcnt == mac->tx_mcnt) {
> tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
>
> A_XGM_TX_SPI4_SOP_EOP_CNT +
> mac->offset)));
> if (tx_xcnt == 0) {
> t3_write_reg(adap, A_TP_PIO_ADDR,
> A_TP_TX_DROP_CNT_CH0 + macidx(mac));
> tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap,
> A_TP_PIO_DATA)));
> } else {
> goto rxcheck;
> }
> } else {
> mac->toggle_cnt = 0;
> goto rxcheck;
> }
>
> - if (((tx_tcnt != mac->tx_tcnt) &&
> - (tx_xcnt == 0) && (mac->tx_xcnt == 0)) ||
> - ((mac->tx_mcnt == tx_mcnt) &&
> - (tx_xcnt != 0) && (mac->tx_xcnt != 0))) {
> + if ((tx_tcnt != mac->tx_tcnt) && (mac->tx_xcnt == 0)) {
> if (mac->toggle_cnt > 4) {
> status = 2;
> goto out;
> } else {
> status = 1;
> goto out;
> }
> } else {
> mac->toggle_cnt = 0;
> goto rxcheck;
> }
>
> rxcheck:
> if (rx_mcnt != mac->rx_mcnt)
> rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap,
>
> A_XGM_RX_SPI4_SOP_EOP_CNT +
> mac->offset)));
>
prev parent reply other threads:[~2007-07-31 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 14:55 [2.6 patch] drivers/net/cxgb3/xgmac.c: remove dead code Adrian Bunk
2007-07-31 23:43 ` Divy Le Ray [this message]
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=46AFC93F.6010104@chelsio.com \
--to=divy@chelsio.com \
--cc=bunk@stusta.de \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).