Thread (14 messages) flat view 14 messages, 3 authors, 2017-01-19

Re: [PATCHv2 3/7] TAP: Tap character device creation/destroy API

From: David Miller <davem@davemloft.net>
Date: 2017-01-18 21:26:50
Also in: lkml

From: Sainath Grandhi <redacted>
Date: Tue, 17 Jan 2017 16:03:02 -0800
+int tap_create_cdev(struct cdev *tap_cdev,
+		    dev_t *tap_major, const char *device_name)
+{
+	int err;
+
+	err = alloc_chrdev_region(tap_major, 0, TAP_NUM_DEVS, device_name);
+
+	if (err)
+		goto out1;
No need to have an empty line between the alloc_chrdev_region() call
and the "if (err)" test.
quoted hunk ↗ jump to hunk
diff --git a/include/linux/if_tap.h b/include/linux/if_tap.h
index d887aaa..a2dfd90 100644
--- a/include/linux/if_tap.h
+++ b/include/linux/if_tap.h
@@ -10,7 +10,7 @@ struct file;
 struct socket;
 static inline struct socket *tap_get_socket(struct file *f)
 {
-        return ERR_PTR(-EINVAL);
+	return ERR_PTR(-EINVAL);
 }
Instead of having to fix up the indentation here, get it right in the first place
in patch #2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help