1
0
Fork 0

Coding style correction of some wan drivers

Added a space separating some if/switch/while keywords from the following
parenthesis to conform to the CodingStyle.

Signed-off-by: Rudy Matela <rudy.matela@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Rudy Matela 2009-12-09 11:35:40 -03:00 committed by Jiri Kosina
parent 7e2a10836c
commit 640462cbd6
3 changed files with 11 additions and 11 deletions

View File

@ -811,7 +811,7 @@ static ssize_t cosa_read(struct file *file,
cosa_enable_rx(chan); cosa_enable_rx(chan);
spin_lock_irqsave(&cosa->lock, flags); spin_lock_irqsave(&cosa->lock, flags);
add_wait_queue(&chan->rxwaitq, &wait); add_wait_queue(&chan->rxwaitq, &wait);
while(!chan->rx_status) { while (!chan->rx_status) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
spin_unlock_irqrestore(&cosa->lock, flags); spin_unlock_irqrestore(&cosa->lock, flags);
schedule(); schedule();
@ -896,7 +896,7 @@ static ssize_t cosa_write(struct file *file,
spin_lock_irqsave(&cosa->lock, flags); spin_lock_irqsave(&cosa->lock, flags);
add_wait_queue(&chan->txwaitq, &wait); add_wait_queue(&chan->txwaitq, &wait);
while(!chan->tx_status) { while (!chan->tx_status) {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
spin_unlock_irqrestore(&cosa->lock, flags); spin_unlock_irqrestore(&cosa->lock, flags);
schedule(); schedule();
@ -1153,7 +1153,7 @@ static int cosa_ioctl_common(struct cosa_data *cosa,
struct channel_data *channel, unsigned int cmd, unsigned long arg) struct channel_data *channel, unsigned int cmd, unsigned long arg)
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
switch(cmd) { switch (cmd) {
case COSAIORSET: /* Reset the device */ case COSAIORSET: /* Reset the device */
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EACCES; return -EACCES;
@ -1704,7 +1704,7 @@ static inline void tx_interrupt(struct cosa_data *cosa, int status)
spin_unlock_irqrestore(&cosa->lock, flags); spin_unlock_irqrestore(&cosa->lock, flags);
return; return;
} }
while(1) { while (1) {
cosa->txchan++; cosa->txchan++;
i++; i++;
if (cosa->txchan >= cosa->nchannels) if (cosa->txchan >= cosa->nchannels)
@ -2010,7 +2010,7 @@ again:
static void debug_status_in(struct cosa_data *cosa, int status) static void debug_status_in(struct cosa_data *cosa, int status)
{ {
char *s; char *s;
switch(status & SR_CMD_FROM_SRP_MASK) { switch (status & SR_CMD_FROM_SRP_MASK) {
case SR_UP_REQUEST: case SR_UP_REQUEST:
s = "RX_REQ"; s = "RX_REQ";
break; break;

View File

@ -141,7 +141,7 @@ static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev)
data->address != CISCO_UNICAST) data->address != CISCO_UNICAST)
return cpu_to_be16(ETH_P_HDLC); return cpu_to_be16(ETH_P_HDLC);
switch(data->protocol) { switch (data->protocol) {
case cpu_to_be16(ETH_P_IP): case cpu_to_be16(ETH_P_IP):
case cpu_to_be16(ETH_P_IPX): case cpu_to_be16(ETH_P_IPX):
case cpu_to_be16(ETH_P_IPV6): case cpu_to_be16(ETH_P_IPV6):
@ -190,7 +190,7 @@ static int cisco_rx(struct sk_buff *skb)
cisco_data = (struct cisco_packet*)(skb->data + sizeof cisco_data = (struct cisco_packet*)(skb->data + sizeof
(struct hdlc_header)); (struct hdlc_header));
switch(ntohl (cisco_data->type)) { switch (ntohl (cisco_data->type)) {
case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */
in_dev = dev->ip_ptr; in_dev = dev->ip_ptr;
addr = 0; addr = 0;
@ -245,8 +245,8 @@ static int cisco_rx(struct sk_buff *skb)
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
return NET_RX_SUCCESS; return NET_RX_SUCCESS;
} /* switch(keepalive type) */ } /* switch (keepalive type) */
} /* switch(protocol) */ } /* switch (protocol) */
printk(KERN_INFO "%s: Unsupported protocol %x\n", dev->name, printk(KERN_INFO "%s: Unsupported protocol %x\n", dev->name,
ntohs(data->protocol)); ntohs(data->protocol));

View File

@ -202,10 +202,10 @@ static int x25_ioctl(struct net_device *dev, struct ifreq *ifr)
return 0; /* return protocol only, no settable parameters */ return 0; /* return protocol only, no settable parameters */
case IF_PROTO_X25: case IF_PROTO_X25:
if(!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EPERM; return -EPERM;
if(dev->flags & IFF_UP) if (dev->flags & IFF_UP)
return -EBUSY; return -EBUSY;
result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT); result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT);