linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] media: atomisp: fix compilation error
@ 2021-09-05 19:12 Tong Zhang
  2021-09-06  8:01 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Tong Zhang @ 2021-09-05 19:12 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
	Pavel Skripkin, Tong Zhang, linux-media, linux-staging,
	linux-kernel

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.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 .../media/atomisp/pci/hive_isp_css_common/host/input_system.c  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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..58eb74edc953 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
@@ -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.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] media: atomisp: fix compilation error
  2021-09-05 19:12 [PATCH v1] media: atomisp: fix compilation error Tong Zhang
@ 2021-09-06  8:01 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-09-06  8:01 UTC (permalink / raw)
  To: Tong Zhang
  Cc: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman,
	Pavel Skripkin, linux-media, linux-staging, linux-kernel

On Sun, Sep 05, 2021 at 12:12:21PM -0700, Tong Zhang wrote:
> 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.
> 
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>

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
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-06  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 19:12 [PATCH v1] media: atomisp: fix compilation error Tong Zhang
2021-09-06  8:01 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).