Skip to contentSkip to conversation

v4l: list entries no need to check

PATCH In review Figo.zhang 2 participants 2 messages Nov 17, 2010 – Jan 2, 2011 Media (V4L/DVB)

lore
Share & tools
lore

Figo.zhang

author
#0 lore raw

PATCH 1/1 v4l: list entries no need to check

list entries are not need to be inited, so it no need for checking.

---
 drivers/media/video/mx1_camera.c           |    3 ---
 drivers/media/video/pxa_camera.c           |    3 ---
 drivers/media/video/sh_mobile_ceu_camera.c |    3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)
drivers/media/video/mx1_camera.c +0 -3
index 5c17f9e..cb2dd24 100644
@@ -182,9 +182,6 @@ static int mx1_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(icd->dev.parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 	BUG_ON(NULL == icd->current_fmt);
 
 	/*
drivers/media/video/pxa_camera.c +0 -3
index 9de7d59..421de10 100644
@@ -444,9 +444,6 @@ static int pxa_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 #ifdef DEBUG
 	/*
 	 * This can be useful if you want to see if we actually fill
drivers/media/video/sh_mobile_ceu_camera.c +0 -3
index 2b24bd0..b2bef3f 100644
@@ -354,9 +354,6 @@ static int sh_mobile_ceu_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(icd->dev.parent, "%s (vb=0x%p) 0x%08lx %zd\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 #ifdef DEBUG
 	/*
 	 * This can be useful if you want to see if we actually fill
#1 lore raw
Quoted 17 lines · Figo.zhang

list entries are not need to be inited, so it no need for checking.

---
 drivers/media/video/mx1_camera.c           |    3 ---
 drivers/media/video/pxa_camera.c           |    3 ---
 drivers/media/video/sh_mobile_ceu_camera.c |    3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)
drivers/media/video/mx1_camera.c +0 -0
index 5c17f9e..cb2dd24 100644

drivers/media/video/mx1_camera.c static int mx1_videobuf_prepare(struct videobuf_queue *vq, · line 187

Quoted 9 lines
drivers/media/video/mx1_camera.c +0 -3
@@ -182,9 +182,6 @@ static int mx1_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(icd->dev.parent, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 	BUG_ON(NULL == icd->current_fmt);
 
 	/*

NAK. See comment in mx1_camera_reqbufs() above the call to INIT_LIST_HEAD(). If we decide to remove that debugging, we'd have to remove list initialisations there and in all list_del_init() calls.

Thanks
Guennadi

Quoted 31 lines
drivers/media/video/pxa_camera.c +0 -3
index 9de7d59..421de10 100644
@@ -444,9 +444,6 @@ static int pxa_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(dev, "%s (vb=0x%p) 0x%08lx %d\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 #ifdef DEBUG
 	/*
 	 * This can be useful if you want to see if we actually fill
drivers/media/video/sh_mobile_ceu_camera.c +0 -4
index 2b24bd0..b2bef3f 100644
@@ -354,9 +354,6 @@ static int sh_mobile_ceu_videobuf_prepare(struct videobuf_queue *vq,
 	dev_dbg(icd->dev.parent, "%s (vb=0x%p) 0x%08lx %zd\n", __func__,
 		vb, vb->baddr, vb->bsize);
 
-	/* Added list head initialization on alloc */
-	WARN_ON(!list_empty(&vb->queue));
-
 #ifdef DEBUG
 	/*
 	 * This can be useful if you want to see if we actually fill
 
 
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/