]> err.no Git - linux-2.6/commitdiff
[PATCH] sparse cleanups: NULL pointers, C99 struct init.
authorRandy Dunlap <rdunlap@xenotime.net>
Sun, 30 Oct 2005 23:03:29 +0000 (15:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:29 +0000 (17:37 -0800)
Convert most of the remaining "Using plain integer as NULL pointer" sparse
warnings to use NULL.  (Not duplicating patches that are already in -mm,
-bird, or -kj.)

Convert isdn driver struct initializer to use C99 syntax.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/reboot_fixups.c
drivers/char/tpm/tpm_atmel.c
drivers/char/tpm/tpm_nsc.c
drivers/isdn/hisax/hfc4s8s_l1.c
drivers/media/dvb/dvb-usb/dtt200u.c
drivers/media/dvb/dvb-usb/vp7045.c
drivers/net/skfp/smt.c

index 1b183b378c2c269ac06c05d2ba622fe0dad0884a..c9b87330aeeacfb49009faa725f51c1343d3a308 100644 (file)
@@ -44,7 +44,7 @@ void mach_reboot_fixups(void)
 
        for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) {
                cur = &(fixups_table[i]);
-               dev = pci_get_device(cur->vendor, cur->device, 0);
+               dev = pci_get_device(cur->vendor, cur->device, NULL);
                if (!dev)
                        continue;
 
index d12ac1a346b5471c396bad29ca58d1e6e862e222..8cb42e84723c4381db5798ee817d866aa150d437 100644 (file)
@@ -142,7 +142,7 @@ static struct attribute* atmel_attrs[] = {
        &dev_attr_pcrs.attr,
        &dev_attr_caps.attr,
        &dev_attr_cancel.attr,
-       0,
+       NULL,
 };
 
 static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
index 6adfc07d0fd6d5b87fe36276abc572cda76088a9..253871b5b1e223ac2035faf83d16bad594ffc5e9 100644 (file)
@@ -244,7 +244,7 @@ static struct attribute * nsc_attrs[] = {
        &dev_attr_pcrs.attr,
        &dev_attr_caps.attr,
        &dev_attr_cancel.attr,
-       0,
+       NULL,
 };
 
 static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
index 7333377ab31de0cc9e7d866626c9c9dd8cd9de88..e3866b0a97fd25b244520ed30f247f0b9e67cf3e 100644 (file)
@@ -1063,7 +1063,7 @@ tx_b_frame(struct hfc4s8s_btype *bch)
                                Write_hfc8(l1->hw, A_INC_RES_FIFO, 1);
                        }
                        ack_len += skb->truesize;
-                       bch->tx_skb = 0;
+                       bch->tx_skb = NULL;
                        bch->tx_cnt = 0;
                        dev_kfree_skb(skb);
                } else
@@ -1659,10 +1659,10 @@ hfc4s8s_remove(struct pci_dev *pdev)
 }
 
 static struct pci_driver hfc4s8s_driver = {
-      name:"hfc4s8s_l1",
-      probe:hfc4s8s_probe,
-      remove:__devexit_p(hfc4s8s_remove),
-      id_table:hfc4s8s_ids,
+      .name    = "hfc4s8s_l1",
+      .probe   = hfc4s8s_probe,
+      .remove  = __devexit_p(hfc4s8s_remove),
+      .id_table        = hfc4s8s_ids,
 };
 
 /**********************/
index 5aa12ebab34f1cbfffee444ace0a89a4d547734e..b595476332cd9dba9006c6bcb94761122cc7ba97 100644 (file)
@@ -151,7 +151,7 @@ static struct dvb_usb_properties dtt200u_properties = {
                  .cold_ids = { &dtt200u_usb_table[0], NULL },
                  .warm_ids = { &dtt200u_usb_table[1], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
@@ -192,7 +192,7 @@ static struct dvb_usb_properties wt220u_properties = {
                  .cold_ids = { &dtt200u_usb_table[2], NULL },
                  .warm_ids = { &dtt200u_usb_table[3], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
index 0f57abeb6d6bc8d982f6ea16d7b91be64440de62..75765e3a569c811f2f93f5fd25983caf5437b055 100644 (file)
@@ -247,7 +247,7 @@ static struct dvb_usb_properties vp7045_properties = {
                  .cold_ids = { &vp7045_usb_table[2], NULL },
                  .warm_ids = { &vp7045_usb_table[3], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
index f17c05cbe44bf84a79eab3b4d3900369f9f8a706..99a776a51fb5764872d2d5a4ee7f44e373556b3f 100644 (file)
@@ -1896,7 +1896,7 @@ void smt_swap_para(struct smt_header *sm, int len, int direction)
 
 static void smt_string_swap(char *data, const char *format, int len)
 {
-       const char      *open_paren = 0 ;
+       const char      *open_paren = NULL ;
        int     x ;
 
        while (len > 0  && *format) {