* [PATCH 4/4] drivers: atm, char fix integer as NULL pointer warnings
@ 2008-04-28 21:13 Harvey Harrison
2008-04-30 23:32 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-04-28 21:13 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Al Viro, LKML
drivers/atm/nicstar.c:418:25: warning: Using plain integer as NULL pointer
drivers/char/drm/r128_cce.c:820:25: warning: Using plain integer as NULL pointer
drivers/char/tty_io.c:1183:10: warning: Using plain integer as NULL pointer
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
drivers/atm/nicstar.c | 2 +-
drivers/char/drm/r128_cce.c | 2 +-
drivers/char/tty_io.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 38c769f..3da804b 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -415,7 +415,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
card->pcidev = pcidev;
membase = pci_resource_start(pcidev, 1);
card->membase = ioremap(membase, NS_IOREMAP_SIZE);
- if (card->membase == 0)
+ if (!card->membase)
{
printk("nicstar%d: can't ioremap() membase.\n",i);
error = 3;
diff --git a/drivers/char/drm/r128_cce.c b/drivers/char/drm/r128_cce.c
index f36adbd..c31afbd 100644
--- a/drivers/char/drm/r128_cce.c
+++ b/drivers/char/drm/r128_cce.c
@@ -817,7 +817,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev)
for (i = 0; i < dma->buf_count; i++) {
buf = dma->buflist[i];
buf_priv = buf->dev_private;
- if (buf->file_priv == 0)
+ if (!buf->file_priv)
return buf;
}
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 4d3c701..98b65a2 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1180,7 +1180,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
if (*str == ',')
str++;
if (*str == '\0')
- str = 0;
+ str = NULL;
if (tty_line >= 0 && tty_line <= p->num && p->poll_init &&
!p->poll_init(p, tty_line, str)) {
--
1.5.5.1.270.g89765
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/4] drivers: atm, char fix integer as NULL pointer warnings
2008-04-28 21:13 [PATCH 4/4] drivers: atm, char fix integer as NULL pointer warnings Harvey Harrison
@ 2008-04-30 23:32 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2008-04-30 23:32 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Linus Torvalds, Al Viro, LKML
> diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
> index 4d3c701..98b65a2 100644
> --- a/drivers/char/tty_io.c
> +++ b/drivers/char/tty_io.c
> @@ -1180,7 +1180,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
> if (*str == ',')
> str++;
> if (*str == '\0')
> - str = 0;
> + str = NULL;
>
> if (tty_line >= 0 && tty_line <= p->num && p->poll_init &&
> !p->poll_init(p, tty_line, str)) {
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-30 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 21:13 [PATCH 4/4] drivers: atm, char fix integer as NULL pointer warnings Harvey Harrison
2008-04-30 23:32 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox