linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: vb2: Fix compilation warning
@ 2019-02-01 14:51 Laurent Pinchart
  2019-02-01 14:54 ` Hans Verkuil
  2019-02-05  9:40 ` Sakari Ailus
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2019-02-01 14:51 UTC (permalink / raw)
  To: linux-media; +Cc: Pawel Osciak, Paul Kocialkowski, Hans Verkuil, Sakari Ailus

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)
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: vb2: Fix compilation warning
  2019-02-01 14:51 [PATCH] media: vb2: Fix compilation warning Laurent Pinchart
@ 2019-02-01 14:54 ` Hans Verkuil
  2019-02-05  9:40 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-02-01 14:54 UTC (permalink / raw)
  To: Laurent Pinchart, linux-media
  Cc: Pawel Osciak, Paul Kocialkowski, Hans Verkuil, Sakari Ailus

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)

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: vb2: Fix compilation warning
  2019-02-01 14:51 [PATCH] media: vb2: Fix compilation warning Laurent Pinchart
  2019-02-01 14:54 ` Hans Verkuil
@ 2019-02-05  9:40 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2019-02-05  9:40 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-media, Pawel Osciak, Paul Kocialkowski, Hans Verkuil

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)

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-05  9:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01 14:51 [PATCH] media: vb2: Fix compilation warning Laurent Pinchart
2019-02-01 14:54 ` Hans Verkuil
2019-02-05  9:40 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).