* [PATCH 04/10] video: fix integer as NULL pointer warnings
@ 2008-04-30 22:03 Harvey Harrison
2008-05-01 23:07 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-04-30 22:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML
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
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
drivers/video/aty/atyfb_base.c | 2 +-
drivers/video/aty/radeon_base.c | 2 +-
drivers/video/matrox/matroxfb_base.h | 2 +-
drivers/video/sis/sis_main.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index e4bcf53..d051d3e 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i
info->fix.mmio_start = raddr;
par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
- if (par->ati_regbase == 0)
+ if (!par->ati_regbase)
return -ENOMEM;
info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00;
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 72cd0d2..cca6c84 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2277,7 +2277,7 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
do {
rinfo->fb_base = ioremap (rinfo->fb_base_phys,
rinfo->mapped_vram);
- } while ( rinfo->fb_base == 0 &&
+ } while (!rinfo->fb_base &&
((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) );
if (rinfo->fb_base == NULL) {
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index f3107ad..9588323 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags,
virt->vaddr = ioremap_nocache(phys, size);
else
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) {
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 7380362..b934384 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} else {
struct sis_video_info *countvideo = card_list;
ivideo->cardnumber = 1;
- while((countvideo = countvideo->next) != 0)
+ while((countvideo = countvideo->next) != NULL)
ivideo->cardnumber++;
}
--
1.5.5.1.305.g7c84
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 04/10] video: fix integer as NULL pointer warnings
2008-04-30 22:03 [PATCH 04/10] video: fix integer as NULL pointer warnings Harvey Harrison
@ 2008-05-01 23:07 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2008-05-01 23:07 UTC (permalink / raw)
To: Harvey Harrison; +Cc: linux-kernel
On Wed, 30 Apr 2008 15:03:41 -0700
Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> Subject: [PATCH 04/10] video: fix integer as NULL pointer warnings
>
> drivers/video/aty/atyfb_base.c | 2 +-
> drivers/video/aty/radeon_base.c | 2 +-
> drivers/video/matrox/matroxfb_base.h | 2 +-
> drivers/video/sis/sis_main.c | 2 +-
drivers/video is called "fbdev", believe it or not. To avoid confusion
with drivers/media/video, which is called dvb. Or v4l.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-01 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 22:03 [PATCH 04/10] video: fix integer as NULL pointer warnings Harvey Harrison
2008-05-01 23:07 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox