diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-06-10 09:05:51 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-06-10 09:05:51 +0000 |
commit | 7b39c7666012a62e7d3a381dc71e5101898dc19a (patch) | |
tree | 47485b07848d2944e53deec262da630d7fa48bd6 /target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch | |
parent | 29a33c9e0a811c77e96450bcbadb4dfb9b8337a9 (diff) | |
download | upstream-7b39c7666012a62e7d3a381dc71e5101898dc19a.tar.gz upstream-7b39c7666012a62e7d3a381dc71e5101898dc19a.tar.bz2 upstream-7b39c7666012a62e7d3a381dc71e5101898dc19a.zip |
atheros: various braces fixes
Fix braces location, remove unnecessary empty lines before or after code
block, remove useless braces. All cases are detected by checkpatch.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41087 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch')
-rw-r--r-- | target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch index 38b29691bf..13ae8a4e27 100644 --- a/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch @@ -32,7 +32,7 @@ +obj-$(CONFIG_NET_VENDOR_AR231X) += ar231x.o --- /dev/null +++ b/drivers/net/ethernet/ar231x/ar231x.c -@@ -0,0 +1,1266 @@ +@@ -0,0 +1,1260 @@ +/* + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * @@ -535,7 +535,6 @@ + + add_timer(&sp->link_timer); + return 0; -+ +} + +static void ar231x_link_timer_fn(unsigned long data) @@ -554,11 +553,10 @@ + * Loop faster when we don't have link. + * This was needed to speed up the AP bootstrap time. + */ -+ if (sp->link == 0) { ++ if (sp->link == 0) + mod_timer(&sp->link_timer, jiffies + HZ / 2); -+ } else { ++ else + mod_timer(&sp->link_timer, jiffies + LINK_TIMER); -+ } +} + +static void ar231x_check_link(struct net_device *dev) @@ -764,7 +762,6 @@ + */ +static void ar231x_load_rx_ring(struct net_device *dev, int nr_bufs) +{ -+ + struct ar231x_private *sp = netdev_priv(dev); + short i, idx; + @@ -824,9 +821,9 @@ + + /* process at most the entire ring and then wait for another int */ + while (1) { -+ + rxdesc = &sp->rx_ring[idx]; + status = rxdesc->status; ++ + if (status & DMA_RX_OWN) { + /* SiByte owns descriptor or descr not yet filled in */ + rval = 0; @@ -858,7 +855,6 @@ + /* alloc new buffer. */ + skb_new = netdev_alloc_skb_ip_align(dev, AR2313_BUFSIZE); + if (skb_new != NULL) { -+ + skb = sp->rx_skb[idx]; + /* set skb */ + skb_put(skb, @@ -953,9 +949,8 @@ + struct net_device *dev = (struct net_device *) data; + struct ar231x_private *sp = netdev_priv(dev); + -+ if (sp->unloading) { ++ if (sp->unloading) + return; -+ } + + if (ar231x_rx_int(dev)) { + tasklet_hi_schedule(&sp->rx_tasklet); @@ -1005,9 +1000,9 @@ + } + + /* abnormal status */ -+ if (status & (DMA_STATUS_FBE | DMA_STATUS_TPS)) { ++ if (status & (DMA_STATUS_FBE | DMA_STATUS_TPS)) + ar231x_restart(dev); -+ } ++ + return IRQ_HANDLED; +} + @@ -1156,7 +1151,6 @@ + int ret; + + switch (cmd) { -+ + case SIOCETHTOOL: + spin_lock_irq(&sp->lock); + ret = phy_ethtool_ioctl(sp->phy_dev, (void *) ifr->ifr_data); |