* [PATCH] slip: fix wrong SLIP6 ifdef-endif placing
@ 2011-07-10 18:32 Matvejchikov Ilya
2011-07-10 18:37 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Matvejchikov Ilya @ 2011-07-10 18:32 UTC (permalink / raw)
To: netdev
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 | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 8ec1a9a..1ce6e08 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;
@@ -194,8 +194,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu)
err_exit:
#ifdef SL_INCLUDE_CSLIP
kfree(cbuff);
- if (slcomp)
- slhc_free(slcomp);
+ slhc_free(slcomp);
#endif
kfree(xbuff);
kfree(rbuff);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] slip: fix wrong SLIP6 ifdef-endif placing
2011-07-10 18:32 [PATCH] slip: fix wrong SLIP6 ifdef-endif placing Matvejchikov Ilya
@ 2011-07-10 18:37 ` David Miller
2011-07-10 18:49 ` Matvejchikov Ilya
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-07-10 18:37 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Sun, 10 Jul 2011 22:32:55 +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>
...
> @@ -194,8 +194,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu)
> err_exit:
> #ifdef SL_INCLUDE_CSLIP
> kfree(cbuff);
> - if (slcomp)
> - slhc_free(slcomp);
> + slhc_free(slcomp);
> #endif
The change in this hunk has nothing to do with what you
claim to be doing in your commit message.
Don't mix unrelated changes together.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] slip: fix wrong SLIP6 ifdef-endif placing
2011-07-10 18:37 ` David Miller
@ 2011-07-10 18:49 ` Matvejchikov Ilya
2011-07-12 3:28 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Matvejchikov Ilya @ 2011-07-10 18:49 UTC (permalink / raw)
To: David Miller; +Cc: netdev
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(-)
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] slip: fix wrong SLIP6 ifdef-endif placing
2011-07-10 18:49 ` Matvejchikov Ilya
@ 2011-07-12 3:28 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-07-12 3:28 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-12 3:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-10 18:32 [PATCH] slip: fix wrong SLIP6 ifdef-endif placing Matvejchikov Ilya
2011-07-10 18:37 ` David Miller
2011-07-10 18:49 ` Matvejchikov Ilya
2011-07-12 3:28 ` David Miller
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).