public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Janusz Wolak <januszvdm@gmail.com>
To: davem@davemloft.net, fabf@skynet.be
Cc: linux-kernel@vger.kernel.org
Subject: Net: core dev_ioctl.c coding style fixes
Date: Tue, 15 Sep 2015 22:22:30 +0200	[thread overview]
Message-ID: <55F87E06.1060107@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 0001-Remove-missing-blank-lines-after-declarations-remove.patch --]
[-- Type: text/x-patch, Size: 3593 bytes --]

>From 089ca09ee90eb10f546bfb5bb80bca18616e9721 Mon Sep 17 00:00:00 2001
From: Janusz Wolak <januszvdm@gmail.com>
Date: Tue, 15 Sep 2015 21:23:52 +0200
Subject: [PATCH] Remove missing blank lines after declarations, remove spaces
 before tabs, remove lines over 80, insert * on subsequent lines, insert
 trailing */ on a separate lines.

Signed-off-by: Janusz Wolak <januszvdm@gmail.com>
---
 net/core/dev_ioctl.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index b94b1d2..a3784ad 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -92,6 +92,7 @@ static int dev_ifconf(struct net *net, char __user *arg)
 		for (i = 0; i < NPROTO; i++) {
 			if (gifconf_list[i]) {
 				int done;
+
 				if (!pos)
 					done = gifconf_list[i](dev, NULL, 0);
 				else
@@ -110,7 +111,7 @@ static int dev_ifconf(struct net *net, char __user *arg)
 	ifc.ifc_len = total;
 
 	/*
-	 * 	Both BSD and Solaris return 0 here, so we do too.
+	 *	Both BSD and Solaris return 0 here, so we do too.
 	 */
 	return copy_to_user(arg, &ifc, sizeof(struct ifconf)) ? -EFAULT : 0;
 }
@@ -118,7 +119,8 @@ static int dev_ifconf(struct net *net, char __user *arg)
 /*
  *	Perform the SIOCxIFxxx calls, inside rcu_read_lock()
  */
-static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd)
+static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr,
+			     unsigned int cmd)
 {
 	int err;
 	struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name);
@@ -132,7 +134,8 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
 		return 0;
 
 	case SIOCGIFMETRIC:	/* Get the metric on the interface
-				   (currently unused) */
+				 * (currently unused)
+				 */
 		ifr->ifr_metric = 0;
 		return 0;
 
@@ -254,7 +257,8 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
 		return dev_change_flags(dev, ifr->ifr_flags);
 
 	case SIOCSIFMETRIC:	/* Set the metric on the interface
-				   (currently unused) */
+				 * (currently unused)
+				 */
 		return -EOPNOTSUPP;
 
 	case SIOCSIFMTU:	/* Set the MTU of a device */
@@ -347,7 +351,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
 }
 
 /**
- *	dev_load 	- load a network module
+ *	dev_load - load a network module
  *	@net: the applicable net namespace
  *	@name: name of interface
  *
@@ -374,8 +378,8 @@ void dev_load(struct net *net, const char *name)
 EXPORT_SYMBOL(dev_load);
 
 /*
- *	This function handles all "interface"-type I/O control requests. The actual
- *	'doing' part of this is dev_ifsioc above.
+ *	This function handles all "interface"-type I/O control requests.
+ *	The actual 'doing' part of this is dev_ifsioc above.
  */
 
 /**
@@ -397,8 +401,8 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
 	char *colon;
 
 	/* One special case: SIOCGIFCONF takes ifconf argument
-	   and requires shared lock, because it sleeps writing
-	   to user space.
+	 * and requires shared lock, because it sleeps writing
+	 * to user space.
 	 */
 
 	if (cmd == SIOCGIFCONF) {
@@ -535,10 +539,12 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
 
 	case SIOCGIFMEM:
 		/* Get the per device memory space. We can add this but
-		 * currently do not support it */
+		 * currently do not support it
+		 */
 	case SIOCSIFMEM:
 		/* Set the per device memory buffer space.
-		 * Not applicable in our case */
+		 * Not applicable in our case
+		 */
 	case SIOCSIFLINK:
 		return -ENOTTY;
 
-- 
1.9.1


                 reply	other threads:[~2015-09-15 20:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=55F87E06.1060107@gmail.com \
    --to=januszvdm@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@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