xfrm: simplify the exit path of xfrm_output_one()
Subsystems (3)
PATCH 1/3 xfrm: simplify the exit path of xfrm_output_one()
Clean up unnecessary assignment and jump. While there, fix up the label name.
--- net/xfrm/xfrm_output.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
net/xfrm/xfrm_output.c +4 -5
@@ -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)
PATCH 2/3 net: do not manually initialize enumerators
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
--- include/linux/net.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/net.h +3 -3
@@ -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 {
Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
Quoted 2 lines · Jean Sacren
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
[]
include/linux/net.h
Quoted 1 line
include/linux/net.h +0
-0
[]
include/linux/net.h enum sock_type { · line 85
Quoted 8 lines
enum
sock_shutdown_cmd{include/linux/net.h +3
-3-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.
Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
From: Joe Perches <[email protected]>
Date: Sat, 01 Jun 2013 19:40:03 -0700
Quoted 7 lines · Jean Sacren
Quoted 2 lines
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
[]
include/linux/net.h
Quoted 1 line
include/linux/net.h +0
-0[]
Quoted 11 lines
include/linux/net.h enum sock_type { · line 85
Quoted 8 lines
enum
sock_shutdown_cmd{include/linux/net.h +3
-3-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?
Signature · 1 line
Jean Sacren
Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
Quoted 21 lines · Jean Sacren
From: Joe Perches <[email protected]>
Date: Sat, 01 Jun 2013 19:40:03 -0700Quoted 7 lines · Jean Sacren
Quoted 2 lines
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
[]
include/linux/net.h
Quoted 1 line
include/linux/net.h +0
-0[]
Quoted 11 lines
include/linux/net.h enum sock_type { · line 85
Quoted 8 lines
enum
sock_shutdown_cmd{include/linux/net.h +3
-3-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.
Quoted 2 lines
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.
Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
From: Joe Perches <[email protected]>
Date: Sat, 01 Jun 2013 20:24:14 -0700
Quoted 23 lines · Jean Sacren
Quoted 21 lines
From: Joe Perches <[email protected]>
Date: Sat, 01 Jun 2013 19:40:03 -0700Quoted 18 lines · Jean Sacren
Quoted 2 lines
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
[]
include/linux/net.h
Quoted 1 line
include/linux/net.h +0
-0[]
include/linux/net.h enum sock_type { · line 85
Quoted 8 lines
enum
sock_shutdown_cmd{include/linux/net.h +3
-3-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.
Quoted 6 lines
Quoted 2 lines
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.
Signature · 1 line
Jean Sacren
Re: [PATCH net-next 2/3] net: do not manually initialize enumerators
In reply to Jean SacrenFrom: Jean Sacren <[email protected]>
Date: Sat, 1 Jun 2013 20:23:16 -0600
Quoted 4 lines
Clean up unnecessary initialization of enumerators as the compiler takes care of that.
Signed-off-by Jean Sacren <[email protected]>
Applied.
PATCH 3/3 Kconfig: remove dangling references to the deleted file
In reply to Jean SacrenCommit 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.
--- net/ipv4/Kconfig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
net/ipv4/Kconfig +3 -8
@@ -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"
Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
Quoted 14 lines · Jean Sacren
net/ipv4/Kconfig +0
-3@@ -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
net/ipv4/Kconfig +1
-1- safe to say N. + <http://www.savetz.com/mbone/>. For most people, it's safe to say
Quoted 1 line
N.
This url results in a 404 error, so you might as well delete it while cleaning up this.
Bjørn
Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
From: Bjørn Mork <[email protected]>
Date: Sun, 02 Jun 2013 12:09:40 +0200
Quoted 12 lines
Quoted 9 lines · Jean Sacren
net/ipv4/Kconfig +0
-1@@ -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
Quoted 8 lines
Quoted 6 lines
net/ipv4/Kconfig +0
-2- capabilities of the various network cards is contained in - <file:Documentation/networking/multicast.txt>. For most people,it's
net/ipv4/Kconfig +1
-1- safe to say N. + <http://www.savetz.com/mbone/>. For most people, it's safe to sayN.
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:
I just checked again and it still works. Can you check one more time for me, please?
Signature · 1 line
Jean Sacren
Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
Quoted 6 lines · Jean Sacren
I did check this URL before I submitted the patch and it worked:
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
Re: [PATCH net-next 3/3] Kconfig: remove dangling references to the deleted file
In reply to Jean SacrenFrom: Jean Sacren <[email protected]>
Date: Sat, 1 Jun 2013 20:23:17 -0600
Quoted 7 lines
Commit
202dc3fc599c1dded235d3b448d9ca924252e354(Documentation: remove obsoletenetworking/multicast.txtfile) 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 <[email protected]>
Applied.
From: Jean Sacren <[email protected]>
Date: Sat, 1 Jun 2013 20:23:15 -0600
Quoted 4 lines
Clean up unnecessary assignment and jump. While there, fix up the label name.
Signed-off-by Jean Sacren <[email protected]>
Applied.