public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* V4.1-RC build error after commit 77a3c6f
@ 2015-07-11 21:27 Larry Finger
  2015-07-11 21:30 ` Larry Finger
  2015-07-12 23:10 ` Laurent Pinchart
  0 siblings, 2 replies; 5+ messages in thread
From: Larry Finger @ 2015-07-11 21:27 UTC (permalink / raw)
  To: LKML, Laurent Pinchart, Mauro Carvalho Chehab; +Cc: Larry Finger

[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]

Beginning with the commit in the subject, I get the following build error:

   CC [M]  drivers/media/v4l2-core/videobuf2-core.o
drivers/media/v4l2-core/videobuf2-core.c: In function ‘vb2_warn_zero_bytesused’:
drivers/media/v4l2-core/videobuf2-core.c:1253:2: error: implicit declaration of 
function ‘__WARN’ [-Werror=implicit-function-declaration]
   __WARN();
   ^
cc1: some warnings being treated as errors

My .config is attached.

This problem has been bisected to the following commit:

commit 77a3c6fd90c94f635edb00d4a65f485687538791
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Date:   Fri Jun 19 08:50:07 2015 -0300

     [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers

     Commit f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the
     vb2_queue struct") added a WARN_ONCE to catch usage of a deprecated API
     using a zero value for v4l2_buffer.bytesused.

     However, the condition is checked incorrectly, as the v4L2_buffer
     bytesused field is supposed to be ignored for multiplanar buffers. This
     results in spurious warnings when using the multiplanar API.

     Fix it by checking v4l2_buffer.bytesused for uniplanar buffers and
     v4l2_plane.bytesused for multiplanar buffers.

     Fixes: f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the 
vb2_queue struct")

     Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
     Cc: stable@vger.kernel.org # for v4.0
     Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Thanks,

Larry

[-- Attachment #2: .config --]
[-- Type: application/x-config, Size: 110253 bytes --]

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

* Re: V4.1-RC build error after commit 77a3c6f
  2015-07-11 21:27 V4.1-RC build error after commit 77a3c6f Larry Finger
@ 2015-07-11 21:30 ` Larry Finger
  2015-07-12 23:10 ` Laurent Pinchart
  1 sibling, 0 replies; 5+ messages in thread
From: Larry Finger @ 2015-07-11 21:30 UTC (permalink / raw)
  To: LKML, Laurent Pinchart, Mauro Carvalho Chehab

The subject should say V4.2-RC. Sorry.

Larry

On 07/11/2015 04:27 PM, Larry Finger wrote:
> Beginning with the commit in the subject, I get the following build error:
>
>    CC [M]  drivers/media/v4l2-core/videobuf2-core.o
> drivers/media/v4l2-core/videobuf2-core.c: In function ‘vb2_warn_zero_bytesused’:
> drivers/media/v4l2-core/videobuf2-core.c:1253:2: error: implicit declaration of
> function ‘__WARN’ [-Werror=implicit-function-declaration]
>    __WARN();
>    ^
> cc1: some warnings being treated as errors
>
> My .config is attached.
>
> This problem has been bisected to the following commit:
>
> commit 77a3c6fd90c94f635edb00d4a65f485687538791
> Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Date:   Fri Jun 19 08:50:07 2015 -0300
>
>      [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar
> buffers
>
>      Commit f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the
>      vb2_queue struct") added a WARN_ONCE to catch usage of a deprecated API
>      using a zero value for v4l2_buffer.bytesused.
>
>      However, the condition is checked incorrectly, as the v4L2_buffer
>      bytesused field is supposed to be ignored for multiplanar buffers. This
>      results in spurious warnings when using the multiplanar API.
>
>      Fix it by checking v4l2_buffer.bytesused for uniplanar buffers and
>      v4l2_plane.bytesused for multiplanar buffers.
>
>      Fixes: f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the
> vb2_queue struct")
>
>      Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>      Cc: stable@vger.kernel.org # for v4.0
>      Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>
> Thanks,
>
> Larry


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

* Re: V4.1-RC build error after commit 77a3c6f
  2015-07-11 21:27 V4.1-RC build error after commit 77a3c6f Larry Finger
  2015-07-11 21:30 ` Larry Finger
@ 2015-07-12 23:10 ` Laurent Pinchart
  2015-07-13  1:35   ` Larry Finger
  1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2015-07-12 23:10 UTC (permalink / raw)
  To: Larry Finger; +Cc: LKML, Laurent Pinchart, Mauro Carvalho Chehab

Hi Larry,

Thank you for the report.

On Saturday 11 July 2015 16:27:36 Larry Finger wrote:
> Beginning with the commit in the subject, I get the following build error:
> 
>    CC [M]  drivers/media/v4l2-core/videobuf2-core.o
> drivers/media/v4l2-core/videobuf2-core.c: In function
> ‘vb2_warn_zero_bytesused’: drivers/media/v4l2-core/videobuf2-core.c:1253:2:
> error: implicit declaration of function ‘__WARN’
> [-Werror=implicit-function-declaration]
>    __WARN();
>    ^
> cc1: some warnings being treated as errors
> 
> My .config is attached.

Indeed, __WARN isn't defined when CONFIG_BUG isn't set. My bad :-/

I've send a patch to fix this (you've been CC'ed), could you please review it 
?

And I've just noticed that I forgot to add your Reported-by: tag, please feel 
free to add it to the review.

> This problem has been bisected to the following commit:
> 
> commit 77a3c6fd90c94f635edb00d4a65f485687538791
> Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Date:   Fri Jun 19 08:50:07 2015 -0300
> 
>      [media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar
> buffers
> 
>      Commit f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the
> vb2_queue struct") added a WARN_ONCE to catch usage of a deprecated API
> using a zero value for v4l2_buffer.bytesused.
> 
>      However, the condition is checked incorrectly, as the v4L2_buffer
>      bytesused field is supposed to be ignored for multiplanar buffers. This
> results in spurious warnings when using the multiplanar API.
> 
>      Fix it by checking v4l2_buffer.bytesused for uniplanar buffers and
>      v4l2_plane.bytesused for multiplanar buffers.
> 
>      Fixes: f61bf13b6a07 ("[media] vb2: add allow_zero_bytesused flag to the
> vb2_queue struct")
> 
>      Signed-off-by: Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com> Cc: stable@vger.kernel.org #
> for v4.0
>      Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> Thanks,
> 
> Larry

-- 
Regards,

Laurent Pinchart


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

* Re: V4.1-RC build error after commit 77a3c6f
  2015-07-12 23:10 ` Laurent Pinchart
@ 2015-07-13  1:35   ` Larry Finger
  2015-07-13  8:25     ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2015-07-13  1:35 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: LKML, Laurent Pinchart, Mauro Carvalho Chehab

On 07/12/2015 06:10 PM, Laurent Pinchart wrote:
> Hi Larry,
>
> Thank you for the report.
>
> On Saturday 11 July 2015 16:27:36 Larry Finger wrote:
>> Beginning with the commit in the subject, I get the following build error:
>>
>>     CC [M]  drivers/media/v4l2-core/videobuf2-core.o
>> drivers/media/v4l2-core/videobuf2-core.c: In function
>> ‘vb2_warn_zero_bytesused’: drivers/media/v4l2-core/videobuf2-core.c:1253:2:
>> error: implicit declaration of function ‘__WARN’
>> [-Werror=implicit-function-declaration]
>>     __WARN();
>>     ^
>> cc1: some warnings being treated as errors
>>
>> My .config is attached.
>
> Indeed, __WARN isn't defined when CONFIG_BUG isn't set. My bad :-/
>
> I've send a patch to fix this (you've been CC'ed), could you please review it
> ?
>
> And I've just noticed that I forgot to add your Reported-by: tag, please feel
> free to add it to the review.

I added my "Acked-by:" for the __WARN to WARN_ON part. In addition, the rest 
looks good.

I do not need a Reported-by to be added. I'm a volunteer, thus it does not 
matter how many times my name is mentioned. Another one will never increase my 
remuneration.

I have also submitted a patch to make certain that __WARN is defined even when 
CONFIG_DEBUG is not defined. It may not be accepted, but if it does, no one else 
will be caught this way.

Larry



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

* Re: V4.1-RC build error after commit 77a3c6f
  2015-07-13  1:35   ` Larry Finger
@ 2015-07-13  8:25     ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2015-07-13  8:25 UTC (permalink / raw)
  To: Larry Finger, Mauro Carvalho Chehab; +Cc: LKML

Hi Larry,

On Sunday 12 July 2015 20:35:32 Larry Finger wrote:
> On 07/12/2015 06:10 PM, Laurent Pinchart wrote:
> > Hi Larry,
> > 
> > Thank you for the report.
> > 
> > On Saturday 11 July 2015 16:27:36 Larry Finger wrote:
> >> Beginning with the commit in the subject, I get the following build 
error:
> >>     CC [M]  drivers/media/v4l2-core/videobuf2-core.o
> >> 
> >> drivers/media/v4l2-core/videobuf2-core.c: In function
> >> ‘vb2_warn_zero_bytesused’:
> >> drivers/media/v4l2-core/videobuf2-core.c:1253:2:
> >> error: implicit declaration of function ‘__WARN’
> >> [-Werror=implicit-function-declaration]
> >> 
> >>     __WARN();
> >>     ^
> >> 
> >> cc1: some warnings being treated as errors
> >> 
> >> My .config is attached.
> > 
> > Indeed, __WARN isn't defined when CONFIG_BUG isn't set. My bad :-/
> > 
> > I've send a patch to fix this (you've been CC'ed), could you please review
> > it ?
> > 
> > And I've just noticed that I forgot to add your Reported-by: tag, please
> > feel free to add it to the review.
> 
> I added my "Acked-by:" for the __WARN to WARN_ON part. In addition, the rest
> looks good.

Thank you.

> I do not need a Reported-by to be added. I'm a volunteer, thus it does not
> matter how many times my name is mentioned. Another one will never increase
> my remuneration.

I'm afraid I wouldn't be in a position to increase your remuneration even if 
you were paid to report issues :-) Still, the point of the Reported-by: tag is 
recognition of contributors. This topic is currently being discussed as a 
canditate for the Linux kernel summit (see 
http://lists.linuxfoundation.org/pipermail/ksummit-discuss/2015-July/001318.html for instance). Feel free to chime in, we mostly have long 
time kernel maintainers in the e-mail thread, it would be nice to get the 
point of few of volunteers as well.

> I have also submitted a patch to make certain that __WARN is defined even
> when CONFIG_DEBUG is not defined. It may not be accepted, but if it does,
> no one else will be caught this way.

Thank you.

-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2015-07-13  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-11 21:27 V4.1-RC build error after commit 77a3c6f Larry Finger
2015-07-11 21:30 ` Larry Finger
2015-07-12 23:10 ` Laurent Pinchart
2015-07-13  1:35   ` Larry Finger
2015-07-13  8:25     ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox