Commit 6b6dd498 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net/atm/pvc.c: checkpatch cleanups

Spacing cleanups
Mostly 80 column wrapped.
Move trailing statements to new lines
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 07367adb
...@@ -17,32 +17,35 @@ ...@@ -17,32 +17,35 @@
#include "common.h" /* common for PVCs and SVCs */ #include "common.h" /* common for PVCs and SVCs */
static int pvc_shutdown(struct socket *sock,int how) static int pvc_shutdown(struct socket *sock, int how)
{ {
return 0; return 0;
} }
static int pvc_bind(struct socket *sock, struct sockaddr *sockaddr,
static int pvc_bind(struct socket *sock,struct sockaddr *sockaddr, int sockaddr_len)
int sockaddr_len)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct sockaddr_atmpvc *addr; struct sockaddr_atmpvc *addr;
struct atm_vcc *vcc; struct atm_vcc *vcc;
int error; int error;
if (sockaddr_len != sizeof(struct sockaddr_atmpvc)) return -EINVAL; if (sockaddr_len != sizeof(struct sockaddr_atmpvc))
addr = (struct sockaddr_atmpvc *) sockaddr; return -EINVAL;
if (addr->sap_family != AF_ATMPVC) return -EAFNOSUPPORT; addr = (struct sockaddr_atmpvc *)sockaddr;
if (addr->sap_family != AF_ATMPVC)
return -EAFNOSUPPORT;
lock_sock(sk); lock_sock(sk);
vcc = ATM_SD(sock); vcc = ATM_SD(sock);
if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) { if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) {
error = -EBADFD; error = -EBADFD;
goto out; goto out;
} }
if (test_bit(ATM_VF_PARTIAL,&vcc->flags)) { if (test_bit(ATM_VF_PARTIAL, &vcc->flags)) {
if (vcc->vpi != ATM_VPI_UNSPEC) addr->sap_addr.vpi = vcc->vpi; if (vcc->vpi != ATM_VPI_UNSPEC)
if (vcc->vci != ATM_VCI_UNSPEC) addr->sap_addr.vci = vcc->vci; addr->sap_addr.vpi = vcc->vpi;
if (vcc->vci != ATM_VCI_UNSPEC)
addr->sap_addr.vci = vcc->vci;
} }
error = vcc_connect(sock, addr->sap_addr.itf, addr->sap_addr.vpi, error = vcc_connect(sock, addr->sap_addr.itf, addr->sap_addr.vpi,
addr->sap_addr.vci); addr->sap_addr.vci);
...@@ -51,11 +54,10 @@ static int pvc_bind(struct socket *sock,struct sockaddr *sockaddr, ...@@ -51,11 +54,10 @@ static int pvc_bind(struct socket *sock,struct sockaddr *sockaddr,
return error; return error;
} }
static int pvc_connect(struct socket *sock, struct sockaddr *sockaddr,
static int pvc_connect(struct socket *sock,struct sockaddr *sockaddr, int sockaddr_len, int flags)
int sockaddr_len,int flags)
{ {
return pvc_bind(sock,sockaddr,sockaddr_len); return pvc_bind(sock, sockaddr, sockaddr_len);
} }
static int pvc_setsockopt(struct socket *sock, int level, int optname, static int pvc_setsockopt(struct socket *sock, int level, int optname,
...@@ -70,7 +72,6 @@ static int pvc_setsockopt(struct socket *sock, int level, int optname, ...@@ -70,7 +72,6 @@ static int pvc_setsockopt(struct socket *sock, int level, int optname,
return error; return error;
} }
static int pvc_getsockopt(struct socket *sock, int level, int optname, static int pvc_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen) char __user *optval, int __user *optlen)
{ {
...@@ -83,16 +84,16 @@ static int pvc_getsockopt(struct socket *sock, int level, int optname, ...@@ -83,16 +84,16 @@ static int pvc_getsockopt(struct socket *sock, int level, int optname,
return error; return error;
} }
static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr,
static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr, int *sockaddr_len, int peer)
int *sockaddr_len,int peer)
{ {
struct sockaddr_atmpvc *addr; struct sockaddr_atmpvc *addr;
struct atm_vcc *vcc = ATM_SD(sock); struct atm_vcc *vcc = ATM_SD(sock);
if (!vcc->dev || !test_bit(ATM_VF_ADDR,&vcc->flags)) return -ENOTCONN; if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags))
return -ENOTCONN;
*sockaddr_len = sizeof(struct sockaddr_atmpvc); *sockaddr_len = sizeof(struct sockaddr_atmpvc);
addr = (struct sockaddr_atmpvc *) sockaddr; addr = (struct sockaddr_atmpvc *)sockaddr;
addr->sap_family = AF_ATMPVC; addr->sap_family = AF_ATMPVC;
addr->sap_addr.itf = vcc->dev->number; addr->sap_addr.itf = vcc->dev->number;
addr->sap_addr.vpi = vcc->vpi; addr->sap_addr.vpi = vcc->vpi;
...@@ -100,7 +101,6 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr, ...@@ -100,7 +101,6 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr,
return 0; return 0;
} }
static const struct proto_ops pvc_proto_ops = { static const struct proto_ops pvc_proto_ops = {
.family = PF_ATMPVC, .family = PF_ATMPVC,
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -137,7 +137,6 @@ static int pvc_create(struct net *net, struct socket *sock, int protocol, ...@@ -137,7 +137,6 @@ static int pvc_create(struct net *net, struct socket *sock, int protocol,
return vcc_create(net, sock, protocol, PF_ATMPVC); return vcc_create(net, sock, protocol, PF_ATMPVC);
} }
static const struct net_proto_family pvc_family_ops = { static const struct net_proto_family pvc_family_ops = {
.family = PF_ATMPVC, .family = PF_ATMPVC,
.create = pvc_create, .create = pvc_create,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment