media: atomisp: fix compilation error
Subsystems (4)
PATCH 1/1 media: atomisp: fix compilation error
I am getting the following compilation error on ubuntu 20.04 with gcc 9.3.0.
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
I made some minor changes to the switch-case to keep gcc happy.
--- .../media/atomisp/pci/hive_isp_css_common/host/input_system.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c +2 -1
@@ -1644,8 +1644,9 @@ static input_system_err_t input_system_configure_channel_sensor(case INPUT_SYSTEM_XMEM_CAPTURE :case INPUT_SYSTEM_XMEM_ACQUIRE :default : -return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED ; +break ; } +return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED ; }// Test flags and set structure.
Signature · 1 line
2.25.1
Quoted 5 lines · Tong Zhang
I am getting the following compilation error on ubuntu 20.04 with gcc 9.3.0.
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 | }
Quoted 7 lines
| ^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 1I made some minor changes to the switch-case to keep gcc happy.
Signed-off-by Tong Zhang <[email protected]>
That's so weird. This is the second patch for this I have seen today. Meanwhile it was fix on Aug 2 with commit 05344a1d2ea7 ("media: atomisp:
restore missing 'return' statement").
Btw, in the future, this kind of patch needs a Fixes tag.
regards,
dan carpenter