diff mbox series

[2/4] drm/imx: tve remove extraneous type qualifier

Message ID 20201026194110.3817470-2-arnd@kernel.org
State New
Headers show
Series [1/4] drm/tilcdc: avoid 'make W=2' build failure | expand

Commit Message

Arnd Bergmann Oct. 26, 2020, 7:41 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>


clang warns about functions returning a 'const int' result:

drivers/gpu/drm/imx/imx-tve.c:487:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

Remove the extraneous 'const' qualifier here. I would guess that the
function was intended to be marked __attribute__((const)) instead,
but that would also be wrong since it call other functions without
that attribute.

Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/gpu/drm/imx/imx-tve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Comments

Nick Desaulniers Oct. 26, 2020, 7:44 p.m. UTC | #1
On Mon, Oct 26, 2020 at 12:41 PM Arnd Bergmann <arnd@kernel.org> wrote:
>

> From: Arnd Bergmann <arnd@arndb.de>

>

> clang warns about functions returning a 'const int' result:

>

> drivers/gpu/drm/imx/imx-tve.c:487:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

>

> Remove the extraneous 'const' qualifier here. I would guess that the

> function was intended to be marked __attribute__((const)) instead,

> but that would also be wrong since it call other functions without

> that attribute.

>

> Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>


> ---

>  drivers/gpu/drm/imx/imx-tve.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c

> index ef3c25d87d87..2a8d2e32e7b4 100644

> --- a/drivers/gpu/drm/imx/imx-tve.c

> +++ b/drivers/gpu/drm/imx/imx-tve.c

> @@ -484,7 +484,7 @@ static const char * const imx_tve_modes[] = {

>         [TVE_MODE_VGA] = "vga",

>  };

>

> -static const int of_get_tve_mode(struct device_node *np)

> +static int of_get_tve_mode(struct device_node *np)

>  {

>         const char *bm;

>         int ret, i;

> --

> 2.27.0

>



-- 
Thanks,
~Nick Desaulniers
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Philipp Zabel Oct. 27, 2020, 2:56 p.m. UTC | #2
On Mon, 2020-10-26 at 20:41 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>

> 

> clang warns about functions returning a 'const int' result:

> 

> drivers/gpu/drm/imx/imx-tve.c:487:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

> 

> Remove the extraneous 'const' qualifier here. I would guess that the

> function was intended to be marked __attribute__((const)) instead,

> but that would also be wrong since it call other functions without

> that attribute.

> 

> Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Thank you, applied to imx-drm/next with Nick's R-b.

regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c
index ef3c25d87d87..2a8d2e32e7b4 100644
--- a/drivers/gpu/drm/imx/imx-tve.c
+++ b/drivers/gpu/drm/imx/imx-tve.c
@@ -484,7 +484,7 @@  static const char * const imx_tve_modes[] = {
 	[TVE_MODE_VGA] = "vga",
 };
 
-static const int of_get_tve_mode(struct device_node *np)
+static int of_get_tve_mode(struct device_node *np)
 {
 	const char *bm;
 	int ret, i;