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

fbdev: fix integer as NULL pointer warning

drivers/video/aty/atyfb_base.c:3359:26: warning: Using plain integer as NULL pointer
drivers/video/aty/radeon_base.c:2280:32: warning: Using plain integer as NULL pointer
drivers/video/matrox/matroxfb_base.h:203:25: warning: Using plain integer as NULL pointer
drivers/video/matrox/matroxfb_base.h:203:25: warning: Using plain integer as NULL pointer
drivers/video/sis/sis_main.c:5790:44: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Harvey Harrison and committed by
Linus Torvalds
5e2daeb3 9bcf0910

+5 -5
+1 -1
drivers/video/aty/atyfb_base.c
··· 3356 3356 3357 3357 info->fix.mmio_start = raddr; 3358 3358 par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); 3359 - if (par->ati_regbase == 0) 3359 + if (par->ati_regbase == NULL) 3360 3360 return -ENOMEM; 3361 3361 3362 3362 info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00;
+2 -2
drivers/video/aty/radeon_base.c
··· 2277 2277 do { 2278 2278 rinfo->fb_base = ioremap (rinfo->fb_base_phys, 2279 2279 rinfo->mapped_vram); 2280 - } while ( rinfo->fb_base == 0 && 2281 - ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); 2280 + } while (rinfo->fb_base == NULL && 2281 + ((rinfo->mapped_vram /= 2) >= MIN_MAPPED_VRAM)); 2282 2282 2283 2283 if (rinfo->fb_base == NULL) { 2284 2284 printk (KERN_ERR "radeonfb (%s): cannot map FB\n",
+1 -1
drivers/video/matrox/matroxfb_base.h
··· 200 200 virt->vaddr = ioremap_nocache(phys, size); 201 201 else 202 202 virt->vaddr = ioremap(phys, size); 203 - return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */ 203 + return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */ 204 204 } 205 205 206 206 static inline void mga_iounmap(vaddr_t va) {
+1 -1
drivers/video/sis/sis_main.c
··· 5787 5787 } else { 5788 5788 struct sis_video_info *countvideo = card_list; 5789 5789 ivideo->cardnumber = 1; 5790 - while((countvideo = countvideo->next) != 0) 5790 + while((countvideo = countvideo->next) != NULL) 5791 5791 ivideo->cardnumber++; 5792 5792 } 5793 5793