Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tun: Fix code style issues in <linux/if_tun.h>

This fixes the following code style problem:
- WARNING: please, no spaces at the start of a line
- CHECK: Please use a blank line after
function/struct/union/enum declarations

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yunjian Wang and committed by
David S. Miller
bd8a8d5e 3907f1ff

+13 -3
+13 -3
include/linux/if_tun.h
··· 27 27 #if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE) 28 28 struct socket *tun_get_socket(struct file *); 29 29 struct ptr_ring *tun_get_tx_ring(struct file *file); 30 + 30 31 static inline bool tun_is_xdp_frame(void *ptr) 31 32 { 32 - return (unsigned long)ptr & TUN_XDP_FLAG; 33 + return (unsigned long)ptr & TUN_XDP_FLAG; 33 34 } 35 + 34 36 static inline void *tun_xdp_to_ptr(struct xdp_frame *xdp) 35 37 { 36 - return (void *)((unsigned long)xdp | TUN_XDP_FLAG); 38 + return (void *)((unsigned long)xdp | TUN_XDP_FLAG); 37 39 } 40 + 38 41 static inline struct xdp_frame *tun_ptr_to_xdp(void *ptr) 39 42 { 40 - return (void *)((unsigned long)ptr & ~TUN_XDP_FLAG); 43 + return (void *)((unsigned long)ptr & ~TUN_XDP_FLAG); 41 44 } 45 + 42 46 void tun_ptr_free(void *ptr); 43 47 #else 44 48 #include <linux/err.h> 45 49 #include <linux/errno.h> 46 50 struct file; 47 51 struct socket; 52 + 48 53 static inline struct socket *tun_get_socket(struct file *f) 49 54 { 50 55 return ERR_PTR(-EINVAL); 51 56 } 57 + 52 58 static inline struct ptr_ring *tun_get_tx_ring(struct file *f) 53 59 { 54 60 return ERR_PTR(-EINVAL); 55 61 } 62 + 56 63 static inline bool tun_is_xdp_frame(void *ptr) 57 64 { 58 65 return false; 59 66 } 67 + 60 68 static inline void *tun_xdp_to_ptr(struct xdp_frame *xdp) 61 69 { 62 70 return NULL; 63 71 } 72 + 64 73 static inline struct xdp_frame *tun_ptr_to_xdp(void *ptr) 65 74 { 66 75 return NULL; 67 76 } 77 + 68 78 static inline void tun_ptr_free(void *ptr) 69 79 { 70 80 }