]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
cls_can: Some fixes according to remarks made by Oliver.
authorRostislav Lisovy <lisovy@gmail.com>
Wed, 23 May 2012 10:15:43 +0000 (12:15 +0200)
committerRostislav Lisovy <lisovy@gmail.com>
Wed, 23 May 2012 10:15:43 +0000 (12:15 +0200)
include/linux/can.h
net/sched/Makefile
net/sched/cls_can.c

index d18333302cbd0a65fcb62caa13e3505f07aa6dc7..8986be3bbc64ac82f768d9d9800188cfc8b33909 100644 (file)
@@ -40,6 +40,9 @@
  */
 typedef __u32 canid_t;
 
+#define CAN_SFF_ID_BITS                11
+#define CAN_EFF_ID_BITS                29
+
 /*
  * Controller Area Network Error Frame Mask structure
  *
index b89a5c4c223dedb26cddf526ec7283da86a99966..6e5079637a49d5b9f36d8e9c53c312cc7dc0f9f7 100644 (file)
@@ -47,4 +47,3 @@ obj-$(CONFIG_NET_EMATCH_NBYTE)        += em_nbyte.o
 obj-$(CONFIG_NET_EMATCH_U32)   += em_u32.o
 obj-$(CONFIG_NET_EMATCH_META)  += em_meta.o
 obj-$(CONFIG_NET_EMATCH_TEXT)  += em_text.o
-CFLAGS_cls_can.o := -DDEBUG
index 1932b15532f0c41fa352d7e1b9ea3469b710943f..cf34eb56b8de7d9da26403824df726d8eb6dcd9a 100644 (file)
 #include <linux/rcupdate.h>
 #include <linux/can.h>
 
-#ifndef CAN_SFF_ID_BITS
-  #define CAN_SFF_ID_BITS      11
-  #define CAN_EFF_ID_BITS      29
-#endif
-
 #define SFF_BITMAP             1       /* Use bitmap for storing rules
                                        for SFF frames? */
 
@@ -268,7 +263,7 @@ static int canfltr_set_parms(struct tcf_proto *tp, struct canfltr_state *f,
        int i;
 
        rules_tmp = kzalloc(sizeof(*rules_tmp), GFP_KERNEL);
-       if (rules_tmp == NULL)
+       if (!rules_tmp)
                return -ENOBUFS;
 
        err = -EINVAL;