* Net: core dev_ioctl.c coding style fixes
@ 2015-09-15 20:22 Janusz Wolak
0 siblings, 0 replies; only message in thread
From: Janusz Wolak @ 2015-09-15 20:22 UTC (permalink / raw)
To: davem, fabf; +Cc: linux-kernel
[-- 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-15 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 20:22 Net: core dev_ioctl.c coding style fixes Janusz Wolak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.