media: atomisp: restore missing 'return' statement
Subsystems (4)
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.
--- .../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
@@ -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
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")Signed-off-by Arnd Bergmann <[email protected]>
Thanks!
Signature · 1 line
Sakari Ailus
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")Signed-off-by Arnd Bergmann <[email protected]>
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@@ -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
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")Signed-off-by Arnd Bergmann <[email protected]>I hit this too. Thanks!
Reviewed-by Kees Cook <[email protected]>
Me too,
Pavel, how have you tested it?
Signature · 2 lines
With Best Regards, Andy Shevchenko
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")Signed-off-by Arnd Bergmann <[email protected]>I hit this too. Thanks!
Quoted 8 lines
Quoted 1 line
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
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")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Quoted 3 lines
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.
Signature · 1 line
Kees Cook
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")Signed-off-by Arnd Bergmann <[email protected]>I hit this too. Thanks!
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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
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")Signed-off-by Arnd Bergmann <[email protected]>--- .../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
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.
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")Signed-off-by Arnd Bergmann <[email protected]>--- .../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
-0drivers/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.