mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-hams@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 09/12] netrom:  Reduce switch/case indent
Date: Fri,  1 Jul 2011 12:43:10 -0700	[thread overview]
Message-ID: <0e287994408ee50d5f10170e0c14e625faa6625e.1309549244.git.joe@perches.com> (raw)
In-Reply-To: <cover.1309549243.git.joe@perches.com>

Make the case labels the same indent as the switch.

git diff -w shows code on same line as case moved
to separate lines and a "/* Fallthrough */" comment
added where appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/netrom/nr_route.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 44059d0..cd5ddb2 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -257,9 +257,12 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic,
 	case 3:
 		if (nr_node->routes[1].quality > nr_node->routes[0].quality) {
 			switch (nr_node->which) {
-				case 0:  nr_node->which = 1; break;
-				case 1:  nr_node->which = 0; break;
-				default: break;
+			case 0:
+				nr_node->which = 1;
+				break;
+			case 1:
+				nr_node->which = 0;
+				break;
 			}
 			nr_route           = nr_node->routes[0];
 			nr_node->routes[0] = nr_node->routes[1];
@@ -505,12 +508,13 @@ static int nr_dec_obs(void)
 				s->count--;
 
 				switch (i) {
-					case 0:
-						s->routes[0] = s->routes[1];
-					case 1:
-						s->routes[1] = s->routes[2];
-					case 2:
-						break;
+				case 0:
+					s->routes[0] = s->routes[1];
+					/* Fallthrough */
+				case 1:
+					s->routes[1] = s->routes[2];
+				case 2:
+					break;
 				}
 				break;
 
-- 
1.7.6.rc1


  parent reply	other threads:[~2011-07-01 19:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01 19:43 [PATCH 00/12] net switch/case reformatting Joe Perches
2011-07-01 19:43 ` [PATCH 01/12] appletalk: Reduce switch/case indent Joe Perches
2011-07-01 19:43 ` [PATCH 02/12] decnet: " Joe Perches
2011-07-01 19:43 ` [PATCH 03/12] econet: " Joe Perches
2011-07-02 17:04   ` Phil Blundell
2011-07-01 19:43 ` [PATCH 04/12] ipconfig: " Joe Perches
2011-07-01 19:43 ` [PATCH 05/12] netfilter: " Joe Perches
2011-07-01 19:43 ` [PATCH 06/12] ipv4: " Joe Perches
2011-07-01 19:43 ` [PATCH 07/12] ipv6: " Joe Perches
2011-07-01 19:43 ` [PATCH 08/12] lapb: " Joe Perches
2011-07-01 19:43 ` Joe Perches [this message]
2011-07-01 19:43 ` [PATCH 10/12] sctp: " Joe Perches
2011-07-01 19:43 ` [PATCH 11/12] sunrpc: " Joe Perches
2011-07-01 19:43 ` [PATCH 12/12] x25: " Joe Perches
2011-07-01 23:15 ` [PATCH 00/12] net switch/case reformatting David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e287994408ee50d5f10170e0c14e625faa6625e.1309549244.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®