Skip to contentSkip to conversation

media: videobuf2-dma-contig: quiet sparse noise about plain integer as NULL pointer

PATCH In review H Hartley Sweeten 2 participants 2 messages Apr 24, 2012 – Apr 26, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: videobuf2-dma-contig: quiet sparse noise about plain integer as NULL pointer

The function vb2_dma_contig_vaddr returns a void * not an integer.

Quiets the sparse noise:

warning: Using plain integer as NULL pointer

Cc Pawel Osciak <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>

---

drivers/media/video/videobuf2-dma-contig.c +1 -1
index f17ad98..7de6843 100644
@@ -85,7 +85,7 @@ static void *vb2_dma_contig_vaddr(void *buf_priv)
 {
 	struct vb2_dc_buf *buf = buf_priv;
 	if (!buf)
-		return 0;
+		return NULL;
 
 	return buf->vaddr;
 }
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 11 lines · H Hartley Sweeten

The function vb2_dma_contig_vaddr returns a void * not an integer.

Quiets the sparse noise:

warning: Using plain integer as NULL pointer

Cc Pawel Osciak <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Kyungmin Park <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Quoted 8 lines

---

drivers/media/video/videobuf2-dma- renamed from drivers/media/video/videobuf2-dma-contig.c +0 -0

contig.c
index f17ad98..7de6843 100644

drivers/media/video/videobuf2-dma-contig.c static void *vb2_dma_contig_vaddr(void *buf_priv) · line 91

Quoted 8 lines
drivers/media/video/videobuf2-dma-contig.c +1 -1
@@ -85,7 +85,7 @@ static void *vb2_dma_contig_vaddr(void *buf_priv)
 {
 	struct vb2_dc_buf *buf = buf_priv;
 	if (!buf)
-		return 0;
+		return NULL;
 
 	return buf->vaddr;
 }

Best regards

Signature · 2 lines
Marek Szyprowski
Samsung Poland R&D Center