diff mbox series

media: vb2: Fix compilation warning

Message ID 20190201145135.20038-1-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series media: vb2: Fix compilation warning | expand

Commit Message

Laurent Pinchart Feb. 1, 2019, 2:51 p.m. UTC
Commit 2cc1802f62e5 removed code without removing a local variable that
ended up being unused. This results in a compilation warning, fix it.

Fixes: 2cc1802f62e5 ("media: vb2: Keep dma-buf buffers mapped until they are freed")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/common/videobuf2/videobuf2-core.c | 1 -
 1 file changed, 1 deletion(-)

I wonder how the offending commit got merged without the warning being
noticed. Sakari, as a useful exercise, could you check whether this
would have been caught by the automatic build system you're
experimenting with ?

Comments

Hans Verkuil Feb. 1, 2019, 2:54 p.m. UTC | #1
This is already fixed in a pending pull request.

Hans

On February 1, 2019 3:51:35 PM GMT+01:00, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:
>Commit 2cc1802f62e5 removed code without removing a local variable that
>ended up being unused. This results in a compilation warning, fix it.
>
>Fixes: 2cc1802f62e5 ("media: vb2: Keep dma-buf buffers mapped until
>they are freed")
>Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>---
> drivers/media/common/videobuf2/videobuf2-core.c | 1 -
> 1 file changed, 1 deletion(-)
>
>I wonder how the offending commit got merged without the warning being
>noticed. Sakari, as a useful exercise, could you check whether this
>would have been caught by the automatic build system you're
>experimenting with ?
>
>diff --git a/drivers/media/common/videobuf2/videobuf2-core.c
>b/drivers/media/common/videobuf2/videobuf2-core.c
>index e07b6bdb6982..34cc87ca8d59 100644
>--- a/drivers/media/common/videobuf2/videobuf2-core.c
>+++ b/drivers/media/common/videobuf2/videobuf2-core.c
>@@ -1769,7 +1769,6 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
> static void __vb2_dqbuf(struct vb2_buffer *vb)
> {
> 	struct vb2_queue *q = vb->vb2_queue;
>-	unsigned int i;
> 
> 	/* nothing to do if the buffer is already dequeued */
> 	if (vb->state == VB2_BUF_STATE_DEQUEUED)
Sakari Ailus Feb. 5, 2019, 9:40 a.m. UTC | #2
Hi Laurent,

On Fri, Feb 01, 2019 at 04:51:35PM +0200, Laurent Pinchart wrote:
> Commit 2cc1802f62e5 removed code without removing a local variable that
> ended up being unused. This results in a compilation warning, fix it.
> 
> Fixes: 2cc1802f62e5 ("media: vb2: Keep dma-buf buffers mapped until they are freed")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/common/videobuf2/videobuf2-core.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> I wonder how the offending commit got merged without the warning being
> noticed. Sakari, as a useful exercise, could you check whether this
> would have been caught by the automatic build system you're
> experimenting with ?

Certainly. It compiles each new patch in a branch separately and looks up
for new warnings or errors.

That said, it's not quite usable yet. I'll let you know when I have
something to show...

> 
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index e07b6bdb6982..34cc87ca8d59 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
> @@ -1769,7 +1769,6 @@ EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
>  static void __vb2_dqbuf(struct vb2_buffer *vb)
>  {
>  	struct vb2_queue *q = vb->vb2_queue;
> -	unsigned int i;
>  
>  	/* nothing to do if the buffer is already dequeued */
>  	if (vb->state == VB2_BUF_STATE_DEQUEUED)
diff mbox series

Patch

diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index e07b6bdb6982..34cc87ca8d59 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -1769,7 +1769,6 @@  EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
 static void __vb2_dqbuf(struct vb2_buffer *vb)
 {
 	struct vb2_queue *q = vb->vb2_queue;
-	unsigned int i;
 
 	/* nothing to do if the buffer is already dequeued */
 	if (vb->state == VB2_BUF_STATE_DEQUEUED)