From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH 03/12] econet: Reduce switch/case indent
Date: Fri, 1 Jul 2011 12:43:04 -0700 [thread overview]
Message-ID: <e2f659cf95b88abbdf35c7447d8a4d00d5c424dc.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.
Simplify a default case / return (unreached)
Remove unnecessary break after return.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/econet/af_econet.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index a1d9f37..5afdc8f 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -720,23 +720,20 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;
- switch(cmd) {
- case SIOCGSTAMP:
- return sock_get_timestamp(sk, argp);
+ switch (cmd) {
+ case SIOCGSTAMP:
+ return sock_get_timestamp(sk, argp);
- case SIOCGSTAMPNS:
- return sock_get_timestampns(sk, argp);
+ case SIOCGSTAMPNS:
+ return sock_get_timestampns(sk, argp);
- case SIOCSIFADDR:
- case SIOCGIFADDR:
- return ec_dev_ioctl(sock, cmd, argp);
- break;
+ case SIOCSIFADDR:
+ case SIOCGIFADDR:
+ return ec_dev_ioctl(sock, cmd, argp);
- default:
- return -ENOIOCTLCMD;
}
- /*NOTREACHED*/
- return 0;
+
+ return -ENOIOCTLCMD;
}
static const struct net_proto_family econet_family_ops = {
--
1.7.6.rc1
next prev parent reply other threads:[~2011-07-01 19:46 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 ` Joe Perches [this message]
2011-07-02 17:04 ` [PATCH 03/12] econet: " 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 ` [PATCH 09/12] netrom: " Joe Perches
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=e2f659cf95b88abbdf35c7447d8a4d00d5c424dc.1309549244.git.joe@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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®