ocfs2: adjust switch_case syntax at o2net_state_change()
PATCH 4/4 ocfs2: adjust switch_case syntax at o2net_state_change()
From: Jie Liu <[email protected]>
Adjust switch..case syntax at o2net_state_change to meet the kernel coding standard.
s/printk/pr_info/.
--- fs/ocfs2/cluster/tcp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
fs/ocfs2/cluster/tcp.c +13 -13
@@ -630,19 +630,19 @@ static void o2net_state_change(struct sock *sk) state_change = sc->sc_state_change;switch (sk->sk_state) { -/* ignore connecting sockets as they make progress */ -case TCP_SYN_SENT : -case TCP_SYN_RECV : -break ; -case TCP_ESTABLISHED : -o2net_sc_queue_work (sc, &sc->sc_connect_work); -break ; -default : -printk (KERN_INFO "o2net: Connection to " SC_NODEF_FMT -" shutdown, state %d\n" , -SC_NODEF_ARGS (sc), sk->sk_state); -o2net_sc_queue_work (sc, &sc->sc_shutdown_work); -break ; +/* ignore connecting sockets as they make progress */ +case TCP_SYN_SENT : +case TCP_SYN_RECV : +break ; +case TCP_ESTABLISHED : +o2net_sc_queue_work (sc, &sc->sc_connect_work); +break ; +default : +pr_info (KERN_INFO "o2net: Connection to " SC_NODEF_FMT +" shutdown, state %d\n" , +SC_NODEF_ARGS (sc), sk->sk_state); +o2net_sc_queue_work (sc, &sc->sc_shutdown_work); +break ; } out:read_unlock (&sk->sk_callback_lock);
Signature · 1 line
1.7.9.5
Joel Becker
maintainerPATCH 4/4 ocfs2: adjust switch_case syntax at o2net_state_change()
Quoted 8 lines · Jeff Liu
From: Jie Liu <[email protected]>
Adjust switch..case syntax at
o2net_state_changeto meet the kernel coding standard.s/printk/pr_info/.
Signed-off-by Jie Liu <[email protected]>
Switching to pr_info() hasn't been discussed as part of the
project. Let's have that conversation elsewhere.
Joel
Quoted 48 lines
--- fs/ocfs2/cluster/tcp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)fs/ocfs2/cluster/tcp.c +13
-13@@ -630,19 +630,19 @@ static void o2net_state_change(struct sock *sk) state_change = sc->sc_state_change;switch (sk->sk_state) { -/* ignore connecting sockets as they make progress */ -case TCP_SYN_SENT : -case TCP_SYN_RECV : -break ; -case TCP_ESTABLISHED : -o2net_sc_queue_work (sc, &sc->sc_connect_work); -break ; -default : -printk (KERN_INFO "o2net: Connection to " SC_NODEF_FMT -" shutdown, state %d\n" , -SC_NODEF_ARGS (sc), sk->sk_state); -o2net_sc_queue_work (sc, &sc->sc_shutdown_work); -break ; +/* ignore connecting sockets as they make progress */ +case TCP_SYN_SENT : +case TCP_SYN_RECV : +break ; +case TCP_ESTABLISHED : +o2net_sc_queue_work (sc, &sc->sc_connect_work); +break ; +default : +pr_info (KERN_INFO "o2net: Connection to " SC_NODEF_FMT +" shutdown, state %d\n" , +SC_NODEF_ARGS (sc), sk->sk_state); +o2net_sc_queue_work (sc, &sc->sc_shutdown_work); +break ; } out:read_unlock (&sk->sk_callback_lock);Signature · 6 lines
1.7.9.5 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 6 lines
Life's Little Instruction Book #3 "Watch a sunrise at least once a year." http://www.jlbec.org/ jlbec at evilplan.org
PATCH 4/4 ocfs2: adjust switch_case syntax at o2net_state_change()
Quoted 6 lines · On Mon, 1 Jul 2013 16:04:21 -0700 Joel Becker <[email protected]> wrote:
Quoted 5 lines · Jeff Liu
From: Jie Liu <[email protected]>
Adjust switch..case syntax at
o2net_state_changeto meet the kernel coding standard.
Quoted 7 lines
Quoted 3 lines
s/printk/pr_info/.
Signed-off-by Jie Liu <[email protected]>Switching to
pr_info()hasn't been discussed as part of the
project. Let's have that conversation elsewhere.
I reverted that bit.
It was wrong anyway:
Quoted 3 lines
fs/ocfs2/cluster/tcp.c static void o2net_state_change(struct sock *sk) · line 643
Quoted 3 lines
fs/ocfs2/cluster/tcp.c +3
-0+pr_info (KERN_INFO "o2net: Connection to " SC_NODEF_FMT +" shutdown, state %d\n" , +SC_NODEF_ARGS (sc), sk->sk_state);
Should remove the "KERN_INFO " now.
Switching to pr_foo is a good idea, I find. A nice thing about it is that it reduces the length of the lines quite a lot, and printk statements are often quite long lines. The net effect is that a *lot* of nasty make-it-fit-in-80-columns tricks just vanish.
Joel Becker
maintainerPATCH 4/4 ocfs2: adjust switch_case syntax at o2net_state_change()
Quoted 27 lines · Andrew Morton
Quoted 6 lines · On Mon, 1 Jul 2013 16:04:21 -0700 Joel Becker <[email protected]> wrote:
Quoted 5 lines · Jeff Liu
From: Jie Liu <[email protected]>
Adjust switch..case syntax at
o2net_state_changeto meet the kernel coding standard.Quoted 7 lines
Quoted 3 lines
s/printk/pr_info/.
Signed-off-by Jie Liu <[email protected]>Switching to
pr_info()hasn't been discussed as part of the
project. Let's have that conversation elsewhere.I reverted that bit.
It was wrong anyway:
Quoted 3 lines
fs/ocfs2/cluster/tcp.c static void o2net_state_change(struct sock *sk) · line 643
Quoted 3 lines
fs/ocfs2/cluster/tcp.c +3
-0+pr_info (KERN_INFO "o2net: Connection to " SC_NODEF_FMT +" shutdown, state %d\n" , +SC_NODEF_ARGS (sc), sk->sk_state);Should remove the "
KERN_INFO" now.
Quoted 4 lines
Switching to
pr_foois a good idea, I find. A nice thing about it is that it reduces the length of the lines quite a lot, and printk statements are often quite long lines. The net effect is that a *lot* of nasty make-it-fit-in-80-columns tricks just vanish.
That's good to know.
Joel
Signature · 6 lines
"Maybe the time has drawn the faces I recall. But things in this life change very slowly, If they ever change at all." http://www.jlbec.org/ jlbec at evilplan.org