Skip to content

Commit

Permalink
CAIF: fix indentation for function arguments
Browse files Browse the repository at this point in the history
This lines up function arguments on second and subsequent lines at the
first column after the openning parenthesis of the first line.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Silviu-Mihai Popescu authored and David S. Miller committed Mar 7, 2013
1 parent b2fb4f5 commit 3bffc47
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 56 deletions.
9 changes: 5 additions & 4 deletions net/caif/caif_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,11 @@ static void dev_flowctrl(struct net_device *dev, int on)
}

void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev,
struct cflayer *link_support, int head_room,
struct cflayer **layer, int (**rcv_func)(
struct sk_buff *, struct net_device *,
struct packet_type *, struct net_device *))
struct cflayer *link_support, int head_room,
struct cflayer **layer,
int (**rcv_func)(struct sk_buff *, struct net_device *,
struct packet_type *,
struct net_device *))
{
struct caif_device_entry *caifd;
enum cfcnfg_phy_preference pref;
Expand Down
22 changes: 11 additions & 11 deletions net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ static void cfsk_put(struct cflayer *layr)

/* Packet Control Callback function called from CAIF */
static void caif_ctrl_cb(struct cflayer *layr,
enum caif_ctrlcmd flow,
int phyid)
enum caif_ctrlcmd flow,
int phyid)
{
struct caifsock *cf_sk = container_of(layr, struct caifsock, layer);
switch (flow) {
Expand Down Expand Up @@ -274,7 +274,7 @@ static void caif_check_flow_release(struct sock *sk)
* changed locking, address handling and added MSG_TRUNC.
*/
static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *m, size_t len, int flags)
struct msghdr *m, size_t len, int flags)

{
struct sock *sk = sock->sk;
Expand Down Expand Up @@ -346,8 +346,8 @@ static long caif_stream_data_wait(struct sock *sk, long timeo)
* changed locking calls, changed address handling.
*/
static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size,
int flags)
struct msghdr *msg, size_t size,
int flags)
{
struct sock *sk = sock->sk;
int copied = 0;
Expand Down Expand Up @@ -462,7 +462,7 @@ static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
* CAIF flow-on and sock_writable.
*/
static long caif_wait_for_flow_on(struct caifsock *cf_sk,
int wait_writeable, long timeo, int *err)
int wait_writeable, long timeo, int *err)
{
struct sock *sk = &cf_sk->sk;
DEFINE_WAIT(wait);
Expand Down Expand Up @@ -516,7 +516,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,

/* Copied from af_unix:unix_dgram_sendmsg, and adapted to CAIF */
static int caif_seqpkt_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
Expand Down Expand Up @@ -591,7 +591,7 @@ static int caif_seqpkt_sendmsg(struct kiocb *kiocb, struct socket *sock,
* and other minor adaptations.
*/
static int caif_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len)
struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
Expand Down Expand Up @@ -670,7 +670,7 @@ static int caif_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
}

static int setsockopt(struct socket *sock,
int lvl, int opt, char __user *ov, unsigned int ol)
int lvl, int opt, char __user *ov, unsigned int ol)
{
struct sock *sk = sock->sk;
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
Expand Down Expand Up @@ -932,7 +932,7 @@ static int caif_release(struct socket *sock)

/* Copied from af_unix.c:unix_poll(), added CAIF tx_flow handling */
static unsigned int caif_poll(struct file *file,
struct socket *sock, poll_table *wait)
struct socket *sock, poll_table *wait)
{
struct sock *sk = sock->sk;
unsigned int mask;
Expand Down Expand Up @@ -1022,7 +1022,7 @@ static void caif_sock_destructor(struct sock *sk)
}

static int caif_create(struct net *net, struct socket *sock, int protocol,
int kern)
int kern)
{
struct sock *sk = NULL;
struct caifsock *cf_sk = NULL;
Expand Down
4 changes: 2 additions & 2 deletions net/caif/caif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static int cfusbl_transmit(struct cflayer *layr, struct cfpkt *pkt)
}

static void cfusbl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
if (layr->up && layr->up->ctrlcmd)
layr->up->ctrlcmd(layr->up, ctrl, layr->id);
Expand Down Expand Up @@ -121,7 +121,7 @@ static struct packet_type caif_usb_type __read_mostly = {
};

static int cfusbl_device_notify(struct notifier_block *me, unsigned long what,
void *arg)
void *arg)
{
struct net_device *dev = arg;
struct caif_dev_common common;
Expand Down
19 changes: 9 additions & 10 deletions net/caif/cfcnfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ struct cfcnfg {
};

static void cfcnfg_linkup_rsp(struct cflayer *layer, u8 channel_id,
enum cfctrl_srv serv, u8 phyid,
struct cflayer *adapt_layer);
enum cfctrl_srv serv, u8 phyid,
struct cflayer *adapt_layer);
static void cfcnfg_linkdestroy_rsp(struct cflayer *layer, u8 channel_id);
static void cfcnfg_reject_rsp(struct cflayer *layer, u8 channel_id,
struct cflayer *adapt_layer);
struct cflayer *adapt_layer);
static void cfctrl_resp_func(void);
static void cfctrl_enum_resp(void);

Expand Down Expand Up @@ -131,7 +131,7 @@ static void cfctrl_resp_func(void)
}

static struct cfcnfg_phyinfo *cfcnfg_get_phyinfo_rcu(struct cfcnfg *cnfg,
u8 phyid)
u8 phyid)
{
struct cfcnfg_phyinfo *phy;

Expand Down Expand Up @@ -216,8 +216,8 @@ static const int protohead[CFCTRL_SRV_MASK] = {


static int caif_connect_req_to_link_param(struct cfcnfg *cnfg,
struct caif_connect_request *s,
struct cfctrl_link_param *l)
struct caif_connect_request *s,
struct cfctrl_link_param *l)
{
struct dev_info *dev_info;
enum cfcnfg_phy_preference pref;
Expand Down Expand Up @@ -301,8 +301,7 @@ static int caif_connect_req_to_link_param(struct cfcnfg *cnfg,

int caif_connect_client(struct net *net, struct caif_connect_request *conn_req,
struct cflayer *adap_layer, int *ifindex,
int *proto_head,
int *proto_tail)
int *proto_head, int *proto_tail)
{
struct cflayer *frml;
struct cfcnfg_phyinfo *phy;
Expand Down Expand Up @@ -364,7 +363,7 @@ int caif_connect_client(struct net *net, struct caif_connect_request *conn_req,
EXPORT_SYMBOL(caif_connect_client);

static void cfcnfg_reject_rsp(struct cflayer *layer, u8 channel_id,
struct cflayer *adapt_layer)
struct cflayer *adapt_layer)
{
if (adapt_layer != NULL && adapt_layer->ctrlcmd != NULL)
adapt_layer->ctrlcmd(adapt_layer,
Expand Down Expand Up @@ -526,7 +525,7 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg,
EXPORT_SYMBOL(cfcnfg_add_phy_layer);

int cfcnfg_set_phy_state(struct cfcnfg *cnfg, struct cflayer *phy_layer,
bool up)
bool up)
{
struct cfcnfg_phyinfo *phyinfo;

Expand Down
14 changes: 7 additions & 7 deletions net/caif/cfctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

#ifdef CAIF_NO_LOOP
static int handle_loop(struct cfctrl *ctrl,
int cmd, struct cfpkt *pkt){
int cmd, struct cfpkt *pkt){
return -1;
}
#else
static int handle_loop(struct cfctrl *ctrl,
int cmd, struct cfpkt *pkt);
int cmd, struct cfpkt *pkt);
#endif
static int cfctrl_recv(struct cflayer *layr, struct cfpkt *pkt);
static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
Expand Down Expand Up @@ -72,7 +72,7 @@ void cfctrl_remove(struct cflayer *layer)
}

static bool param_eq(const struct cfctrl_link_param *p1,
const struct cfctrl_link_param *p2)
const struct cfctrl_link_param *p2)
{
bool eq =
p1->linktype == p2->linktype &&
Expand Down Expand Up @@ -197,8 +197,8 @@ void cfctrl_enum_req(struct cflayer *layer, u8 physlinkid)
}

int cfctrl_linkup_request(struct cflayer *layer,
struct cfctrl_link_param *param,
struct cflayer *user_layer)
struct cfctrl_link_param *param,
struct cflayer *user_layer)
{
struct cfctrl *cfctrl = container_obj(layer);
u32 tmp32;
Expand Down Expand Up @@ -301,7 +301,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
}

int cfctrl_linkdown_req(struct cflayer *layer, u8 channelid,
struct cflayer *client)
struct cflayer *client)
{
int ret;
struct cfpkt *pkt;
Expand Down Expand Up @@ -555,7 +555,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
}

static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
struct cfctrl *this = container_obj(layr);
switch (ctrl) {
Expand Down
4 changes: 2 additions & 2 deletions net/caif/cffrml.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct cffrml {
static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt);
static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt);
static void cffrml_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid);
int phyid);

static u32 cffrml_rcv_error;
static u32 cffrml_rcv_checsum_error;
Expand Down Expand Up @@ -167,7 +167,7 @@ static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt)
}

static void cffrml_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
if (layr->up && layr->up->ctrlcmd)
layr->up->ctrlcmd(layr->up, ctrl, layr->id);
Expand Down
4 changes: 2 additions & 2 deletions net/caif/cfmuxl.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct cfmuxl {
static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt);
static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt);
static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid);
int phyid);
static struct cflayer *get_up(struct cfmuxl *muxl, u16 id);

struct cflayer *cfmuxl_create(void)
Expand Down Expand Up @@ -244,7 +244,7 @@ static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt)
}

static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
struct cfmuxl *muxl = container_obj(layr);
struct cflayer *layer;
Expand Down
8 changes: 4 additions & 4 deletions net/caif/cfpkt_skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ inline u16 cfpkt_getlen(struct cfpkt *pkt)
}

inline u16 cfpkt_iterate(struct cfpkt *pkt,
u16 (*iter_func)(u16, void *, u16),
u16 data)
u16 (*iter_func)(u16, void *, u16),
u16 data)
{
/*
* Don't care about the performance hit of linearizing,
Expand Down Expand Up @@ -307,8 +307,8 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
}

struct cfpkt *cfpkt_append(struct cfpkt *dstpkt,
struct cfpkt *addpkt,
u16 expectlen)
struct cfpkt *addpkt,
u16 expectlen)
{
struct sk_buff *dst = pkt_to_skb(dstpkt);
struct sk_buff *add = pkt_to_skb(addpkt);
Expand Down
4 changes: 2 additions & 2 deletions net/caif/cfrfml.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void cfrfml_release(struct cflayer *layer)
}

struct cflayer *cfrfml_create(u8 channel_id, struct dev_info *dev_info,
int mtu_size)
int mtu_size)
{
int tmp;
struct cfrfml *this = kzalloc(sizeof(struct cfrfml), GFP_ATOMIC);
Expand All @@ -69,7 +69,7 @@ struct cflayer *cfrfml_create(u8 channel_id, struct dev_info *dev_info,
}

static struct cfpkt *rfm_append(struct cfrfml *rfml, char *seghead,
struct cfpkt *pkt, int *err)
struct cfpkt *pkt, int *err)
{
struct cfpkt *tmppkt;
*err = -EPROTO;
Expand Down
4 changes: 2 additions & 2 deletions net/caif/cfserl.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct cfserl {
static int cfserl_receive(struct cflayer *layr, struct cfpkt *pkt);
static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);
static void cfserl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid);
int phyid);

struct cflayer *cfserl_create(int instance, bool use_stx)
{
Expand Down Expand Up @@ -182,7 +182,7 @@ static int cfserl_transmit(struct cflayer *layer, struct cfpkt *newpkt)
}

static void cfserl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
layr->up->ctrlcmd(layr->up, ctrl, phyid);
}
13 changes: 6 additions & 7 deletions net/caif/cfsrvl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define container_obj(layr) container_of(layr, struct cfsrvl, layer)

static void cfservl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
int phyid)
{
struct cfsrvl *service = container_obj(layr);

Expand Down Expand Up @@ -158,10 +158,9 @@ static void cfsrvl_release(struct cflayer *layer)
}

void cfsrvl_init(struct cfsrvl *service,
u8 channel_id,
struct dev_info *dev_info,
bool supports_flowctrl
)
u8 channel_id,
struct dev_info *dev_info,
bool supports_flowctrl)
{
caif_assert(offsetof(struct cfsrvl, layer) == 0);
service->open = false;
Expand Down Expand Up @@ -207,8 +206,8 @@ void caif_free_client(struct cflayer *adap_layer)
EXPORT_SYMBOL(caif_free_client);

void caif_client_register_refcnt(struct cflayer *adapt_layer,
void (*hold)(struct cflayer *lyr),
void (*put)(struct cflayer *lyr))
void (*hold)(struct cflayer *lyr),
void (*put)(struct cflayer *lyr))
{
struct cfsrvl *service;

Expand Down
6 changes: 3 additions & 3 deletions net/caif/chnl_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static void chnl_put(struct cflayer *lyr)
}

static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow,
int phyid)
int phyid)
{
struct chnl_net *priv = container_of(layr, struct chnl_net, chnl);
pr_debug("NET flowctrl func called flow: %s\n",
Expand Down Expand Up @@ -443,7 +443,7 @@ static int ipcaif_fill_info(struct sk_buff *skb, const struct net_device *dev)
}

static void caif_netlink_parms(struct nlattr *data[],
struct caif_connect_request *conn_req)
struct caif_connect_request *conn_req)
{
if (!data) {
pr_warn("no params data found\n");
Expand Down Expand Up @@ -488,7 +488,7 @@ static int ipcaif_newlink(struct net *src_net, struct net_device *dev,
}

static int ipcaif_changelink(struct net_device *dev, struct nlattr *tb[],
struct nlattr *data[])
struct nlattr *data[])
{
struct chnl_net *caifdev;
ASSERT_RTNL();
Expand Down

0 comments on commit 3bffc47

Please sign in to comment.