# \[PATCH\] video: fbdev: atmel: fix warning for const return value

- From: Rob Herring \<robh@kernel.org\>
- Date: 2015-07-27 15:41:50 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2015/07/4543897
- Thread: https://ratatoskr.run/linux-fbdev/2015/07/4543897/t.md

```text
A const on a return value is meaningless and generates a warning on some
versions of gcc:

drivers/video/fbdev/atmel_lcdfb.c:1003: warning: type qualifiers ignored on function return type

This was found on 0-day with avr32 builds with CONFIG_OF enabled, but
it doesn't seem to generate warnings for other arches.

Reported-by: Fengguang Wu <redacted>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Nicolas Ferre <redacted>
Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
---
 drivers/video/fbdev/atmel_lcdfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index abadc49..66f4b70 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -999,7 +999,7 @@ static const char *atmel_lcdfb_wiring_modes[] = {
 	[ATMEL_LCDC_WIRING_RGB]	= "RGB",
 };
 
-const int atmel_lcdfb_get_of_wiring_modes(struct device_node *np)
+int atmel_lcdfb_get_of_wiring_modes(struct device_node *np)
 {
 	const char *mode;
 	int err, i;
-- 
2.1.0

```
