netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] skfp: remove assignment expression in conditional (sparse)
@ 2004-10-10 22:44 Randy.Dunlap
  2004-10-15 19:24 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-10-10 22:44 UTC (permalink / raw)
  To: netdev, jgarzik, mlindner

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

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

-- 
~Randy


[-- Attachment #2: skfp_expr.patch --]
[-- Type: text/x-patch, Size: 743 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 |    2 +-
 1 files changed, 1 insertion(+), 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-10 15:15:21.090772760 -0700
@@ -1901,7 +1901,7 @@ 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) {
+		if ((frame_status &= ~LAN_TX) != 0) {
 			DB_TX("Ring is down: terminate LAN_TX",0,0,2) ;
 		}
 		else {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] skfp: remove assignment expression in conditional (sparse)
  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   ` [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2004-10-15 19:24 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: netdev, mlindner

Randy.Dunlap wrote:
> Fix sparse warning:
> drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in
> conditional
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 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 |    2 +-
>  1 files changed, 1 insertion(+), 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-10 15:15:21.090772760 -0700
> @@ -1901,7 +1901,7 @@ 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) {
> +		if ((frame_status &= ~LAN_TX) != 0) {


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

	Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] skfp: remove assignment expression in conditional (sparse)(v2)
  2004-10-15 19:24 ` Jeff Garzik
@ 2004-10-15 21:50   ` Randy.Dunlap
  2004-10-15 23:54     ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-10-15 21:50 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, mlindner

[-- 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 {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] skfp: remove assignment expression in conditional (sparse)(v2)
  2004-10-15 21:50   ` [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) Randy.Dunlap
@ 2004-10-15 23:54     ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-10-15 23:54 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: netdev, mlindner

applied

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-15 23:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) Randy.Dunlap
2004-10-15 23:54     ` Jeff Garzik

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).