2021-10-02 23:24:35

by Ammar Faizi

[permalink] [raw]
Subject: [PATCH] media: atomisp: fix `-Werror=return-type`

Bedirhan reported build error:
```
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]
1649 | }
| ^
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:277: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o] Error 1
make[3]: *** [scripts/Makefile.build:540: drivers/staging/media/atomisp] Error 2
make[2]: *** [scripts/Makefile.build:540: drivers/staging/media] Error 2
make[1]: *** [scripts/Makefile.build:540: drivers/staging] Error 2
make: *** [Makefile:1868: drivers] Error 2
```

Commit 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp:
remove useless returns") incorrectly removed a required return results
in the above build error. Reinstate it.

Cc: Pavel Skripkin <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Sakari Ailus <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Reported-by: Bedirhan KURT <[email protected]>
Fixes: 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp: remove useless returns")
Signed-off-by: Ammar Faizi <[email protected]>
---
.../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 1 +
1 file changed, 1 insertion(+)

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..1bd917e81743 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,7 @@ 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.30.2


2021-10-03 16:31:04

by Pavel Skripkin

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: fix `-Werror=return-type`

On 10/3/21 02:17, Ammar Faizi wrote:
> Bedirhan reported build error:
> ```
> 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]
> 1649 | }
> | ^
> cc1: some warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:277: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o] Error 1
> make[3]: *** [scripts/Makefile.build:540: drivers/staging/media/atomisp] Error 2
> make[2]: *** [scripts/Makefile.build:540: drivers/staging/media] Error 2
> make[1]: *** [scripts/Makefile.build:540: drivers/staging] Error 2
> make: *** [Makefile:1868: drivers] Error 2
> ```
>
> Commit 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp:
> remove useless returns") incorrectly removed a required return results
> in the above build error. Reinstate it.
>
> Cc: Pavel Skripkin <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Sakari Ailus <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: Bedirhan KURT <[email protected]>
> Fixes: 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp: remove useless returns")
> Signed-off-by: Ammar Faizi <[email protected]>
> ---
> .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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..1bd917e81743 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,7 @@ 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.
>

Hi, Ammar!


Thank you for fixing this, but it's already fixed in linux-next tree.
See commit 05344a1d2ea7 ("media: atomisp: restore missing 'return'
statement").

Again, I am sorry for introducing this bug :(




With regards,
Pavel Skripkin

2021-10-03 23:40:18

by Ammar Faizi

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: fix `-Werror=return-type`

On Sun, Oct 3, 2021 at 11:19 PM Pavel Skripkin <[email protected]> wrote:
>
> On 10/3/21 02:17, Ammar Faizi wrote:
> > Bedirhan reported build error:
> > ```
> > 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]
> > 1649 | }
> > | ^
> > cc1: some warnings being treated as errors
> > make[4]: *** [scripts/Makefile.build:277: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o] Error 1
> > make[3]: *** [scripts/Makefile.build:540: drivers/staging/media/atomisp] Error 2
> > make[2]: *** [scripts/Makefile.build:540: drivers/staging/media] Error 2
> > make[1]: *** [scripts/Makefile.build:540: drivers/staging] Error 2
> > make: *** [Makefile:1868: drivers] Error 2
> > ```
> >
> > Commit 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp:
> > remove useless returns") incorrectly removed a required return results
> > in the above build error. Reinstate it.
> >
> > Cc: Pavel Skripkin <[email protected]>
> > Cc: Mauro Carvalho Chehab <[email protected]>
> > Cc: Sakari Ailus <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Reported-by: Bedirhan KURT <[email protected]>
> > Fixes: 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp: remove useless returns")
> > Signed-off-by: Ammar Faizi <[email protected]>
> > ---
> > .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > 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..1bd917e81743 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,7 @@ 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.
> >
>
> Hi, Ammar!
>
>
> Thank you for fixing this, but it's already fixed in linux-next tree.
> See commit 05344a1d2ea7 ("media: atomisp: restore missing 'return'
> statement").
>
> Again, I am sorry for introducing this bug :(
>
>
>
>
> With regards,
> Pavel Skripkin

No worries, thanks for the update :D

--
Ammar Faizi

2021-10-04 09:30:31

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: fix `-Werror=return-type`

On Sun, Oct 03, 2021 at 06:17:23AM +0700, Ammar Faizi wrote:
> Bedirhan reported build error:
> ```
> 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]
> 1649 | }
> | ^
> cc1: some warnings being treated as errors
> make[4]: *** [scripts/Makefile.build:277: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o] Error 1
> make[3]: *** [scripts/Makefile.build:540: drivers/staging/media/atomisp] Error 2
> make[2]: *** [scripts/Makefile.build:540: drivers/staging/media] Error 2
> make[1]: *** [scripts/Makefile.build:540: drivers/staging] Error 2
> make: *** [Makefile:1868: drivers] Error 2
> ```
>
> Commit 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp:
> remove useless returns") incorrectly removed a required return results
> in the above build error. Reinstate it.
>
> Cc: Pavel Skripkin <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Sakari Ailus <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Reported-by: Bedirhan KURT <[email protected]>
> Fixes: 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp: remove useless returns")
> Signed-off-by: Ammar Faizi <[email protected]>

What's going on with this? It's like the seventh time people have sent
a fix for it? Why are you not using against a current tree?

regards,
dan carpenter

2021-10-04 20:56:07

by Ammar Faizi

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: fix `-Werror=return-type`

On Mon, Oct 4, 2021 at 4:06 PM Dan Carpenter <[email protected]> wrote:
>
> On Sun, Oct 03, 2021 at 06:17:23AM +0700, Ammar Faizi wrote:
> > Bedirhan reported build error:
> > ```
> > 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]
> > 1649 | }
> > | ^
> > cc1: some warnings being treated as errors
> > make[4]: *** [scripts/Makefile.build:277: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.o] Error 1
> > make[3]: *** [scripts/Makefile.build:540: drivers/staging/media/atomisp] Error 2
> > make[2]: *** [scripts/Makefile.build:540: drivers/staging/media] Error 2
> > make[1]: *** [scripts/Makefile.build:540: drivers/staging] Error 2
> > make: *** [Makefile:1868: drivers] Error 2
> > ```
> >
> > Commit 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp:
> > remove useless returns") incorrectly removed a required return results
> > in the above build error. Reinstate it.
> >
> > Cc: Pavel Skripkin <[email protected]>
> > Cc: Mauro Carvalho Chehab <[email protected]>
> > Cc: Sakari Ailus <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Reported-by: Bedirhan KURT <[email protected]>
> > Fixes: 264f590899146baa19e0ab5689e55fadbc292333 ("media: atomisp: remove useless returns")
> > Signed-off-by: Ammar Faizi <[email protected]>
>
> What's going on with this? It's like the seventh time people have sent
> a fix for it? Why are you not using against a current tree?
>
> regards,
> dan carpenter
>

Sorry for the duplicate. It broke my build. I am using Linus' tree
5.15-rc4, the error still lives here. My mistake, I didn't check the
linux-next tree before sending this fix.

--
Ammar Faizi

2021-10-04 21:05:02

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] media: atomisp: fix `-Werror=return-type`

On Mon, Oct 04, 2021 at 09:11:00PM +0700, Ammar Faizi wrote:
>
> Sorry for the duplicate. It broke my build. I am using Linus' tree
> 5.15-rc4, the error still lives here. My mistake, I didn't check the
> linux-next tree before sending this fix.

Mauro,

Can you please send commit bbe54b1a75a3 ("media: atomisp: restore
missing 'return' statement") to Linus for v5.15. Otherwise we're in
for a world of hurt...

regards,
dan carpenter