lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch netdev-2.6 3/3] r8169: simplify trick if() expression
Simplify tricky if() expression in rtl8169_vlan_rx_register().

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
You're probably right -- the "if ((tp->vlgrp = grp))" line is probably
a little TOO clever... :-)

drivers/net/r8169.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

--- ./drivers/net/r8169.c.orig 2004-10-22 21:44:06.050154952 -0400
+++ ./drivers/net/r8169.c 2004-10-22 21:44:26.228087440 -0400
@@ -703,7 +703,8 @@ static void rtl8169_vlan_rx_register(str
unsigned long flags;

spin_lock_irqsave(&tp->lock, flags);
- if ((tp->vlgrp = grp))
+ tp->vlgrp = grp;
+ if (tp->vlgrp)
tp->cp_cmd |= RxVlan;
else
tp->cp_cmd &= ~RxVlan;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.043 / U:3.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site