Patchwork slip: fix wrong SLIP6 ifdef-endif placing

login
register
mail settings
Submitter Matvejchikov Ilya
Date July 10, 2011, 6:49 p.m.
Message ID <CAKh5nabjFq9RF-CQ_fZd1DG1Ptk7CCtmbknp7Kq6f6HvHmrnxg@mail.gmail.com>
Download mbox | patch
Permalink /patch/104078/
State Accepted
Delegated to: David Miller
Headers show

Comments

Matvejchikov Ilya - July 10, 2011, 6:49 p.m.
SLIP6 have nothing to do with CSLIP so placing a block of
SLIP6-related code within a CSLIP ifdef-endif block is incorrect.

Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>
---
 drivers/net/slip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - July 12, 2011, 3:28 a.m.
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Sun, 10 Jul 2011 22:49:26 +0400

> SLIP6 have nothing to do with CSLIP so placing a block of
> SLIP6-related code within a CSLIP ifdef-endif block is incorrect.
> 
> Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 8ec1a9a..2f110fb 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -182,11 +182,11 @@  static int sl_alloc_bufs(struct slip *sl, int mtu)
 #ifdef SL_INCLUDE_CSLIP
 	cbuff = xchg(&sl->cbuff, cbuff);
 	slcomp = xchg(&sl->slcomp, slcomp);
+#endif
 #ifdef CONFIG_SLIP_MODE_SLIP6
 	sl->xdata    = 0;
 	sl->xbits    = 0;
 #endif
-#endif
 	spin_unlock_bh(&sl->lock);
 	err = 0;