brcm47xx: some checkpatch fixes
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 31 Jul 2010 10:06:05 +0000 (10:06 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 31 Jul 2010 10:06:05 +0000 (10:06 +0000)
SVN-Revision: 22425

12 files changed:
target/linux/brcm47xx/patches-2.6.34/210-b44_phy_fix.patch
target/linux/brcm47xx/patches-2.6.34/301-kmod-fuse-dcache-bug-r4k.patch
target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch
target/linux/brcm47xx/patches-2.6.34/700-ssb-gigabit-ethernet-driver.patch
target/linux/brcm47xx/patches-2.6.34/920-cache-wround.patch
target/linux/brcm47xx/patches-2.6.34/950-sbb-sysfs-files.patch
target/linux/brcm47xx/patches-2.6.35/210-b44_phy_fix.patch
target/linux/brcm47xx/patches-2.6.35/301-kmod-fuse-dcache-bug-r4k.patch
target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch
target/linux/brcm47xx/patches-2.6.35/700-ssb-gigabit-ethernet-driver.patch
target/linux/brcm47xx/patches-2.6.35/920-cache-wround.patch
target/linux/brcm47xx/patches-2.6.35/950-sbb-sysfs-files.patch

index f07968a240f399589b11db89a994d14a400fb66c..a1b3224643b64c74be4d7793dc221a26d6256bc0 100644 (file)
@@ -67,8 +67,8 @@
  {
  }
 +
-+static inline void b44_bcm47xx_workarounds(struct b44 *bp) 
-+{ 
++static inline void b44_bcm47xx_workarounds(struct b44 *bp)
++{
 +}
  #endif
  
index 10bf131238e2c3745261277cd8ac54bf8849938d..62f699298c2a66a18fd024bbd78a6bd7a1581daf 100644 (file)
        unsigned long addr, unsigned long pfn)
  {
        struct flush_cache_page_args args;
-@@ -1469,3 +1469,10 @@ void __cpuinit r4k_cache_init(void)
+@@ -1469,3 +1469,11 @@ void __cpuinit r4k_cache_init(void)
        coherency_setup();
  #endif
  }
 +
-+// fuse package DCACHE BUG patch exports
++/* fuse package DCACHE BUG patch exports */
 +void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
++EXPORT_SYMBOL(fuse_flush_cache_all);
++
 +void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
-+        unsigned long pfn) = r4k_flush_cache_page;
++      unsigned long pfn) = r4k_flush_cache_page;
 +EXPORT_SYMBOL(fuse_flush_cache_page);
-+EXPORT_SYMBOL(fuse_flush_cache_all);
index 722a94ba5f6fe3033ce570ffcc3b362a6ddfce26..439a53a451536b335c0fcfcb0d77c9bbd16a461a 100644 (file)
@@ -1,7 +1,7 @@
 --- a/arch/mips/bcm47xx/nvram.c
 +++ b/arch/mips/bcm47xx/nvram.c
 @@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val, 
-       return 1;
+       return -9;
  }
  EXPORT_SYMBOL(nvram_getenv);
 +
@@ -33,7 +33,7 @@
 +EXPORT_SYMBOL(nvram_get);
 --- a/arch/mips/bcm47xx/setup.c
 +++ b/arch/mips/bcm47xx/setup.c
-@@ -236,3 +236,20 @@ void __init plat_mem_setup(void)
+@@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
        _machine_halt = bcm47xx_machine_halt;
        pm_power_off = bcm47xx_machine_halt;
  }
index 384b925a069e9e28e04114eca565f64d17817d0d..05fa0c7f9915a7ee3673e087b5612858e7ee356d 100644 (file)
  
 +              if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
 +                      current_link_up = 1;
-+                      current_speed = SPEED_1000; //FIXME
++                      current_speed = SPEED_1000; /* FIXME */
 +                      current_duplex = DUPLEX_FULL;
 +                      tp->link_config.active_speed = current_speed;
 +                      tp->link_config.active_duplex = current_duplex;
index b9b22256a3d6855ac6f6342699cf198c5a2b4e47..4769f2cf9fcc0a9e3acc443f3a732993a8911cbc 100644 (file)
@@ -1,25 +1,28 @@
 --- a/arch/mips/include/asm/r4kcache.h
 +++ b/arch/mips/include/asm/r4kcache.h
-@@ -20,10 +20,25 @@
+@@ -20,10 +20,28 @@
  #ifdef CONFIG_BCM47XX
  #include <asm/paccess.h>
  #include <linux/ssb/ssb.h>
 -#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
 +#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
 +
-+static inline unsigned long bcm4710_dummy_rreg(void) {
-+      return (*(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE)));
++static inline unsigned long bcm4710_dummy_rreg(void)
++{
++      return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
 +}
 +
-+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void*)(addr))
++#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
 +
-+static inline unsigned long bcm4710_fill_tlb(void *addr) {
-+      return (*(unsigned long *)addr);
++static inline unsigned long bcm4710_fill_tlb(void *addr)
++{
++      return *(unsigned long *)addr;
 +}
 +
-+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void*)(addr))
++#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
 +
-+static inline void bcm4710_protected_fill_tlb(void *addr) {
++static inline void bcm4710_protected_fill_tlb(void *addr)
++{
 +      unsigned long x;
 +      get_dbe(x, (unsigned long *)addr);;
 +}
index ddb1f1b3835e9050318047afac7a791fdbe1559a..021c3c890b63b4c52289946dcf716ca9bfff46ed 100644 (file)
@@ -8,7 +8,7 @@
 +static ssize_t                                                                                                        \
 +attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \
 +{                                                                                                                             \
-+      return sprintf (buf, format_string, dev_to_ssb_dev(dev)->field);                \
++      return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field);         \
 +}
 +
 +ssb_config_attr(core_num, core_index, "%u\n")
@@ -19,7 +19,7 @@
 +static ssize_t
 +name_show(struct device *dev, struct device_attribute *attr, char *buf)
 +{
-+      return sprintf (buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
++      return sprintf(buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
 +}
 +
 +static struct device_attribute ssb_device_attrs[] = {
index f07968a240f399589b11db89a994d14a400fb66c..a1b3224643b64c74be4d7793dc221a26d6256bc0 100644 (file)
@@ -67,8 +67,8 @@
  {
  }
 +
-+static inline void b44_bcm47xx_workarounds(struct b44 *bp) 
-+{ 
++static inline void b44_bcm47xx_workarounds(struct b44 *bp)
++{
 +}
  #endif
  
index 10bf131238e2c3745261277cd8ac54bf8849938d..62f699298c2a66a18fd024bbd78a6bd7a1581daf 100644 (file)
        unsigned long addr, unsigned long pfn)
  {
        struct flush_cache_page_args args;
-@@ -1469,3 +1469,10 @@ void __cpuinit r4k_cache_init(void)
+@@ -1469,3 +1469,11 @@ void __cpuinit r4k_cache_init(void)
        coherency_setup();
  #endif
  }
 +
-+// fuse package DCACHE BUG patch exports
++/* fuse package DCACHE BUG patch exports */
 +void (*fuse_flush_cache_all)(void) = r4k___flush_cache_all;
++EXPORT_SYMBOL(fuse_flush_cache_all);
++
 +void (*fuse_flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
-+        unsigned long pfn) = r4k_flush_cache_page;
++      unsigned long pfn) = r4k_flush_cache_page;
 +EXPORT_SYMBOL(fuse_flush_cache_page);
-+EXPORT_SYMBOL(fuse_flush_cache_all);
index 722a94ba5f6fe3033ce570ffcc3b362a6ddfce26..1db97e5e43aad73da6a4aa2fb69d17f0914905d1 100644 (file)
@@ -1,7 +1,7 @@
 --- a/arch/mips/bcm47xx/nvram.c
 +++ b/arch/mips/bcm47xx/nvram.c
 @@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val, 
-       return 1;
+       return -1;
  }
  EXPORT_SYMBOL(nvram_getenv);
 +
@@ -20,7 +20,8 @@
 +      end = nvram_buf + sizeof(nvram_buf) - 2;
 +      end[0] = end[1] = '\0';
 +      for (; *var; var = value + strlen(value) + 1) {
-+              if (!(eq = strchr(var, '=')))
++              eq = strchr(var, '=');
++              if (!eq)
 +                      break;
 +              value = eq + 1;
 +              if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
 +
 +      return NULL;
 +}
-+
 +EXPORT_SYMBOL(nvram_get);
 --- a/arch/mips/bcm47xx/setup.c
 +++ b/arch/mips/bcm47xx/setup.c
-@@ -236,3 +236,20 @@ void __init plat_mem_setup(void)
+@@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
        _machine_halt = bcm47xx_machine_halt;
        pm_power_off = bcm47xx_machine_halt;
  }
index 5b296095a9941ddd928d4481f0657dcfb80929ea..29b1a9da133ea3568cb417961b08faf7cee180bc 100644 (file)
  
 +              if (tp->tg3_flags3 & TG3_FLG3_ROBOSWITCH) {
 +                      current_link_up = 1;
-+                      current_speed = SPEED_1000; //FIXME
++                      current_speed = SPEED_1000; /* FIXME */
 +                      current_duplex = DUPLEX_FULL;
 +                      tp->link_config.active_speed = current_speed;
 +                      tp->link_config.active_duplex = current_duplex;
index b9b22256a3d6855ac6f6342699cf198c5a2b4e47..4769f2cf9fcc0a9e3acc443f3a732993a8911cbc 100644 (file)
@@ -1,25 +1,28 @@
 --- a/arch/mips/include/asm/r4kcache.h
 +++ b/arch/mips/include/asm/r4kcache.h
-@@ -20,10 +20,25 @@
+@@ -20,10 +20,28 @@
  #ifdef CONFIG_BCM47XX
  #include <asm/paccess.h>
  #include <linux/ssb/ssb.h>
 -#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE)))
 +#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
 +
-+static inline unsigned long bcm4710_dummy_rreg(void) {
-+      return (*(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE)));
++static inline unsigned long bcm4710_dummy_rreg(void)
++{
++      return *(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE));
 +}
 +
-+#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void*)(addr))
++#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void *)(addr))
 +
-+static inline unsigned long bcm4710_fill_tlb(void *addr) {
-+      return (*(unsigned long *)addr);
++static inline unsigned long bcm4710_fill_tlb(void *addr)
++{
++      return *(unsigned long *)addr;
 +}
 +
-+#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void*)(addr))
++#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void *)(addr))
 +
-+static inline void bcm4710_protected_fill_tlb(void *addr) {
++static inline void bcm4710_protected_fill_tlb(void *addr)
++{
 +      unsigned long x;
 +      get_dbe(x, (unsigned long *)addr);;
 +}
index ddb1f1b3835e9050318047afac7a791fdbe1559a..021c3c890b63b4c52289946dcf716ca9bfff46ed 100644 (file)
@@ -8,7 +8,7 @@
 +static ssize_t                                                                                                        \
 +attrib##_show(struct device *dev, struct device_attribute *attr, char *buf) \
 +{                                                                                                                             \
-+      return sprintf (buf, format_string, dev_to_ssb_dev(dev)->field);                \
++      return sprintf(buf, format_string, dev_to_ssb_dev(dev)->field);         \
 +}
 +
 +ssb_config_attr(core_num, core_index, "%u\n")
@@ -19,7 +19,7 @@
 +static ssize_t
 +name_show(struct device *dev, struct device_attribute *attr, char *buf)
 +{
-+      return sprintf (buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
++      return sprintf(buf, "%s\n", ssb_core_name(dev_to_ssb_dev(dev)->id.coreid));
 +}
 +
 +static struct device_attribute ssb_device_attrs[] = {