提交 5e2daeb3 编写于 作者: H Harvey Harrison 提交者: Linus Torvalds

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: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9bcf0910
...@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i ...@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i
info->fix.mmio_start = raddr; info->fix.mmio_start = raddr;
par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
if (par->ati_regbase == 0) if (par->ati_regbase == NULL)
return -ENOMEM; return -ENOMEM;
info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00;
......
...@@ -2277,8 +2277,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, ...@@ -2277,8 +2277,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
do { do {
rinfo->fb_base = ioremap (rinfo->fb_base_phys, rinfo->fb_base = ioremap (rinfo->fb_base_phys,
rinfo->mapped_vram); rinfo->mapped_vram);
} while ( rinfo->fb_base == 0 && } while (rinfo->fb_base == NULL &&
((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); ((rinfo->mapped_vram /= 2) >= MIN_MAPPED_VRAM));
if (rinfo->fb_base == NULL) { if (rinfo->fb_base == NULL) {
printk (KERN_ERR "radeonfb (%s): cannot map FB\n", printk (KERN_ERR "radeonfb (%s): cannot map FB\n",
......
...@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags, ...@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags,
virt->vaddr = ioremap_nocache(phys, size); virt->vaddr = ioremap_nocache(phys, size);
else else
virt->vaddr = ioremap(phys, size); virt->vaddr = ioremap(phys, size);
return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */ return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */
} }
static inline void mga_iounmap(vaddr_t va) { static inline void mga_iounmap(vaddr_t va) {
......
...@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} else { } else {
struct sis_video_info *countvideo = card_list; struct sis_video_info *countvideo = card_list;
ivideo->cardnumber = 1; ivideo->cardnumber = 1;
while((countvideo = countvideo->next) != 0) while((countvideo = countvideo->next) != NULL)
ivideo->cardnumber++; ivideo->cardnumber++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册