Staging: arlan: arlan.h: Checkpatch cleanup
authorAndrea Gelmini <andrea.gelmini@gelma.net>
Fri, 26 Feb 2010 09:15:11 +0000 (10:15 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:43:07 +0000 (16:43 -0800)
commita5a8695987b4c541f2003640d8583412b8c154ff
tree6258c2d3f3fdedb6e88edad9a976fa61eef31aa5
parentfa93e19dcf8600c87a60160735b1065cd4bb4dbb
Staging: arlan: arlan.h: Checkpatch cleanup

ERROR: trailing whitespace
+ *  Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500^I$

WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>

ERROR: do not use C99 // comments
+//#define ARLAN_DEBUGGING 1

ERROR: "foo * bar" should be "foo *bar"
+extern int     arlan_command(struct net_device * dev, int command);

ERROR: trailing whitespace
+ $

ERROR: trailing whitespace
+#define IFDEBUG( L ) if ( (L) & arlan_debug ) $

ERROR: space prohibited after that open parenthesis '('
+#define IFDEBUG( L ) if ( (L) & arlan_debug )

ERROR: space prohibited before that close parenthesis ')'
+#define IFDEBUG( L ) if ( (L) & arlan_debug )

ERROR: trailing whitespace
+#define ARLAN_FAKE_HDR_LEN 12 $

ERROR: space required after that ',' (ctx:VxV)
+ #define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b)
                       ^

ERROR: trailing whitespace
+^I#define ARLAN_DEBUG(a,b) $

ERROR: space required after that ',' (ctx:VxV)
+ #define ARLAN_DEBUG(a,b)
                       ^

ERROR: open brace '{' following struct go on the same line
+struct arlan_shmem
+{

ERROR: trailing whitespace
+      /* Header Signature */ $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+      $

ERROR: trailing whitespace
+     $

ERROR: trailing whitespace
+      int systemId; $

ERROR: open brace '{' following struct go on the same line
+struct TxParam
+{

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_shmem __iomem * card;

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_shmem * conf;

ERROR: trailing whitespace
+      struct arlan_conf_stru * Conf;^I     $

ERROR: "foo * bar" should be "foo *bar"
+      struct arlan_conf_stru * Conf;

ERROR: trailing whitespace
+ $

ERROR: space required after that ',' (ctx:VxV)
+#define READSHM(to,from,atype) {\
                   ^

ERROR: space required after that ',' (ctx:VxV)
+#define READSHM(to,from,atype) {\
                        ^

ERROR: space required after that ',' (ctx:VxO)
+ memcpy_fromio(&(tmp),&(from),sizeof(atype));\
                      ^

ERROR: space required before that '&' (ctx:OxV)
+ memcpy_fromio(&(tmp),&(from),sizeof(atype));\
                       ^

ERROR: space required after that ',' (ctx:VxV)
+ memcpy_fromio(&(tmp),&(from),sizeof(atype));\
                              ^

ERROR: space required after that ',' (ctx:VxV)
+#define READSHMEM(from,atype)\
                       ^

ERROR: space required after that ',' (ctx:VxV)
+#define WRITESHM(to,from,atype) \
                    ^

ERROR: space required after that ',' (ctx:VxV)
+#define WRITESHM(to,from,atype) \
                         ^

ERROR: space required after that ',' (ctx:VxO)
+ memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
                   ^

ERROR: space required before that '&' (ctx:OxV)
+ memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
                    ^

ERROR: space required after that ',' (ctx:VxV)
+ memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
                           ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                          ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                    ^

ERROR: space required after that ',' (ctx:VxV)
+#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                          ^

ERROR: space required after that ',' (ctx:VxO)
+ memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
                       ^

ERROR: space required before that '&' (ctx:OxV)
+ memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
                        ^

ERROR: space required after that ',' (ctx:VxV)
+ memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
                                ^

ERROR: space required after that ',' (ctx:VxV)
+ IFDEBUG(levelSHM) printk(stringSHM,tmpSHM);\
                                    ^

ERROR: space required after that ',' (ctx:VxO)
+ writeb(val,&(to))
            ^

ERROR: space required before that '&' (ctx:OxV)
+ writeb(val,&(to))
             ^

ERROR: space required after that ',' (ctx:VxO)
+ writew(val,&(to))
            ^

ERROR: space required before that '&' (ctx:OxV)
+ writew(val,&(to))
             ^

ERROR: space required after that ',' (ctx:VxO)
+ writel(val,&(to))
            ^

ERROR: space required before that '&' (ctx:OxV)
+ writel(val,&(to))
             ^

ERROR: space prohibited after that open parenthesis '('
+   ( (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode)    > 0) && \

ERROR: space prohibited after that open parenthesis '('
+     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )

ERROR: space prohibited before that close parenthesis ')'
+     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )

ERROR: code indent should use tabs where possible
+ ^IREADSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)$

ERROR: space required before the open brace '{'
+#define writeControlRegister(dev, v){\

ERROR: space required after that ',' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\
                                                                              ^

ERROR: need consistent spacing around '&' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\
                                                                                    ^

ERROR: space prohibited before that close parenthesis ')'
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\

ERROR: space required after that ',' (ctx:WxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v)  );}
                                                                                ^

ERROR: space required after that ';' (ctx:VxV)
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v)  );}
                                                                                       ^

ERROR: space prohibited before that close parenthesis ')'
+   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v)  );}

WARNING: suspect code indent for conditional statements (3, 6)
+   if (cr & ARLAN_CHANNEL_ATTENTION){ \
+      writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\

ERROR: space required before the open brace '{'
+   if (cr & ARLAN_CHANNEL_ATTENTION){ \

ERROR: space required after that close brace '}'
+   }else  \

ERROR: space required before the open brace '{'
+#define clearChannelAttention(dev){ \

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                                                                                 ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                                                                    ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                                                                     ^

ERROR: space required before the open brace '{'
+#define setInterruptEnable(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                 ^

ERROR: space required before the open brace '{'
+#define clearInterruptEnable(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                  ^

ERROR: space required before the open brace '{'
+#define setClearInterrupt(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                            ^

ERROR: space required after that ';' (ctx:WxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                                                                                 ^

ERROR: space required before the open brace '{'
+#define clearClearInterrupt(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                                                                               ^

ERROR: space required before the open brace '{'
+#define setPowerOff(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\
                            ^

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                      ^

ERROR: space required before the open brace '{'
+#define setPowerOn(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER));   }
                            ^

ERROR: space required before the open brace '{'
+#define arlan_lock_card_access(dev){\

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                            ^

ERROR: space required after that ';' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                      ^

ERROR: space required before the open brace '{'
+#define arlan_unlock_card_access(dev){\

ERROR: trailing whitespace
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }  $

ERROR: space required after that ',' (ctx:VxV)
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }
                            ^

ERROR: space prohibited before that close parenthesis ')'
+   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }

ERROR: trailing whitespace
+ $

ERROR: trailing whitespace
+ $

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/arlan/arlan.h