atheros: spaces fixes
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Jun 2014 09:06:06 +0000 (09:06 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 10 Jun 2014 09:06:06 +0000 (09:06 +0000)
Add missed spaces and remove odd space as suggested by checkpatch.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41091 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/atheros/patches-3.10/100-board.patch
target/linux/atheros/patches-3.10/105-ar2315_pci.patch
target/linux/atheros/patches-3.10/110-ar2313_ethernet.patch
target/linux/atheros/patches-3.10/120-spiflash.patch
target/linux/atheros/patches-3.10/130-watchdog.patch
target/linux/atheros/patches-3.10/140-redboot_boardconfig.patch
target/linux/atheros/patches-3.10/142-redboot_various_erase_size_fix.patch
target/linux/atheros/patches-3.10/220-enet_micrel_workaround.patch
target/linux/atheros/patches-3.10/230-3_10-updates.patch

index ee60b52..33c7ce5 100644 (file)
 +              radio_config = 0;
 +      }
 +
-+      return (u8 *) radio_config;
++      return radio_config;
 +}
 +
 +int __init
 +      }
 +
 +      board_data = kzalloc(BOARD_CONFIG_BUFSZ, GFP_KERNEL);
-+      ar231x_board.config = (struct ar231x_boarddata *) board_data;
++      ar231x_board.config = (struct ar231x_boarddata *)board_data;
 +      memcpy(board_data, bcfg, 0x100);
 +      if (broken_boarddata) {
 +              pr_warn("WARNING: broken board data detected\n");
 +       * of what the physical layout on the flash chip looks like */
 +
 +      if (ar231x_board.radio)
-+              rcfg = (u8 *) ar231x_board.radio;
++              rcfg = (u8 *)ar231x_board.radio;
 +      else
 +              rcfg = find_radio_config(flash_limit, bcfg);
 +
 +
 +static const struct gpio_led_platform_data ar5312_led_data = {
 +      .num_leds = ARRAY_SIZE(ar5312_leds),
-+      .leds = (void *) ar5312_leds,
++      .leds = (void *)ar5312_leds,
 +};
 +
 +static struct platform_device ar5312_gpio_leds = {
 +      .name = "leds-gpio",
 +      .id = -1,
-+      .dev.platform_data = (void *) &ar5312_led_data,
++      .dev.platform_data = (void *)&ar5312_led_data,
 +};
 +#endif
 +
 +      ar231x_write_reg(AR531X_FLASHCTL2,
 +              ar231x_read_reg(AR531X_FLASHCTL2) & ~(FLASHCTL_E | FLASHCTL_AC));
 +
-+      return (char *) KSEG1ADDR(AR531X_FLASH + 0x800000);
++      return (char *)KSEG1ADDR(AR531X_FLASH + 0x800000);
 +}
 +
 +int __init ar5312_init_devices(void)
 +                      c--;
 +      }
 +
-+      switch(ar231x_devtype) {
++      switch (ar231x_devtype) {
 +      case DEV_TYPE_AR5312:
 +              ar5312_eth0_data.macaddr = config->enet0_mac;
 +              ar231x_add_ethernet(0, KSEG1ADDR(AR531X_ENET0),
 +      unsigned int imr;
 +
 +      imr = ar231x_read_reg(AR2315_IMR);
-+      switch(d->irq) {
++      switch (d->irq) {
 +      case AR531X_MISC_IRQ_SPI:
 +              imr |= AR2315_ISR_SPI;
 +              break;
 +      unsigned int imr;
 +
 +      imr = ar231x_read_reg(AR2315_IMR);
-+      switch(d->irq) {
++      switch (d->irq) {
 +      case AR531X_MISC_IRQ_SPI:
 +              imr &= ~AR2315_ISR_SPI;
 +              break;
 +
 +      ar2315_spiflash_res[0].end = ar2315_spiflash_res[0].start +
 +              flash_size - 1;
-+      return (u8 *) ar2315_spiflash_res[0].end + 1;
++      return (u8 *)ar2315_spiflash_res[0].end + 1;
 +}
 +
 +#ifdef CONFIG_LEDS_GPIO
 +static struct gpio_led ar2315_leds[6];
 +static struct gpio_led_platform_data ar2315_led_data = {
-+      .leds = (void *) ar2315_leds,
++      .leds = (void *)ar2315_leds,
 +};
 +
 +static struct platform_device ar2315_gpio_leds = {
 +      .name = "leds-gpio",
 +      .id = -1,
 +      .dev = {
-+              .platform_data = (void *) &ar2315_led_data,
++              .platform_data = (void *)&ar2315_led_data,
 +      }
 +};
 +
 +
 +      ar2315_led_data.num_leds = 0;
 +      for (i = 1; i < 8; i++) {
-+              if((i == AR2315_RESET_GPIO) ||
-+                 (i == ar231x_board.config->reset_config_gpio))
++              if ((i == AR2315_RESET_GPIO) ||
++                  (i == ar231x_board.config->reset_config_gpio))
 +                      continue;
 +
 +              if (i == ar231x_board.config->sys_led_gpio)
 +static void
 +ar2315_restart(char *command)
 +{
-+      void (*mips_reset_vec)(void) = (void *) 0xbfc00000;
++      void (*mips_reset_vec)(void) = (void *)0xbfc00000;
 +
 +      local_irq_disable();
 +
 +      /* try reset the system via reset control */
-+      ar231x_write_reg(AR2315_COLD_RESET,AR2317_RESET_SYSTEM);
++      ar231x_write_reg(AR2315_COLD_RESET, AR2317_RESET_SYSTEM);
 +
 +      /* Cold reset does not work on the AR2315/6, use the GPIO reset bits a workaround.
 +       * give it some time to attempt a gpio based hardware reset
 +      /* Clear any lingering AHB errors */
 +      config = read_c0_config();
 +      write_c0_config(config & ~0x3);
-+      ar231x_write_reg(AR2315_AHB_ERR0,AHB_ERROR_DET);
++      ar231x_write_reg(AR2315_AHB_ERR0, AHB_ERROR_DET);
 +      ar231x_read_reg(AR2315_AHB_ERR1);
 +      ar231x_write_reg(AR2315_WDC, AR2315_WDC_IGNORE_EXPIRATION);
 +
 +static inline u32
 +ar231x_read_reg(u32 reg)
 +{
-+      return __raw_readl((u32 *) KSEG1ADDR(reg));
++      return __raw_readl((u32 *)KSEG1ADDR(reg));
 +}
 +
 +static inline void
 +ar231x_write_reg(u32 reg, u32 val)
 +{
-+      __raw_writel(val, (u32 *) KSEG1ADDR(reg));
++      __raw_writel(val, (u32 *)KSEG1ADDR(reg));
 +}
 +
 +static inline u32
index af4bb88..2f3f809 100644 (file)
@@ -7,7 +7,7 @@
 +obj-$(CONFIG_ATHEROS_AR2315_PCI) += pci.o
 --- /dev/null
 +++ b/arch/mips/ar231x/pci.c
-@@ -0,0 +1,228 @@
+@@ -0,0 +1,229 @@
 +/*
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 +      if (write) {
 +              value = *ptr;
 +              if (size == 1)
-+                      err = put_dbe(value, (u8 *) addr);
++                      err = put_dbe(value, (u8 *)addr);
 +              else if (size == 2)
-+                      err = put_dbe(value, (u16 *) addr);
++                      err = put_dbe(value, (u16 *)addr);
 +              else if (size == 4)
-+                      err = put_dbe(value, (u32 *) addr);
++                      err = put_dbe(value, (u32 *)addr);
 +      } else {
 +              if (size == 1)
-+                      err = get_dbe(value, (u8 *) addr);
++                      err = get_dbe(value, (u8 *)addr);
 +              else if (size == 2)
-+                      err = get_dbe(value, (u16 *) addr);
++                      err = get_dbe(value, (u16 *)addr);
 +              else if (size == 4)
-+                      err = get_dbe(value, (u32 *) addr);
++                      err = get_dbe(value, (u32 *)addr);
 +              if (err)
 +                      *ptr = 0xffffffff;
 +              else
@@ -96,7 +96,8 @@
 +      return err ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
 +}
 +
-+static int ar231x_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * value)
++static int ar231x_pci_read(struct pci_bus *bus, unsigned int devfn, int where,
++                         int size, u32 *value)
 +{
 +      return config_access(devfn, where, size, value, 0);
 +}
index 128f470..1fc4eb4 100644 (file)
@@ -49,8 +49,8 @@
 + * (at your option) any later version.
 + *
 + * Additional credits:
-+ *    This code is taken from John Taylor's Sibyte driver and then
-+ *    modified for the AR2313.
++ * This code is taken from John Taylor's Sibyte driver and then
++ * modified for the AR2313.
 + */
 +
 +#include <linux/module.h>
@@ -88,7 +88,7 @@
 +
 +
 +#ifndef min
-+#define min(a,b)      (((a)<(b))?(a):(b))
++#define min(a, b)     (((a) < (b)) ? (a) : (b))
 +#endif
 +
 +#ifndef SMP_CACHE_BYTES
 +static int ar231x_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum);
 +static int ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, u16 value);
 +static int ar231x_mdiobus_reset(struct mii_bus *bus);
-+static int ar231x_mdiobus_probe (struct net_device *dev);
++static int ar231x_mdiobus_probe(struct net_device *dev);
 +static void ar231x_adjust_link(struct net_device *dev);
 +
 +#ifndef ERR
 +{
 +      struct ar231x_private *sp = netdev_priv(dev);
 +      if (sp->rx_ring != NULL) {
-+              kfree((void *) KSEG0ADDR(sp->rx_ring));
++              kfree((void *)KSEG0ADDR(sp->rx_ring));
 +              sp->rx_ring = NULL;
 +              sp->tx_ring = NULL;
 +      }
 +      dma_cache_inv((unsigned int) space, size);
 +
 +      /* now convert pointer to KSEG1 */
-+      space = (ar231x_descr_t *) KSEG1ADDR(space);
++      space = (ar231x_descr_t *)KSEG1ADDR(space);
 +
-+      memset((void *) space, 0, size);
++      memset((void *)space, 0, size);
 +
 +      sp->rx_ring = space;
 +      space += AR2313_DESCR_ENTRIES;
 +      ar231x_free_descriptors(dev);
 +
 +      if (sp->eth_regs)
-+              iounmap((void *) sp->eth_regs);
++              iounmap((void *)sp->eth_regs);
 +      if (sp->dma_regs)
-+              iounmap((void *) sp->dma_regs);
++              iounmap((void *)sp->dma_regs);
 +
 +      if (sp->rx_skb) {
 +              for (j = 0; j < AR2313_DESCR_ENTRIES; j++) {
 +
 +static void ar231x_link_timer_fn(unsigned long data)
 +{
-+      struct net_device *dev = (struct net_device *) data;
++      struct net_device *dev = (struct net_device *)data;
 +      struct ar231x_private *sp = netdev_priv(dev);
 +
 +      /**
 +              skb->dev = dev;
 +              sp->rx_skb[idx] = skb;
 +
-+              rd = (ar231x_descr_t *) & sp->rx_ring[idx];
++              rd = (ar231x_descr_t *)&sp->rx_ring[idx];
 +
 +              /* initialize dma descriptor */
 +              rd->devcs = ((AR2313_BUFSIZE << DMA_RX1_BSIZE_SHIFT) |
 +
 +static void rx_tasklet_func(unsigned long data)
 +{
-+      struct net_device *dev = (struct net_device *) data;
++      struct net_device *dev = (struct net_device *)data;
 +      struct ar231x_private *sp = netdev_priv(dev);
 +
 +      if (sp->unloading)
 +
 +static irqreturn_t ar231x_interrupt(int irq, void *dev_id)
 +{
-+      struct net_device *dev = (struct net_device *) dev_id;
++      struct net_device *dev = (struct net_device *)dev_id;
 +      struct ar231x_private *sp = netdev_priv(dev);
 +      unsigned int status, enabled;
 +
 +      switch (cmd) {
 +      case SIOCETHTOOL:
 +              spin_lock_irq(&sp->lock);
-+              ret = phy_ethtool_ioctl(sp->phy_dev, (void *) ifr->ifr_data);
++              ret = phy_ethtool_ioctl(sp->phy_dev, (void *)ifr->ifr_data);
 +              spin_unlock_irq(&sp->lock);
 +              return ret;
 +
 +      return 0;
 +}
 +
-+static int ar231x_mdiobus_probe (struct net_device *dev)
++static int ar231x_mdiobus_probe(struct net_device *dev)
 +{
 +      struct ar231x_private *const sp = netdev_priv(dev);
 +      struct phy_device *phydev = NULL;
 +              }
 +
 +      if (!phydev) {
-+              printk (KERN_ERR "ar231x: %s: no PHY found\n", dev->name);
++              printk(KERN_ERR "ar231x: %s: no PHY found\n", dev->name);
 +              return -1;
 +      }
 +
index 4705d01..a1b36ee 100644 (file)
@@ -23,7 +23,7 @@
  
 --- /dev/null
 +++ b/drivers/mtd/devices/ar2315.c
-@@ -0,0 +1,515 @@
+@@ -0,0 +1,517 @@
 +
 +/*
 + * MTD driver for the SPI Flash Memory support on Atheros AR2315
 +}
 +
 +static u32
-+spiflash_sendcmd (struct spiflash_priv *priv, int opcode, u32 addr)
++spiflash_sendcmd(struct spiflash_priv *priv, int opcode, u32 addr)
 +{
 +      const struct opcodes *op;
 +      u32 reg, mask;
 + * and flashconfig_tbl array index for success.
 + */
 +static int
-+spiflash_probe_chip (struct spiflash_priv *priv)
++spiflash_probe_chip(struct spiflash_priv *priv)
 +{
 +      u32 sig;
 +      int flash_size;
 +              schedule();
 +              remove_wait_queue(&priv->wq, &wait);
 +
-+              if(signal_pending(current))
++              if (signal_pending(current))
 +                      return 0;
 +
 +              goto retry;
 +
 +
 +static int
-+spiflash_erase (struct mtd_info *mtd, struct erase_info *instr)
++spiflash_erase(struct mtd_info *mtd, struct erase_info *instr)
 +{
 +      struct spiflash_priv *priv = to_spiflash(mtd);
 +      const struct opcodes *op;
 +}
 +
 +static int
-+spiflash_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
++spiflash_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
++            u_char *buf)
 +{
 +      struct spiflash_priv *priv = to_spiflash(mtd);
 +      u8 *read_addr;
 +}
 +
 +static int
-+spiflash_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u8 *buf)
++spiflash_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
++             const u8 *buf)
 +{
 +      struct spiflash_priv *priv = to_spiflash(mtd);
 +      u32 opcode, bytes_left;
 +}
 +
 +static int
-+spiflash_remove (struct platform_device *pdev)
++spiflash_remove(struct platform_device *pdev)
 +{
 +      struct spiflash_priv *priv = platform_get_drvdata(pdev);
 +      struct mtd_info *mtd = &priv->mtd;
 +};
 +
 +int __init
-+spiflash_init (void)
++spiflash_init(void)
 +{
 +      return platform_driver_register(&spiflash_driver);
 +}
 +
 +void __exit
-+spiflash_exit (void)
++spiflash_exit(void)
 +{
 +      return platform_driver_unregister(&spiflash_driver);
 +}
 +
-+module_init (spiflash_init);
-+module_exit (spiflash_exit);
++module_init(spiflash_init);
++module_exit(spiflash_exit);
 +
 +MODULE_LICENSE("GPL");
 +MODULE_AUTHOR("OpenWrt.org, Atheros Communications Inc");
index e2c9468..2ae6dcc 100644 (file)
@@ -56,7 +56,7 @@
 +static ssize_t
 +ar2315_wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos)
 +{
-+      if(len)
++      if (len)
 +              ar2315_wdt_enable();
 +      return len;
 +}
@@ -64,7 +64,7 @@
 +static int
 +ar2315_wdt_open(struct inode *inode, struct file *file)
 +{
-+      if(in_use)
++      if (in_use)
 +              return -EBUSY;
 +      ar2315_wdt_enable();
 +      in_use = started = 1;
 +      }
 +
 +      ret = misc_register(&ar2315_wdt_miscdev);
-+      if(ret)
++      if (ret)
 +              dev_err(&dev->dev, "failed to register miscdev\n");
 +
 +out:
 +init_ar2315_wdt(void)
 +{
 +      int ret = platform_driver_register(&ar2315_wdt_driver);
-+      if(ret)
++      if (ret)
 +              pr_err("ar2315_wdt: error registering platfom driver!\n");
 +      return ret;
 +}
index 3925b67..678d7ec 100644 (file)
@@ -38,7 +38,7 @@
        }
  #endif
        for ( ; i<nrparts; i++) {
-+              if(max_offset < buf[i].flash_base + buf[i].size)
++              if (max_offset < buf[i].flash_base + buf[i].size)
 +                      max_offset = buf[i].flash_base + buf[i].size;
                parts[i].size = fl->img->size;
                parts[i].offset = fl->img->flash_base;
index d901b08..55de500 100644 (file)
@@ -47,7 +47,7 @@
        }
  #endif
        for ( ; i<nrparts; i++) {
--              if(max_offset < buf[i].flash_base + buf[i].size)
+-              if (max_offset < buf[i].flash_base + buf[i].size)
 -                      max_offset = buf[i].flash_base + buf[i].size;
                parts[i].size = fl->img->size;
                parts[i].offset = fl->img->flash_base;
index 5e7a660..66832d5 100644 (file)
@@ -2,7 +2,7 @@
 +++ b/drivers/net/ethernet/ar231x/ar231x.c
 @@ -146,6 +146,7 @@ static int ar231x_mdiobus_write(struct m
  static int ar231x_mdiobus_reset(struct mii_bus *bus);
- static int ar231x_mdiobus_probe (struct net_device *dev);
+ static int ar231x_mdiobus_probe(struct net_device *dev);
  static void ar231x_adjust_link(struct net_device *dev);
 +static bool no_phy;
  
index dfaa346..8e4db17 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/ethernet/ar231x/ar231x.c
 +++ b/drivers/net/ethernet/ar231x/ar231x.c
-@@ -1272,7 +1272,7 @@ static int ar231x_mdiobus_probe (struct
+@@ -1272,7 +1272,7 @@ static int ar231x_mdiobus_probe(struct n
        BUG_ON(!phydev);
        BUG_ON(phydev->attached_dev);