diff mbox

[1/2] v4l: vsp1: Add missing #include <linux/sched.h>

Message ID 1452536727-19538-1-git-send-email-geert+renesas@glider.be (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Geert Uytterhoeven Jan. 11, 2016, 6:25 p.m. UTC
If CONFIG_SPI=n:

drivers/media/platform/vsp1/vsp1_pipe.c: In function 'vsp1_pipeline_stop':
drivers/media/platform/vsp1/vsp1_pipe.c:226:429: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^
drivers/media/platform/vsp1/vsp1_pipe.c:226:429: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/vsp1/vsp1_pipe.c:226:642: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^
drivers/media/platform/vsp1/vsp1_pipe.c:226:688: error: 'TASK_KILLABLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^
drivers/media/platform/vsp1/vsp1_pipe.c:226:3: error: implicit declaration of function 'schedule_timeout' [-Werror=implicit-function-declaration]
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
   ^
drivers/media/platform/vsp1/vsp1_pipe.c: In function 'vsp1_pipeline_frame_end':
drivers/media/platform/vsp1/vsp1_pipe.c:287:24: error: 'TASK_NORMAL' undeclared (first use in this function)
   wake_up(&pipe->wq);
                        ^
drivers/media/platform/vsp1/vsp1_pipe.c: In function 'vsp1_pipelines_suspend':
drivers/media/platform/vsp1/vsp1_pipe.c:378:429: error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^
drivers/media/platform/vsp1/vsp1_pipe.c:378:642: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^
drivers/media/platform/vsp1/vsp1_pipe.c:378:688: error: 'TASK_KILLABLE' undeclared (first use in this function)
   ret = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe),
         ^

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Against renesas-drivers-2016-01-05-v4.4-rc8

 drivers/media/platform/vsp1/vsp1_pipe.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart Jan. 25, 2016, 12:37 a.m. UTC | #1
Hi Geert,

Thank you for the patch.

On Monday 11 January 2016 19:25:26 Geert Uytterhoeven wrote:
> If CONFIG_SPI=n:
> 
> drivers/media/platform/vsp1/vsp1_pipe.c: In function 'vsp1_pipeline_stop':
> drivers/media/platform/vsp1/vsp1_pipe.c:226:429: error:
> 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function) ret =
> wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c:226:429: note: each undeclared
> identifier is reported only once for each function it appears in
> drivers/media/platform/vsp1/vsp1_pipe.c:226:642: error:
> 'TASK_INTERRUPTIBLE' undeclared (first use in this function) ret =
> wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c:226:688: error: 'TASK_KILLABLE'
> undeclared (first use in this function) ret = wait_event_timeout(pipe->wq,
> vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c:226:3: error: implicit declaration
> of function 'schedule_timeout' [-Werror=implicit-function-declaration] ret
> = wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c: In function
> 'vsp1_pipeline_frame_end': drivers/media/platform/vsp1/vsp1_pipe.c:287:24:
> error: 'TASK_NORMAL' undeclared (first use in this function)
> wake_up(&pipe->wq);
>                         ^
> drivers/media/platform/vsp1/vsp1_pipe.c: In function
> 'vsp1_pipelines_suspend': drivers/media/platform/vsp1/vsp1_pipe.c:378:429:
> error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function) ret =
> wait_event_timeout(pipe->wq, vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c:378:642: error: 'TASK_INTERRUPTIBLE'
> undeclared (first use in this function) ret = wait_event_timeout(pipe->wq,
> vsp1_pipeline_stopped(pipe), ^
> drivers/media/platform/vsp1/vsp1_pipe.c:378:688: error: 'TASK_KILLABLE'
> undeclared (first use in this function) ret = wait_event_timeout(pipe->wq,
> vsp1_pipeline_stopped(pipe), ^
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

I've squashed the fix with the patch that introduced the issue, as it's not 
upstream yet.

I wonder, though, whether the right solution wouldn't be to fix wait.h and 
sched.h. They seem to depend on each other.

> ---
> Against renesas-drivers-2016-01-05-v4.4-rc8
> 
>  drivers/media/platform/vsp1/vsp1_pipe.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c
> b/drivers/media/platform/vsp1/vsp1_pipe.c index
> 96f0e7d4c400172e..2283e64f12faadd1 100644
> --- a/drivers/media/platform/vsp1/vsp1_pipe.c
> +++ b/drivers/media/platform/vsp1/vsp1_pipe.c
> @@ -13,6 +13,7 @@
> 
>  #include <linux/delay.h>
>  #include <linux/list.h>
> +#include <linux/sched.h>
>  #include <linux/wait.h>
> 
>  #include <media/media-entity.h>
Geert Uytterhoeven Jan. 25, 2016, 7:50 a.m. UTC | #2
Hi Laurent,

On Mon, Jan 25, 2016 at 1:37 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> I wonder, though, whether the right solution wouldn't be to fix wait.h and
> sched.h. They seem to depend on each other.

Include shuffling involving sched.h usually breaks something else, due to
include hell.

>> ---
>> Against renesas-drivers-2016-01-05-v4.4-rc8
>>
>>  drivers/media/platform/vsp1/vsp1_pipe.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c
>> b/drivers/media/platform/vsp1/vsp1_pipe.c index
>> 96f0e7d4c400172e..2283e64f12faadd1 100644
>> --- a/drivers/media/platform/vsp1/vsp1_pipe.c
>> +++ b/drivers/media/platform/vsp1/vsp1_pipe.c
>> @@ -13,6 +13,7 @@
>>
>>  #include <linux/delay.h>
>>  #include <linux/list.h>
>> +#include <linux/sched.h>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 25, 2016, 7:03 p.m. UTC | #3
Hi Geert,

On Monday 25 January 2016 08:50:04 Geert Uytterhoeven wrote:
> On Mon, Jan 25, 2016 at 1:37 AM, Laurent Pinchart wrote:
> > I wonder, though, whether the right solution wouldn't be to fix wait.h and
> > sched.h. They seem to depend on each other.
> 
> Include shuffling involving sched.h usually breaks something else, due to
> include hell.

Hence why I think that's where the real fix should go :-)

> >> ---
> >> Against renesas-drivers-2016-01-05-v4.4-rc8
> >> 
> >>  drivers/media/platform/vsp1/vsp1_pipe.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >> 
> >> diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c
> >> b/drivers/media/platform/vsp1/vsp1_pipe.c index
> >> 96f0e7d4c400172e..2283e64f12faadd1 100644
> >> --- a/drivers/media/platform/vsp1/vsp1_pipe.c
> >> +++ b/drivers/media/platform/vsp1/vsp1_pipe.c
> >> @@ -13,6 +13,7 @@
> >> 
> >>  #include <linux/delay.h>
> >>  #include <linux/list.h>
> >> 
> >> +#include <linux/sched.h>
diff mbox

Patch

diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c
index 96f0e7d4c400172e..2283e64f12faadd1 100644
--- a/drivers/media/platform/vsp1/vsp1_pipe.c
+++ b/drivers/media/platform/vsp1/vsp1_pipe.c
@@ -13,6 +13,7 @@ 
 
 #include <linux/delay.h>
 #include <linux/list.h>
+#include <linux/sched.h>
 #include <linux/wait.h>
 
 #include <media/media-entity.h>