2021-08-02 14:40:17

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] media: atomisp: restore missing 'return' statement

From: Arnd Bergmann <[email protected]>

The input_system_configure_channel_sensor() function lost its final
return code in a previous patch:

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]

Restore what was there originally.

Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
Signed-off-by: Arnd Bergmann <[email protected]>
---
.../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
index 8e085dda0c18..712e01c37870 100644
--- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
+++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
@@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor(
default:
return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
}
+
+ return INPUT_SYSTEM_ERR_NO_ERROR;
}

// Test flags and set structure.
--
2.29.2



2021-08-02 15:38:35

by Sakari Ailus

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> The input_system_configure_channel_sensor() function lost its final
> return code in a previous patch:
>
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
>
> Restore what was there originally.
>
> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> Signed-off-by: Arnd Bergmann <[email protected]>

Thanks!

Acked-by: Sakari Ailus <[email protected]>

--
Sakari Ailus

2021-08-13 16:40:29

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> The input_system_configure_channel_sensor() function lost its final
> return code in a previous patch:
>
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
>
> Restore what was there originally.
>
> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> Signed-off-by: Arnd Bergmann <[email protected]>

I hit this too. Thanks!

Reviewed-by: Kees Cook <[email protected]>

-Kees

> ---
> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> index 8e085dda0c18..712e01c37870 100644
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor(
> default:
> return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
> }
> +
> + return INPUT_SYSTEM_ERR_NO_ERROR;
> }
>
> // Test flags and set structure.
> --
> 2.29.2
>

--
Kees Cook

2021-08-19 17:26:04

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <[email protected]> wrote:
>
> On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > The input_system_configure_channel_sensor() function lost its final
> > return code in a previous patch:
> >
> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
> >
> > Restore what was there originally.
> >
> > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> > Signed-off-by: Arnd Bergmann <[email protected]>
>
> I hit this too. Thanks!
>
> Reviewed-by: Kees Cook <[email protected]>

Me too,
Tested-by: Andy Shevchenko <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>

Pavel, how have you tested it?

--
With Best Regards,
Andy Shevchenko

2021-08-19 19:26:35

by Pavel Skripkin

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On 8/19/21 8:24 PM, Andy Shevchenko wrote:
> On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <[email protected]> wrote:
>>
>> On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
>> > From: Arnd Bergmann <[email protected]>
>> >
>> > The input_system_configure_channel_sensor() function lost its final
>> > return code in a previous patch:
>> >
>> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
>> > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
>> >
>> > Restore what was there originally.
>> >
>> > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
>> > Signed-off-by: Arnd Bergmann <[email protected]>
>>
>> I hit this too. Thanks!
>>
>> Reviewed-by: Kees Cook <[email protected]>
>
> Me too,
> Tested-by: Andy Shevchenko <[email protected]>
> Reviewed-by: Andy Shevchenko <[email protected]>
>
> Pavel, how have you tested it?
>

To he honest, I didn't test it at all. It was part of application
processes to LFX mentoship. I really don't like style changes. Anyway, I
have to do it to pass the task, so, yeah, I messed up with this one ;(

Also, I didn't notice when patch was applied, because I was like 2 month
after v3 posted. I am so sorry for this situation. Nowadays I always
test my patches.

I was young and foolish :)


With regards,
Pavel Skripkin

2021-08-21 05:55:40

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On Thu, Aug 19, 2021 at 08:24:11PM +0300, Andy Shevchenko wrote:
> On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <[email protected]> wrote:
> >
> > On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <[email protected]>
> > >
> > > The input_system_configure_channel_sensor() function lost its final
> > > return code in a previous patch:
> > >
> > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
> > >
> > > Restore what was there originally.
> > >
> > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> > > Signed-off-by: Arnd Bergmann <[email protected]>
> >
> > I hit this too. Thanks!
> >
> > Reviewed-by: Kees Cook <[email protected]>
>
> Me too,
> Tested-by: Andy Shevchenko <[email protected]>
> Reviewed-by: Andy Shevchenko <[email protected]>

Mauro, are you able to get this into your tree, please? Or Greg? It's in
staging. :) This is breaking the build.

--
Kees Cook

2021-08-21 06:41:31

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

Em Fri, 20 Aug 2021 22:53:37 -0700
Kees Cook <[email protected]> escreveu:

> On Thu, Aug 19, 2021 at 08:24:11PM +0300, Andy Shevchenko wrote:
> > On Fri, Aug 13, 2021 at 7:39 PM Kees Cook <[email protected]> wrote:
> > >
> > > On Mon, Aug 02, 2021 at 04:38:14PM +0200, Arnd Bergmann wrote:
> > > > From: Arnd Bergmann <[email protected]>
> > > >
> > > > The input_system_configure_channel_sensor() function lost its final
> > > > return code in a previous patch:
> > > >
> > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> > > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
> > > >
> > > > Restore what was there originally.
> > > >
> > > > Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> > > > Signed-off-by: Arnd Bergmann <[email protected]>
> > >
> > > I hit this too. Thanks!
> > >
> > > Reviewed-by: Kees Cook <[email protected]>
> >
> > Me too,
> > Tested-by: Andy Shevchenko <[email protected]>
> > Reviewed-by: Andy Shevchenko <[email protected]>
>
> Mauro, are you able to get this into your tree, please? Or Greg? It's in
> staging. :) This is breaking the build.

Didn't notice it was breaking the build for you.

Patch applied, thanks!

Thanks,
Mauro

2021-09-24 11:53:05

by Praveen Kumar

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On 24-09-2021 17:01, Praveen Kumar wrote:
> On 02-08-2021 20:08, Arnd Bergmann wrote:
>> From: Arnd Bergmann <[email protected]>
>>
>> The input_system_configure_channel_sensor() function lost its final
>> return code in a previous patch:
>>
>> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
>> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
>>
>> Restore what was there originally.
>>
>> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> ---
>> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
>> index 8e085dda0c18..712e01c37870 100644
>> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
>> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
>> @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor(
>> default:
>> return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
>> }
>> +
>> + return INPUT_SYSTEM_ERR_NO_ERROR;
>
> I would recommend to return "status" instead of INPUT_SYSTEM_ERR_NO_ERROR,
> this will take care of sending correct return code, we encounter in different case statements.
> Something like below would be better. Thanks.
>
> - return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
> + status = INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
> }
> + return status;

Please ignore this comment. My bad, we don't reach anytime here during failure.

Regards,

~Praveen.

2021-09-24 16:28:07

by Praveen Kumar

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: restore missing 'return' statement

On 02-08-2021 20:08, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> The input_system_configure_channel_sensor() function lost its final
> return code in a previous patch:
>
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c: In function 'input_system_configure_channel_sensor':
> drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:1649:1: error: control reaches end of non-void function [-Werror=return-type]
>
> Restore what was there originally.
>
> Fixes: 728a5c64ae5f ("media: atomisp: remove dublicate code")
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> index 8e085dda0c18..712e01c37870 100644
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c
> @@ -1646,6 +1646,8 @@ static input_system_err_t input_system_configure_channel_sensor(
> default:
> return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
> }
> +
> + return INPUT_SYSTEM_ERR_NO_ERROR;

I would recommend to return "status" instead of INPUT_SYSTEM_ERR_NO_ERROR,
this will take care of sending correct return code, we encounter in different case statements.
Something like below would be better. Thanks.

- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ status = INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
}
+ return status;

Regards,

~Praveen.