Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] sparse cleanups: NULL pointers, C99 struct init.

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>

authored by

Randy Dunlap and committed by
Linus Torvalds
874ec33f b888c87b

+12 -12
+1 -1
arch/i386/kernel/reboot_fixups.c
··· 44 44 45 45 for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) { 46 46 cur = &(fixups_table[i]); 47 - dev = pci_get_device(cur->vendor, cur->device, 0); 47 + dev = pci_get_device(cur->vendor, cur->device, NULL); 48 48 if (!dev) 49 49 continue; 50 50
+1 -1
drivers/char/tpm/tpm_atmel.c
··· 142 142 &dev_attr_pcrs.attr, 143 143 &dev_attr_caps.attr, 144 144 &dev_attr_cancel.attr, 145 - 0, 145 + NULL, 146 146 }; 147 147 148 148 static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
+1 -1
drivers/char/tpm/tpm_nsc.c
··· 244 244 &dev_attr_pcrs.attr, 245 245 &dev_attr_caps.attr, 246 246 &dev_attr_cancel.attr, 247 - 0, 247 + NULL, 248 248 }; 249 249 250 250 static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
+5 -5
drivers/isdn/hisax/hfc4s8s_l1.c
··· 1063 1063 Write_hfc8(l1->hw, A_INC_RES_FIFO, 1); 1064 1064 } 1065 1065 ack_len += skb->truesize; 1066 - bch->tx_skb = 0; 1066 + bch->tx_skb = NULL; 1067 1067 bch->tx_cnt = 0; 1068 1068 dev_kfree_skb(skb); 1069 1069 } else ··· 1659 1659 } 1660 1660 1661 1661 static struct pci_driver hfc4s8s_driver = { 1662 - name:"hfc4s8s_l1", 1663 - probe:hfc4s8s_probe, 1664 - remove:__devexit_p(hfc4s8s_remove), 1665 - id_table:hfc4s8s_ids, 1662 + .name = "hfc4s8s_l1", 1663 + .probe = hfc4s8s_probe, 1664 + .remove = __devexit_p(hfc4s8s_remove), 1665 + .id_table = hfc4s8s_ids, 1666 1666 }; 1667 1667 1668 1668 /**********************/
+2 -2
drivers/media/dvb/dvb-usb/dtt200u.c
··· 151 151 .cold_ids = { &dtt200u_usb_table[0], NULL }, 152 152 .warm_ids = { &dtt200u_usb_table[1], NULL }, 153 153 }, 154 - { 0 }, 154 + { NULL }, 155 155 } 156 156 }; 157 157 ··· 192 192 .cold_ids = { &dtt200u_usb_table[2], NULL }, 193 193 .warm_ids = { &dtt200u_usb_table[3], NULL }, 194 194 }, 195 - { 0 }, 195 + { NULL }, 196 196 } 197 197 }; 198 198
+1 -1
drivers/media/dvb/dvb-usb/vp7045.c
··· 247 247 .cold_ids = { &vp7045_usb_table[2], NULL }, 248 248 .warm_ids = { &vp7045_usb_table[3], NULL }, 249 249 }, 250 - { 0 }, 250 + { NULL }, 251 251 } 252 252 }; 253 253
+1 -1
drivers/net/skfp/smt.c
··· 1896 1896 1897 1897 static void smt_string_swap(char *data, const char *format, int len) 1898 1898 { 1899 - const char *open_paren = 0 ; 1899 + const char *open_paren = NULL ; 1900 1900 int x ; 1901 1901 1902 1902 while (len > 0 && *format) {