| To: | Francois Romieu <romieu@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [patch netdev-2.6 3/3] r8169: simplify trick if() expression |
| From: | "John W. Linville" <linville@xxxxxxxxxxxxx> |
| Date: | Fri, 22 Oct 2004 21:49:24 -0400 |
| Cc: | netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx |
| In-reply-to: | <20041022202851.GB4216@xxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Mail-followup-to: | Francois Romieu <romieu@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, jgarzik@xxxxxxxxx |
| References: | <20041022005737.GA1945@xxxxxxxxxxxxx> <20041022202851.GB4216@xxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
Simplify tricky if() expression in rtl8169_vlan_rx_register().
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---
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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: TCP crashes when cycling loopback interface., Herbert Xu |
|---|---|
| Next by Date: | Re: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes, John W. Linville |
| Previous by Thread: | Re: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes, Francois Romieu |
| Next by Thread: | Re: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes, John W. Linville |
| Indexes: | [Date] [Thread] [Top] [All Lists] |