netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one()
@ 2013-06-02  2:23 Jean Sacren
  2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jean Sacren @ 2013-06-02  2:23 UTC (permalink / raw)
  To: netdev

Clean up unnecessary assignment and jump. While there, fix up the label
name.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 net/xfrm/xfrm_output.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 0cf003d..eb4a842 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -89,7 +89,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
 
 		err = x->type->output(x, skb);
 		if (err == -EINPROGRESS)
-			goto out_exit;
+			goto out;
 
 resume:
 		if (err) {
@@ -107,15 +107,14 @@ resume:
 		x = dst->xfrm;
 	} while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));
 
-	err = 0;
+	return 0;
 
-out_exit:
-	return err;
 error:
 	spin_unlock_bh(&x->lock);
 error_nolock:
 	kfree_skb(skb);
-	goto out_exit;
+out:
+	return err;
 }
 
 int xfrm_output_resume(struct sk_buff *skb, int err)

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

* [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  2:23 [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() Jean Sacren
@ 2013-06-02  2:23 ` Jean Sacren
  2013-06-02  2:40   ` Joe Perches
  2013-06-04 22:19   ` David Miller
  2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
  2013-06-04 22:19 ` [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() David Miller
  2 siblings, 2 replies; 13+ messages in thread
From: Jean Sacren @ 2013-06-02  2:23 UTC (permalink / raw)
  To: netdev

Clean up unnecessary initialization of enumerators as the compiler takes
care of that.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 include/linux/net.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/net.h b/include/linux/net.h
index 99c9f0c..4f27575 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -79,9 +79,9 @@ enum sock_type {
 #endif /* ARCH_HAS_SOCKET_TYPES */
 
 enum sock_shutdown_cmd {
-	SHUT_RD		= 0,
-	SHUT_WR		= 1,
-	SHUT_RDWR	= 2,
+	SHUT_RD,
+	SHUT_WR,
+	SHUT_RDWR,
 };
 
 struct socket_wq {

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

* [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
  2013-06-02  2:23 [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() Jean Sacren
  2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
@ 2013-06-02  2:23 ` Jean Sacren
  2013-06-02 10:09   ` Bjørn Mork
  2013-06-04 22:19   ` David Miller
  2013-06-04 22:19 ` [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() David Miller
  2 siblings, 2 replies; 13+ messages in thread
From: Jean Sacren @ 2013-06-02  2:23 UTC (permalink / raw)
  To: netdev

Commit 202dc3fc599c1dded235d3b448d9ca924252e354 (Documentation: remove
obsolete networking/multicast.txt file) deleted the obsolete file. After
the file has been removed, clean up a couple of places where references
to the deleted file were made so that users wouldn't be confused when
they consult the Help menu.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 net/ipv4/Kconfig | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 8603ca8..37cf1a6 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -9,10 +9,7 @@ config IP_MULTICAST
 	  intend to participate in the MBONE, a high bandwidth network on top
 	  of the Internet which carries audio and video broadcasts. More
 	  information about the MBONE is on the WWW at
-	  <http://www.savetz.com/mbone/>. Information about the multicast
-	  capabilities of the various network cards is contained in
-	  <file:Documentation/networking/multicast.txt>. For most people, it's
-	  safe to say N.
+	  <http://www.savetz.com/mbone/>. For most people, it's safe to say N.
 
 config IP_ADVANCED_ROUTER
 	bool "IP: advanced router"
@@ -223,10 +220,8 @@ config IP_MROUTE
 	  packets that have several destination addresses. It is needed on the
 	  MBONE, a high bandwidth network on top of the Internet which carries
 	  audio and video broadcasts. In order to do that, you would most
-	  likely run the program mrouted. Information about the multicast
-	  capabilities of the various network cards is contained in
-	  <file:Documentation/networking/multicast.txt>. If you haven't heard
-	  about it, you don't need it.
+	  likely run the program mrouted. If you haven't heard about it, you
+	  don't need it.
 
 config IP_MROUTE_MULTIPLE_TABLES
 	bool "IP: multicast policy routing"

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

* Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
@ 2013-06-02  2:40   ` Joe Perches
  2013-06-02  3:18     ` Jean Sacren
  2013-06-04 22:19   ` David Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Joe Perches @ 2013-06-02  2:40 UTC (permalink / raw)
  To: Jean Sacren; +Cc: netdev

On Sat, 2013-06-01 at 20:23 -0600, Jean Sacren wrote:
> Clean up unnecessary initialization of enumerators as the compiler takes
> care of that.
[]
> diff --git a/include/linux/net.h b/include/linux/net.h
[]
>  enum sock_shutdown_cmd {
> -	SHUT_RD		= 0,
> -	SHUT_WR		= 1,
> -	SHUT_RDWR	= 2,
> +	SHUT_RD,
> +	SHUT_WR,
> +	SHUT_RDWR,
>  };

The compiler may do the same thing,
but specificity is good.

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

* Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  2:40   ` Joe Perches
@ 2013-06-02  3:18     ` Jean Sacren
  2013-06-02  3:24       ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Jean Sacren @ 2013-06-02  3:18 UTC (permalink / raw)
  To: Joe Perches; +Cc: netdev

From: Joe Perches <joe@perches.com>
Date: Sat, 01 Jun 2013 19:40:03 -0700
>
> On Sat, 2013-06-01 at 20:23 -0600, Jean Sacren wrote:
> > Clean up unnecessary initialization of enumerators as the compiler takes
> > care of that.
> []
> > diff --git a/include/linux/net.h b/include/linux/net.h
> []
> >  enum sock_shutdown_cmd {
> > -	SHUT_RD		= 0,
> > -	SHUT_WR		= 1,
> > -	SHUT_RDWR	= 2,
> > +	SHUT_RD,
> > +	SHUT_WR,
> > +	SHUT_RDWR,
> >  };
> 
> The compiler may do the same thing,
> but specificity is good.

Thank you for your input. Could you elaborate on 'specificity' in this
specific case?

-- 
Jean Sacren

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

* Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  3:18     ` Jean Sacren
@ 2013-06-02  3:24       ` Joe Perches
  2013-06-02  4:05         ` Jean Sacren
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2013-06-02  3:24 UTC (permalink / raw)
  To: Jean Sacren; +Cc: netdev

On Sat, 2013-06-01 at 21:18 -0600, Jean Sacren wrote:
> From: Joe Perches <joe@perches.com>
> Date: Sat, 01 Jun 2013 19:40:03 -0700
> >
> > On Sat, 2013-06-01 at 20:23 -0600, Jean Sacren wrote:
> > > Clean up unnecessary initialization of enumerators as the compiler takes
> > > care of that.
> > []
> > > diff --git a/include/linux/net.h b/include/linux/net.h
> > []
> > >  enum sock_shutdown_cmd {
> > > -	SHUT_RD		= 0,
> > > -	SHUT_WR		= 1,
> > > -	SHUT_RDWR	= 2,
> > > +	SHUT_RD,
> > > +	SHUT_WR,
> > > +	SHUT_RDWR,
> > >  };
> > 
> > The compiler may do the same thing,
> > but specificity is good.
> 
> Thank you for your input. Could you elaborate on 'specificity' in this
> specific case?

Wpecifically, it's easier to see what the particular
SHUT_<foo> value is when you grep for without looking
through and counting the entire enum.

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

* Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  3:24       ` Joe Perches
@ 2013-06-02  4:05         ` Jean Sacren
  0 siblings, 0 replies; 13+ messages in thread
From: Jean Sacren @ 2013-06-02  4:05 UTC (permalink / raw)
  To: Joe Perches; +Cc: netdev

From: Joe Perches <joe@perches.com>
Date: Sat, 01 Jun 2013 20:24:14 -0700
>
> On Sat, 2013-06-01 at 21:18 -0600, Jean Sacren wrote:
> > From: Joe Perches <joe@perches.com>
> > Date: Sat, 01 Jun 2013 19:40:03 -0700
> > >
> > > On Sat, 2013-06-01 at 20:23 -0600, Jean Sacren wrote:
> > > > Clean up unnecessary initialization of enumerators as the compiler takes
> > > > care of that.
> > > []
> > > > diff --git a/include/linux/net.h b/include/linux/net.h
> > > []
> > > >  enum sock_shutdown_cmd {
> > > > -	SHUT_RD		= 0,
> > > > -	SHUT_WR		= 1,
> > > > -	SHUT_RDWR	= 2,
> > > > +	SHUT_RD,
> > > > +	SHUT_WR,
> > > > +	SHUT_RDWR,
> > > >  };
> > > 
> > > The compiler may do the same thing,
> > > but specificity is good.
> > 
> > Thank you for your input. Could you elaborate on 'specificity' in this
> > specific case?
> 
> Wpecifically, it's easier to see what the particular
> SHUT_<foo> value is when you grep for without looking
> through and counting the entire enum.

You don't need to look through and count. 'wc -l' shall tell and it's a
very small number.

With the specificity, it undervalues the power of the order of those
three enumerators. Nevertheless, I enjoyed learning from you and it's
better than SNL.

-- 
Jean Sacren

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

* Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
  2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
@ 2013-06-02 10:09   ` Bjørn Mork
  2013-06-02 17:28     ` Jean Sacren
  2013-06-04 22:19   ` David Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Bjørn Mork @ 2013-06-02 10:09 UTC (permalink / raw)
  To: Jean Sacren, netdev

Jean Sacren <sakiwit@gmail.com> wrote:

>diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
>index 8603ca8..37cf1a6 100644
>--- a/net/ipv4/Kconfig
>+++ b/net/ipv4/Kconfig
>@@ -9,10 +9,7 @@ config IP_MULTICAST
> 	  intend to participate in the MBONE, a high bandwidth network on top
> 	  of the Internet which carries audio and video broadcasts. More
> 	  information about the MBONE is on the WWW at
>-	  <http://www.savetz.com/mbone/>. Information about the multicast
>-	  capabilities of the various network cards is contained in
>-	  <file:Documentation/networking/multicast.txt>. For most people,
>it's
>-	  safe to say N.
>+	  <http://www.savetz.com/mbone/>. For most people, it's safe to say
>N.

This url results in a 404 error, so you might as well delete it while cleaning up this.

Bjørn 

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

* Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
  2013-06-02 10:09   ` Bjørn Mork
@ 2013-06-02 17:28     ` Jean Sacren
  2013-06-02 19:24       ` Bjørn Mork
  0 siblings, 1 reply; 13+ messages in thread
From: Jean Sacren @ 2013-06-02 17:28 UTC (permalink / raw)
  To: Bjørn Mork; +Cc: netdev

From: Bjørn Mork <bjorn@mork.no>
Date: Sun, 02 Jun 2013 12:09:40 +0200
>
> Jean Sacren <sakiwit@gmail.com> wrote:
> 
> >diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> >index 8603ca8..37cf1a6 100644
> >--- a/net/ipv4/Kconfig
> >+++ b/net/ipv4/Kconfig
> >@@ -9,10 +9,7 @@ config IP_MULTICAST
> > 	  intend to participate in the MBONE, a high bandwidth network on top
> > 	  of the Internet which carries audio and video broadcasts. More
> > 	  information about the MBONE is on the WWW at
> >-	  <http://www.savetz.com/mbone/>. Information about the multicast
> >-	  capabilities of the various network cards is contained in
> >-	  <file:Documentation/networking/multicast.txt>. For most people,
> >it's
> >-	  safe to say N.
> >+	  <http://www.savetz.com/mbone/>. For most people, it's safe to say
> >N.
> 
> This url results in a 404 error, so you might as well delete it while cleaning up this.

I did check this URL before I submitted the patch and it worked:

	http://www.savetz.com/mbone/

I just checked again and it still works. Can you check one more time for
me, please?

-- 
Jean Sacren

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

* Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
  2013-06-02 17:28     ` Jean Sacren
@ 2013-06-02 19:24       ` Bjørn Mork
  0 siblings, 0 replies; 13+ messages in thread
From: Bjørn Mork @ 2013-06-02 19:24 UTC (permalink / raw)
  To: Jean Sacren; +Cc: netdev

Jean Sacren <sakiwit@gmail.com> writes:

> I did check this URL before I submitted the patch and it worked:
>
> 	http://www.savetz.com/mbone/
>
> I just checked again and it still works. Can you check one more time for
> me, please?

Yes, it works for me as well now. Strange. Sorry for the noise.



Bjørn

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

* Re: [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one()
  2013-06-02  2:23 [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() Jean Sacren
  2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
  2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
@ 2013-06-04 22:19 ` David Miller
  2 siblings, 0 replies; 13+ messages in thread
From: David Miller @ 2013-06-04 22:19 UTC (permalink / raw)
  To: sakiwit; +Cc: netdev

From: Jean Sacren <sakiwit@gmail.com>
Date: Sat,  1 Jun 2013 20:23:15 -0600

> Clean up unnecessary assignment and jump. While there, fix up the label
> name.
> 
> Signed-off-by: Jean Sacren <sakiwit@gmail.com>

Applied.

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

* Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
  2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
  2013-06-02  2:40   ` Joe Perches
@ 2013-06-04 22:19   ` David Miller
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2013-06-04 22:19 UTC (permalink / raw)
  To: sakiwit; +Cc: netdev

From: Jean Sacren <sakiwit@gmail.com>
Date: Sat,  1 Jun 2013 20:23:16 -0600

> Clean up unnecessary initialization of enumerators as the compiler takes
> care of that.
> 
> Signed-off-by: Jean Sacren <sakiwit@gmail.com>

Applied.

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

* Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
  2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
  2013-06-02 10:09   ` Bjørn Mork
@ 2013-06-04 22:19   ` David Miller
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2013-06-04 22:19 UTC (permalink / raw)
  To: sakiwit; +Cc: netdev

From: Jean Sacren <sakiwit@gmail.com>
Date: Sat,  1 Jun 2013 20:23:17 -0600

> Commit 202dc3fc599c1dded235d3b448d9ca924252e354 (Documentation: remove
> obsolete networking/multicast.txt file) deleted the obsolete file. After
> the file has been removed, clean up a couple of places where references
> to the deleted file were made so that users wouldn't be confused when
> they consult the Help menu.
> 
> Signed-off-by: Jean Sacren <sakiwit@gmail.com>

Applied.

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

end of thread, other threads:[~2013-06-04 22:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02  2:23 [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() Jean Sacren
2013-06-02  2:23 ` [PATCH net-next 2/3] net: do not manually initialize enumerators Jean Sacren
2013-06-02  2:40   ` Joe Perches
2013-06-02  3:18     ` Jean Sacren
2013-06-02  3:24       ` Joe Perches
2013-06-02  4:05         ` Jean Sacren
2013-06-04 22:19   ` David Miller
2013-06-02  2:23 ` [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file Jean Sacren
2013-06-02 10:09   ` Bjørn Mork
2013-06-02 17:28     ` Jean Sacren
2013-06-02 19:24       ` Bjørn Mork
2013-06-04 22:19   ` David Miller
2013-06-04 22:19 ` [PATCH net-next 1/3] xfrm: simplify the exit path of xfrm_output_one() 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).