netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev <netdev@oss.sgi.com>, mlindner@syskonnect.de
Subject: [PATCH] skfp: remove assignment expression in conditional (sparse)(v2)
Date: Fri, 15 Oct 2004 14:50:46 -0700	[thread overview]
Message-ID: <41704636.7040402@osdl.org> (raw)
In-Reply-To: <41702405.6070100@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

> I would prefer to fix a 'assignment expression in conditional' warning 
> by splitting the assignment and the test.
> 
>     Jeff

OK, here you are.

-- 
~Randy

[-- Attachment #2: skfp_expr_v2.patch --]
[-- Type: text/x-patch, Size: 755 bytes --]


Fix sparse warning:
drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in conditional

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>


diffstat:=
 drivers/net/skfp/hwmtm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -Naurp ./drivers/net/skfp/hwmtm.c~skfp_expr ./drivers/net/skfp/hwmtm.c
--- ./drivers/net/skfp/hwmtm.c~skfp_expr	2004-08-13 22:36:59.000000000 -0700
+++ ./drivers/net/skfp/hwmtm.c	2004-10-15 14:47:41.942720928 -0700
@@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SM
 	}
 
 	if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) {
-		if (frame_status &= ~LAN_TX) {
+		frame_status &= ~LAN_TX;
+		if (frame_status) {
 			DB_TX("Ring is down: terminate LAN_TX",0,0,2) ;
 		}
 		else {

  reply	other threads:[~2004-10-15 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10 22:44 [PATCH] skfp: remove assignment expression in conditional (sparse) Randy.Dunlap
2004-10-15 19:24 ` Jeff Garzik
2004-10-15 21:50   ` Randy.Dunlap [this message]
2004-10-15 23:54     ` [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) Jeff Garzik

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=41704636.7040402@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=mlindner@syskonnect.de \
    --cc=netdev@oss.sgi.com \
    /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).