]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Removed obsolete initialisation of static variables.
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Mon, 16 Jul 2007 17:15:08 +0000 (17:15 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Mon, 16 Jul 2007 17:15:08 +0000 (17:15 +0000)
Fixed style of pointer declarations and pointer casts.
Thanks to Patrick McHardy for the hint to linux/scripts/checkpatch.pl

git-svn-id: svn://svn.berlios.de//socketcan/trunk@432 030b6a49-0b11-0410-94ab-b0dab22257f2

kernel/2.6/drivers/net/can/vcan.c
kernel/2.6/net/can/af_can.c
kernel/2.6/net/can/bcm.c
kernel/2.6/net/can/proc.c
kernel/2.6/net/can/raw.c

index c8329738ee886f2d95ffa325cccd7513a8a12a16..0ec4050002844b8913d93168d411e7349db05ced 100644 (file)
@@ -64,7 +64,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
 
 #ifdef CONFIG_CAN_DEBUG_DEVICES
-static int debug = 0;
+static int debug;
 module_param(debug, int, S_IRUGO);
 #endif
 
@@ -104,7 +104,7 @@ MODULE_PARM_DESC(numdev, "Number of virtual CAN devices");
  * This causes the PF_CAN core to perform the loopback as a fallback solution.
  */
 
-static int loopback = 0; /* vcan default: no loopback, just free the skb */
+static int loopback; /* vcan default: no loopback, just free the skb */
 module_param(loopback, int, S_IRUGO);
 MODULE_PARM_DESC(loopback, "Loop back sent frames. vcan default: 0 (Off)");
 
index ac83b6e6beec4d49e750cc915d2f6c28f42dbded..ea470c8dfa9ad6a7b5af862736e78e05fd3d5e33 100644 (file)
@@ -83,7 +83,7 @@ module_param(stats_timer, int, S_IRUGO);
 MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
 
 #ifdef CONFIG_CAN_DEBUG_CORE
-static int debug = 0;
+static int debug;
 module_param(debug, int, S_IRUGO);
 MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
 #endif
@@ -594,7 +594,7 @@ static int can_rcv_filter(struct dev_rcv_lists *d, struct sk_buff *skb)
        struct receiver *r;
        struct hlist_node *n;
        int matches = 0;
-       struct can_frame *cf = (struct can_frame*)skb->data;
+       struct can_frame *cf = (struct can_frame *)skb->data;
        canid_t can_id = cf->can_id;
 
        if (d->entries == 0)
index 6e6f0b4eb9e63023bec4f86c177fccf17230542d..f21a7e9c235c3a71e6c672867370b9a5c3d9e186 100644 (file)
@@ -81,7 +81,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
 
 #ifdef CONFIG_CAN_DEBUG_CORE
-static int debug = 0;
+static int debug;
 module_param(debug, int, S_IRUGO);
 MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
 #endif
@@ -118,7 +118,7 @@ struct bcm_op {
        struct net_device *rx_reg_dev;
 };
 
-static struct proc_dir_entry *proc_dir = NULL;
+static struct proc_dir_entry *proc_dir;
 
 #ifdef CONFIG_CAN_BCM_USER
 #define BCM_CAP (-1)
@@ -436,7 +436,7 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
  */
 static void bcm_tx_timeout_handler(unsigned long data)
 {
-       struct bcm_op *op = (struct bcm_op*)data;
+       struct bcm_op *op = (struct bcm_op *)data;
 
        DBG("Called with bcm_op %p\n", op);
 
@@ -472,7 +472,7 @@ static void bcm_tx_timeout_handler(unsigned long data)
 
                DBG("adding timer ival1. func=%p data=%p exp=0x%08X\n",
                    op->timer.function,
-                   (char*) op->timer.data,
+                   (char *) op->timer.data,
                    (unsigned int) op->timer.expires);
 
                /* send (next) frame */
@@ -485,7 +485,7 @@ static void bcm_tx_timeout_handler(unsigned long data)
 
                        DBG("adding timer ival2. func=%p data=%p exp=0x%08X\n",
                            op->timer.function,
-                           (char*) op->timer.data,
+                           (char *) op->timer.data,
                            (unsigned int) op->timer.expires);
 
                        /* send (next) frame */
@@ -560,7 +560,7 @@ static void bcm_rx_update_and_send(struct bcm_op *op,
 
                        DBG("adding thrtimer. func=%p data=%p exp=0x%08X\n",
                            op->thrtimer.function,
-                           (char*) op->thrtimer.data,
+                           (char *) op->thrtimer.data,
                            (unsigned int) op->thrtimer.expires);
                }
 
@@ -631,7 +631,7 @@ static void bcm_rx_starttimer(struct bcm_op *op)
                DBG("adding rx timeout timer ival1. func=%p data=%p "
                    "exp=0x%08X\n",
                    op->timer.function,
-                   (char*) op->timer.data,
+                   (char *) op->timer.data,
                    (unsigned int) op->timer.expires);
 
                add_timer(&op->timer);
@@ -643,7 +643,7 @@ static void bcm_rx_starttimer(struct bcm_op *op)
  */
 static void bcm_rx_timeout_handler(unsigned long data)
 {
-       struct bcm_op *op = (struct bcm_op*)data;
+       struct bcm_op *op = (struct bcm_op *)data;
        struct bcm_msg_head msg_head;
 
        DBG("sending RX_TIMEOUT for can_id %03X. op is %p\n", op->can_id, op);
@@ -674,7 +674,7 @@ static void bcm_rx_timeout_handler(unsigned long data)
  */
 static void bcm_rx_thr_handler(unsigned long data)
 {
-       struct bcm_op *op = (struct bcm_op*)data;
+       struct bcm_op *op = (struct bcm_op *)data;
        int i = 0;
 
        /* mark disabled / consumed timer */
@@ -684,7 +684,7 @@ static void bcm_rx_thr_handler(unsigned long data)
                DBG("sending MUX RX_CHANGED for can_id %03X. op is %p\n",
                    op->can_id, op);
                /* for MUX filter we start at index 1 */
-               for (i=1; i<op->nframes; i++) {
+               for (i = 1; i < op->nframes; i++) {
                        if ((op->last_frames) &&
                            (op->last_frames[i].can_dlc & RX_THR)) {
                                op->last_frames[i].can_dlc &= ~RX_THR;
@@ -708,7 +708,7 @@ static void bcm_rx_thr_handler(unsigned long data)
  */
 static void bcm_rx_handler(struct sk_buff *skb, void *data)
 {
-       struct bcm_op *op = (struct bcm_op*)data;
+       struct bcm_op *op = (struct bcm_op *)data;
        struct can_frame rxframe;
        int i;
 
@@ -782,7 +782,7 @@ static void bcm_rx_handler(struct sk_buff *skb, void *data)
                 * Remark: The MUX-mask is stored in index 0
                 */
 
-               for (i=1; i < op->nframes; i++) {
+               for (i = 1; i < op->nframes; i++) {
                        if ((GET_U64(&op->frames[0]) & GET_U64(&rxframe)) ==
                            (GET_U64(&op->frames[0]) &
                             GET_U64(&op->frames[i]))) {
@@ -971,7 +971,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
 
                /* update can_frames content */
                for (i = 0; i < msg_head->nframes; i++) {
-                       err = memcpy_fromiovec((u8*)&op->frames[i],
+                       err = memcpy_fromiovec((u8 *)&op->frames[i],
                                               msg->msg_iov, CFSIZ);
                        if (err < 0)
                                return err;
@@ -1006,7 +1006,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                        op->frames = &op->sframe;
 
                for (i = 0; i < msg_head->nframes; i++) {
-                       err = memcpy_fromiovec((u8*)&op->frames[i],
+                       err = memcpy_fromiovec((u8 *)&op->frames[i],
                                               msg->msg_iov, CFSIZ);
                        if (err < 0) {
                                if (op->frames != &op->sframe)
@@ -1094,7 +1094,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                        DBG("TX_SETUP: adding timer ival1. func=%p data=%p "
                            "exp=0x%08X\n",
                            op->timer.function,
-                           (char*) op->timer.data,
+                           (char *) op->timer.data,
                            (unsigned int) op->timer.expires);
 
                } else {
@@ -1102,7 +1102,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                        DBG("TX_SETUP: adding timer ival2. func=%p data=%p "
                            "exp=0x%08X\n",
                            op->timer.function,
-                           (char*) op->timer.data,
+                           (char *) op->timer.data,
                            (unsigned int) op->timer.expires);
                }
 
@@ -1158,7 +1158,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
 
                if (msg_head->nframes) {
                        /* update can_frames content */
-                       err = memcpy_fromiovec((u8*)op->frames,
+                       err = memcpy_fromiovec((u8 *)op->frames,
                                               msg->msg_iov,
                                               msg_head->nframes * CFSIZ);
                        if (err < 0)
@@ -1210,7 +1210,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                }
 
                if (msg_head->nframes) {
-                       err = memcpy_fromiovec((u8*)op->frames, msg->msg_iov,
+                       err = memcpy_fromiovec((u8 *)op->frames, msg->msg_iov,
                                               msg_head->nframes * CFSIZ);
                        if (err < 0) {
                                if (op->frames != &op->sframe)
@@ -1435,7 +1435,7 @@ static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock,
 
        /* read message head information */
 
-       ret = memcpy_fromiovec((u8*)&msg_head, msg->msg_iov, MHSIZ);
+       ret = memcpy_fromiovec((u8 *)&msg_head, msg->msg_iov, MHSIZ);
        if (ret < 0)
                return ret;
 
index b41010b32a31448ecd901bb76a54f95effec37ce..f21c839d211edcba2770d61c78d56e3f30cc5432 100644 (file)
@@ -67,18 +67,18 @@ RCSID("$Id$");
 #define CAN_PROC_RCVLIST_EFF "rcvlist_eff"
 #define CAN_PROC_RCVLIST_ERR "rcvlist_err"
 
-static struct proc_dir_entry *can_dir         = NULL;
-static struct proc_dir_entry *pde_version     = NULL;
-static struct proc_dir_entry *pde_stats       = NULL;
-static struct proc_dir_entry *pde_reset_stats = NULL;
-static struct proc_dir_entry *pde_rcvlist_all = NULL;
-static struct proc_dir_entry *pde_rcvlist_fil = NULL;
-static struct proc_dir_entry *pde_rcvlist_inv = NULL;
-static struct proc_dir_entry *pde_rcvlist_sff = NULL;
-static struct proc_dir_entry *pde_rcvlist_eff = NULL;
-static struct proc_dir_entry *pde_rcvlist_err = NULL;
-
-static int user_reset = 0;
+static struct proc_dir_entry *can_dir;
+static struct proc_dir_entry *pde_version;
+static struct proc_dir_entry *pde_stats;
+static struct proc_dir_entry *pde_reset_stats;
+static struct proc_dir_entry *pde_rcvlist_all;
+static struct proc_dir_entry *pde_rcvlist_fil;
+static struct proc_dir_entry *pde_rcvlist_inv;
+static struct proc_dir_entry *pde_rcvlist_sff;
+static struct proc_dir_entry *pde_rcvlist_eff;
+static struct proc_dir_entry *pde_rcvlist_err;
+
+static int user_reset;
 
 static const char *rx_list_name[] = {
        [RX_ERR] = "rx_err",
@@ -444,7 +444,7 @@ static int can_proc_read_rcvlist_sff(char *page, char **start, off_t off,
 
 static struct proc_dir_entry *can_create_proc_readentry(const char *name,
                                                        mode_t mode,
-                                                       read_proc_tread_proc,
+                                                       read_proc_t *read_proc,
                                                        void *data)
 {
        if (can_dir)
@@ -484,15 +484,15 @@ void can_init_proc(void)
        pde_reset_stats = can_create_proc_readentry(CAN_PROC_RESET_STATS, 0644,
                                        can_proc_read_reset_stats, NULL);
        pde_rcvlist_err = can_create_proc_readentry(CAN_PROC_RCVLIST_ERR, 0644,
-                                       can_proc_read_rcvlist, (void*)RX_ERR);
+                                       can_proc_read_rcvlist, (void *)RX_ERR);
        pde_rcvlist_all = can_create_proc_readentry(CAN_PROC_RCVLIST_ALL, 0644,
-                                       can_proc_read_rcvlist, (void*)RX_ALL);
+                                       can_proc_read_rcvlist, (void *)RX_ALL);
        pde_rcvlist_fil = can_create_proc_readentry(CAN_PROC_RCVLIST_FIL, 0644,
-                                       can_proc_read_rcvlist, (void*)RX_FIL);
+                                       can_proc_read_rcvlist, (void *)RX_FIL);
        pde_rcvlist_inv = can_create_proc_readentry(CAN_PROC_RCVLIST_INV, 0644,
-                                       can_proc_read_rcvlist, (void*)RX_INV);
+                                       can_proc_read_rcvlist, (void *)RX_INV);
        pde_rcvlist_eff = can_create_proc_readentry(CAN_PROC_RCVLIST_EFF, 0644,
-                                       can_proc_read_rcvlist, (void*)RX_EFF);
+                                       can_proc_read_rcvlist, (void *)RX_EFF);
        pde_rcvlist_sff = can_create_proc_readentry(CAN_PROC_RCVLIST_SFF, 0644,
                                        can_proc_read_rcvlist_sff, NULL);
 }
index fe4d9cff7115d863b60fc243957eb2859646bf0b..a8a4c9b9efa7c9d420fae41664f2441f3ce5e9b0 100644 (file)
@@ -70,7 +70,7 @@ MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
 
 #ifdef CONFIG_CAN_DEBUG_CORE
-static int debug = 0;
+static int debug;
 module_param(debug, int, S_IRUGO);
 MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
 #endif
@@ -121,7 +121,7 @@ static inline struct raw_sock *raw_sk(const struct sock *sk)
 
 static void raw_rcv(struct sk_buff *skb, void *data)
 {
-       struct sock *sk = (struct sock*)data;
+       struct sock *sk = (struct sock *)data;
        struct raw_sock *ro = raw_sk(sk);
        struct sockaddr_can *addr;
        int error;