Skip to contentSkip to conversation

media: atomisp: restore missing 'return' statement

PATCH In review Arnd Bergmann 7 participants 9 messages Aug 2, 2021 – Sep 24, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c   | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +2 -0
index 8e085dda0c18..712e01c37870 100644
@@ -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.
Signature · 1 line
2.29.2
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

Quoted 7 lines

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")

Thanks!

Signature · 1 line
Sakari Ailus
Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

Quoted 7 lines

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")

I hit this too. Thanks!

-Kees

Quoted 20 lines
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c   | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +2 -0
index 8e085dda0c18..712e01c37870 100644
@@ -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.
Signature · 1 line
2.29.2
Signature · 1 line
Kees Cook
Tested-by Reviewed-by
#3 lore raw
Quoted 10 lines · Kees Cook
Quoted 8 lines · Arnd Bergmann

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]

Quoted 8 lines
Quoted 4 lines

Restore what was there originally.

Fixes 728a5c64ae5f ("media: atomisp: remove dublicate code")

I hit this too. Thanks!

Me too,

Pavel, how have you tested it?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Kees Cook
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

Quoted 7 lines

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")

I hit this too. Thanks!

Quoted 8 lines
Quoted 1 line

Me too,

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

#5 lore raw
In reply to Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 15 lines · Kees Cook
Quoted 12 lines · Arnd Bergmann

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")
Quoted 7 lines
Quoted 3 lines

I hit this too. Thanks!

Me too,

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

Signature · 1 line
Kees Cook
#6 lore raw

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

Quoted 19 lines · Andy Shevchenko
Quoted 18 lines · Kees Cook
Quoted 17 lines · Arnd Bergmann
Quoted 5 lines

From: Arnd Bergmann <[email protected]>

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

Quoted 7 lines

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")

I hit this too. Thanks!

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Me too,

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

#7 lore raw
In reply to Arnd Bergmann
Quoted 21 lines · Arnd Bergmann

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")
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c   | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +0 -0
index 8e085dda0c18..712e01c37870 100644

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c static input_system_err_t input_system_configure_channel_sensor( · line 1650

Quoted 5 lines
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +2 -0
@@ -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.

#8 lore raw
Quoted 32 lines · Praveen Kumar
Quoted 21 lines · Arnd Bergmann

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")
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c   | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +0 -0
index 8e085dda0c18..712e01c37870 100644

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c static input_system_err_t input_system_configure_channel_sensor( · line 1650

Quoted 5 lines
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +2 -0
@@ -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.

Review

Quoted 4 lines
(quoted diff) +2 -1
-               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.