linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure
@ 2020-10-26 19:41 Arnd Bergmann
  2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-26 19:41 UTC (permalink / raw)
  To: Jyri Sarha, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Tomi Valkeinen, Thomas Zimmermann, Emil Velikov,
	Wambui Karuga, dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The -Wmissing-field-initializer warning when building with W=2
turns into an error because tilcdc is built with -Werror:

drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 },
drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm",   tilcdc_mm_show,   0 },

Add the missing field initializers to address the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 4f5fc3e87383..754a66051a21 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -428,8 +428,8 @@ static int tilcdc_mm_show(struct seq_file *m, void *arg)
 }
 
 static struct drm_info_list tilcdc_debugfs_list[] = {
-		{ "regs", tilcdc_regs_show, 0 },
-		{ "mm",   tilcdc_mm_show,   0 },
+		{ "regs", tilcdc_regs_show, 0, NULL },
+		{ "mm",   tilcdc_mm_show,   0, NULL },
 };
 
 static void tilcdc_debugfs_init(struct drm_minor *minor)
-- 
2.27.0


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

* [PATCH 2/4] drm/imx: tve remove extraneous type qualifier
  2020-10-26 19:41 [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Arnd Bergmann
@ 2020-10-26 19:41 ` Arnd Bergmann
  2020-10-26 19:44   ` Nick Desaulniers
  2020-10-27 14:56   ` Philipp Zabel
  2020-10-26 19:41 ` [PATCH 3/4] drm/msm: fix -Woverride-init warning Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-26 19:41 UTC (permalink / raw)
  To: Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo, Sascha Hauer
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Nathan Chancellor,
	Nick Desaulniers, Marco Felsch, Laurent Pinchart, Markus Elfring,
	Thomas Zimmermann, dri-devel, linux-arm-kernel, linux-kernel,
	clang-built-linux

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(-)

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


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

* [PATCH 3/4] drm/msm: fix -Woverride-init warning
  2020-10-26 19:41 [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Arnd Bergmann
  2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
@ 2020-10-26 19:41 ` Arnd Bergmann
  2020-10-26 20:52   ` [Freedreno] " abhinavk
  2020-10-26 20:56   ` Stephen Boyd
  2020-10-26 19:41 ` [PATCH 4/4] drm/gma500: avoid Woverride-init warning Arnd Bergmann
  2020-10-27 15:31 ` [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Jyri Sarha
  3 siblings, 2 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-26 19:41 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, Jonathan Marek
  Cc: Arnd Bergmann, Rob Clark, Kalyan Thota, Shubhashree Dhar,
	Raviteja Tamatam, Krishna Manikandan, Stephen Boyd,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

There is one harmless duplicate initialization that causes a warning
with 'make W=1':

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: warning: initialized field overwritten [-Woverride-init]
  122 |  .max_linewidth = 4096,
      |                   ^~~~
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: note: (near initialization for 'sm8250_dpu_caps.max_linewidth')

Remove one of the two identical initializers to avoid the warning.

Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 60b304b72b7c..9c23f814ccaf 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -111,7 +111,6 @@ static const struct dpu_caps sm8150_dpu_caps = {
 static const struct dpu_caps sm8250_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.max_linewidth = 4096,
 	.qseed_type = DPU_SSPP_SCALER_QSEED3, /* TODO: qseed3 lite */
 	.smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */
 	.ubwc_version = DPU_HW_UBWC_VER_40,
-- 
2.27.0


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

* [PATCH 4/4] drm/gma500: avoid Woverride-init warning
  2020-10-26 19:41 [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Arnd Bergmann
  2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
  2020-10-26 19:41 ` [PATCH 3/4] drm/msm: fix -Woverride-init warning Arnd Bergmann
@ 2020-10-26 19:41 ` Arnd Bergmann
  2020-10-27  9:33   ` Daniel Vetter
  2020-10-27 15:31 ` [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Jyri Sarha
  3 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-26 19:41 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter, Stefan Christ
  Cc: Arnd Bergmann, Daniel Vetter, Thomas Zimmermann, Emil Velikov,
	Pankaj Bharadiya, Rikard Falkeborn, Paul Kocialkowski,
	Ville Syrjälä,
	dri-devel, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

gcc -Wextra notices that one of the fields in psbfb_roll_ops has two
initializers:

drivers/gpu/drm/gma500/framebuffer.c:185:20: warning: initialized field overwritten [-Woverride-init]

Open-code this instead, leaving out the extraneous initializers for
.fb_pan_display.

Fixes: 3da6c2f3b730 ("drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/gma500/framebuffer.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 54d9876b5305..a56a6b53fac6 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -177,7 +177,14 @@ static const struct fb_ops psbfb_ops = {
 
 static const struct fb_ops psbfb_roll_ops = {
 	.owner = THIS_MODULE,
-	DRM_FB_HELPER_DEFAULT_OPS,
+	.fb_check_var = drm_fb_helper_check_var,
+	.fb_set_par = drm_fb_helper_set_par,
+	.fb_setcmap = drm_fb_helper_setcmap,
+	.fb_blank = drm_fb_helper_blank,
+	.fb_debug_enter = drm_fb_helper_debug_enter,
+	.fb_debug_leave = drm_fb_helper_debug_leave,
+	.fb_ioctl = drm_fb_helper_ioctl,
+
 	.fb_setcolreg = psbfb_setcolreg,
 	.fb_fillrect = drm_fb_helper_cfb_fillrect,
 	.fb_copyarea = drm_fb_helper_cfb_copyarea,
-- 
2.27.0


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

* Re: [PATCH 2/4] drm/imx: tve remove extraneous type qualifier
  2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
@ 2020-10-26 19:44   ` Nick Desaulniers
  2020-10-27 14:56   ` Philipp Zabel
  1 sibling, 0 replies; 14+ messages in thread
From: Nick Desaulniers @ 2020-10-26 19:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Arnd Bergmann, Greg Kroah-Hartman,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Nathan Chancellor, Marco Felsch, Laurent Pinchart,
	Markus Elfring, Thomas Zimmermann, dri-devel, Linux ARM, LKML,
	clang-built-linux

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

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

* Re: [Freedreno] [PATCH 3/4] drm/msm: fix -Woverride-init warning
  2020-10-26 19:41 ` [PATCH 3/4] drm/msm: fix -Woverride-init warning Arnd Bergmann
@ 2020-10-26 20:52   ` abhinavk
  2020-10-26 20:56   ` Stephen Boyd
  1 sibling, 0 replies; 14+ messages in thread
From: abhinavk @ 2020-10-26 20:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
	Jonathan Marek, Rob Clark, Krishna Manikandan, Shubhashree Dhar,
	Arnd Bergmann, Raviteja Tamatam, linux-arm-msm, linux-kernel,
	dri-devel, Stephen Boyd, Kalyan Thota, freedreno

On 2020-10-26 12:41, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There is one harmless duplicate initialization that causes a warning
> with 'make W=1':
> 
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: warning:
> initialized field overwritten [-Woverride-init]
>   122 |  .max_linewidth = 4096,
>       |                   ^~~~
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: note: (near
> initialization for 'sm8250_dpu_caps.max_linewidth')
> 
> Remove one of the two identical initializers to avoid the warning.
> 
> Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> index 60b304b72b7c..9c23f814ccaf 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
> @@ -111,7 +111,6 @@ static const struct dpu_caps sm8150_dpu_caps = {
>  static const struct dpu_caps sm8250_dpu_caps = {
>  	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
>  	.max_mixer_blendstages = 0xb,
> -	.max_linewidth = 4096,
>  	.qseed_type = DPU_SSPP_SCALER_QSEED3, /* TODO: qseed3 lite */
>  	.smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */
>  	.ubwc_version = DPU_HW_UBWC_VER_40,

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

* Re: [PATCH 3/4] drm/msm: fix -Woverride-init warning
  2020-10-26 19:41 ` [PATCH 3/4] drm/msm: fix -Woverride-init warning Arnd Bergmann
  2020-10-26 20:52   ` [Freedreno] " abhinavk
@ 2020-10-26 20:56   ` Stephen Boyd
  1 sibling, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2020-10-26 20:56 UTC (permalink / raw)
  To: Arnd Bergmann, Daniel Vetter, David Airlie, Jonathan Marek,
	Rob Clark, Sean Paul
  Cc: Arnd Bergmann, Rob Clark, Kalyan Thota, Shubhashree Dhar,
	Raviteja Tamatam, Krishna Manikandan, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

Quoting Arnd Bergmann (2020-10-26 12:41:03)
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There is one harmless duplicate initialization that causes a warning
> with 'make W=1':
> 
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: warning: initialized field overwritten [-Woverride-init]
>   122 |  .max_linewidth = 4096,
>       |                   ^~~~
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:122:19: note: (near initialization for 'sm8250_dpu_caps.max_linewidth')
> 
> Remove one of the two identical initializers to avoid the warning.
> 
> Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

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

* Re: [PATCH 4/4] drm/gma500: avoid Woverride-init warning
  2020-10-26 19:41 ` [PATCH 4/4] drm/gma500: avoid Woverride-init warning Arnd Bergmann
@ 2020-10-27  9:33   ` Daniel Vetter
  2020-10-27  9:54     ` Patrik Jakobsson
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Vetter @ 2020-10-27  9:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Patrik Jakobsson, David Airlie, Daniel Vetter, Stefan Christ,
	Arnd Bergmann, Daniel Vetter, Thomas Zimmermann, Emil Velikov,
	Pankaj Bharadiya, Rikard Falkeborn, Paul Kocialkowski,
	Ville Syrjälä,
	dri-devel, linux-kernel

On Mon, Oct 26, 2020 at 08:41:04PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> gcc -Wextra notices that one of the fields in psbfb_roll_ops has two
> initializers:
> 
> drivers/gpu/drm/gma500/framebuffer.c:185:20: warning: initialized field overwritten [-Woverride-init]
> 
> Open-code this instead, leaving out the extraneous initializers for
> .fb_pan_display.
> 
> Fixes: 3da6c2f3b730 ("drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Scrollback is dead, so I'm not sure it's even worth to keep all this. I'd
just garbage-collect this, maybe als the entire accelerator code and just
leave psbfb_unaccel_ops behind ...
-Daniel

> ---
>  drivers/gpu/drm/gma500/framebuffer.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index 54d9876b5305..a56a6b53fac6 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -177,7 +177,14 @@ static const struct fb_ops psbfb_ops = {
>  
>  static const struct fb_ops psbfb_roll_ops = {
>  	.owner = THIS_MODULE,
> -	DRM_FB_HELPER_DEFAULT_OPS,
> +	.fb_check_var = drm_fb_helper_check_var,
> +	.fb_set_par = drm_fb_helper_set_par,
> +	.fb_setcmap = drm_fb_helper_setcmap,
> +	.fb_blank = drm_fb_helper_blank,
> +	.fb_debug_enter = drm_fb_helper_debug_enter,
> +	.fb_debug_leave = drm_fb_helper_debug_leave,
> +	.fb_ioctl = drm_fb_helper_ioctl,
> +
>  	.fb_setcolreg = psbfb_setcolreg,
>  	.fb_fillrect = drm_fb_helper_cfb_fillrect,
>  	.fb_copyarea = drm_fb_helper_cfb_copyarea,
> -- 
> 2.27.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 4/4] drm/gma500: avoid Woverride-init warning
  2020-10-27  9:33   ` Daniel Vetter
@ 2020-10-27  9:54     ` Patrik Jakobsson
  2020-10-27 16:49       ` Arnd Bergmann
  0 siblings, 1 reply; 14+ messages in thread
From: Patrik Jakobsson @ 2020-10-27  9:54 UTC (permalink / raw)
  To: Arnd Bergmann, Patrik Jakobsson, David Airlie, Stefan Christ,
	Arnd Bergmann, Thomas Zimmermann, Emil Velikov, Pankaj Bharadiya,
	Rikard Falkeborn, Paul Kocialkowski, Ville Syrjälä,
	dri-devel, linux-kernel
  Cc: Daniel Vetter, Daniel Vetter

On Tue, Oct 27, 2020 at 10:33 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Mon, Oct 26, 2020 at 08:41:04PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > gcc -Wextra notices that one of the fields in psbfb_roll_ops has two
> > initializers:
> >
> > drivers/gpu/drm/gma500/framebuffer.c:185:20: warning: initialized field overwritten [-Woverride-init]
> >
> > Open-code this instead, leaving out the extraneous initializers for
> > .fb_pan_display.
> >
> > Fixes: 3da6c2f3b730 ("drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Scrollback is dead, so I'm not sure it's even worth to keep all this. I'd
> just garbage-collect this, maybe als the entire accelerator code and just
> leave psbfb_unaccel_ops behind ...
> -Daniel

That's been my idea for quite some time. The gtt roll code is also
broken in multi display setups.

Arnd, I can take care of this unless you feel an urge to do it yourself.

-Patrik

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

* Re: [PATCH 2/4] drm/imx: tve remove extraneous type qualifier
  2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
  2020-10-26 19:44   ` Nick Desaulniers
@ 2020-10-27 14:56   ` Philipp Zabel
  1 sibling, 0 replies; 14+ messages in thread
From: Philipp Zabel @ 2020-10-27 14:56 UTC (permalink / raw)
  To: Arnd Bergmann, David Airlie, Daniel Vetter, Shawn Guo, Sascha Hauer
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Nathan Chancellor,
	Nick Desaulniers, Marco Felsch, Laurent Pinchart, Markus Elfring,
	Thomas Zimmermann, dri-devel, linux-arm-kernel, linux-kernel,
	clang-built-linux

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

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

* Re: [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure
  2020-10-26 19:41 [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Arnd Bergmann
                   ` (2 preceding siblings ...)
  2020-10-26 19:41 ` [PATCH 4/4] drm/gma500: avoid Woverride-init warning Arnd Bergmann
@ 2020-10-27 15:31 ` Jyri Sarha
  2020-10-27 16:47   ` Arnd Bergmann
  3 siblings, 1 reply; 14+ messages in thread
From: Jyri Sarha @ 2020-10-27 15:31 UTC (permalink / raw)
  To: Arnd Bergmann, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Tomi Valkeinen, Thomas Zimmermann, Emil Velikov,
	Wambui Karuga, dri-devel, linux-kernel

On 26/10/2020 21:41, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The -Wmissing-field-initializer warning when building with W=2
> turns into an error because tilcdc is built with -Werror:
> 
> drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 },
> drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm",   tilcdc_mm_show,   0 },
> 
> Add the missing field initializers to address the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Jyri Sarha <jsarha@ti.com>

Please let me know if you want me to merge this.

Best regards,
Jyri

> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 4f5fc3e87383..754a66051a21 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -428,8 +428,8 @@ static int tilcdc_mm_show(struct seq_file *m, void *arg)
>  }
>  
>  static struct drm_info_list tilcdc_debugfs_list[] = {
> -		{ "regs", tilcdc_regs_show, 0 },
> -		{ "mm",   tilcdc_mm_show,   0 },
> +		{ "regs", tilcdc_regs_show, 0, NULL },
> +		{ "mm",   tilcdc_mm_show,   0, NULL },
>  };
>  
>  static void tilcdc_debugfs_init(struct drm_minor *minor)
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure
  2020-10-27 15:31 ` [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Jyri Sarha
@ 2020-10-27 16:47   ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-27 16:47 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: David Airlie, Daniel Vetter, Tomi Valkeinen, Thomas Zimmermann,
	Emil Velikov, Wambui Karuga, dri-devel, linux-kernel

On Tue, Oct 27, 2020 at 4:31 PM Jyri Sarha <jsarha@ti.com> wrote:
> On 26/10/2020 21:41, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The -Wmissing-field-initializer warning when building with W=2
> > turns into an error because tilcdc is built with -Werror:
> >
> > drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 },
> > drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm",   tilcdc_mm_show,   0 },
> >
> > Add the missing field initializers to address the warning.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Jyri Sarha <jsarha@ti.com>

Thanks

> Please let me know if you want me to merge this.

Yes, it would be good if you can merge it directly.

      Arnd

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

* Re: [PATCH 4/4] drm/gma500: avoid Woverride-init warning
  2020-10-27  9:54     ` Patrik Jakobsson
@ 2020-10-27 16:49       ` Arnd Bergmann
  2020-10-28 14:41         ` Patrik Jakobsson
  0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2020-10-27 16:49 UTC (permalink / raw)
  To: Patrik Jakobsson
  Cc: David Airlie, Stefan Christ, Thomas Zimmermann, Emil Velikov,
	Pankaj Bharadiya, Rikard Falkeborn, Paul Kocialkowski,
	Ville Syrjälä,
	dri-devel, linux-kernel, Daniel Vetter, Daniel Vetter

On Tue, Oct 27, 2020 at 10:54 AM Patrik Jakobsson
<patrik.r.jakobsson@gmail.com> wrote:
> On Tue, Oct 27, 2020 at 10:33 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Mon, Oct 26, 2020 at 08:41:04PM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > gcc -Wextra notices that one of the fields in psbfb_roll_ops has two
> > > initializers:
> > >
> > > drivers/gpu/drm/gma500/framebuffer.c:185:20: warning: initialized field overwritten [-Woverride-init]
> > >
> > > Open-code this instead, leaving out the extraneous initializers for
> > > .fb_pan_display.
> > >
> > > Fixes: 3da6c2f3b730 ("drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Scrollback is dead, so I'm not sure it's even worth to keep all this. I'd
> > just garbage-collect this, maybe als the entire accelerator code and just
> > leave psbfb_unaccel_ops behind ...
> > -Daniel
>
> That's been my idea for quite some time. The gtt roll code is also
> broken in multi display setups.
>
> Arnd, I can take care of this unless you feel an urge to do it yourself.

That would be good, thanks

I have no specific interest in the drm drivers, this is just part of a
larger work to enable more of the W=1 options across the kernel
by default, after all the existing warnings are addressed.

       Arnd

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

* Re: [PATCH 4/4] drm/gma500: avoid Woverride-init warning
  2020-10-27 16:49       ` Arnd Bergmann
@ 2020-10-28 14:41         ` Patrik Jakobsson
  0 siblings, 0 replies; 14+ messages in thread
From: Patrik Jakobsson @ 2020-10-28 14:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Airlie, Stefan Christ, Thomas Zimmermann, Emil Velikov,
	Pankaj Bharadiya, Rikard Falkeborn, Paul Kocialkowski,
	Ville Syrjälä,
	dri-devel, linux-kernel, Daniel Vetter, Daniel Vetter

On Tue, Oct 27, 2020 at 5:50 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> On Tue, Oct 27, 2020 at 10:54 AM Patrik Jakobsson
> <patrik.r.jakobsson@gmail.com> wrote:
> > On Tue, Oct 27, 2020 at 10:33 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> > > On Mon, Oct 26, 2020 at 08:41:04PM +0100, Arnd Bergmann wrote:
> > > > From: Arnd Bergmann <arnd@arndb.de>
> > > >
> > > > gcc -Wextra notices that one of the fields in psbfb_roll_ops has two
> > > > initializers:
> > > >
> > > > drivers/gpu/drm/gma500/framebuffer.c:185:20: warning: initialized field overwritten [-Woverride-init]
> > > >
> > > > Open-code this instead, leaving out the extraneous initializers for
> > > > .fb_pan_display.
> > > >
> > > > Fixes: 3da6c2f3b730 ("drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops")
> > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > >
> > > Scrollback is dead, so I'm not sure it's even worth to keep all this. I'd
> > > just garbage-collect this, maybe als the entire accelerator code and just
> > > leave psbfb_unaccel_ops behind ...
> > > -Daniel
> >
> > That's been my idea for quite some time. The gtt roll code is also
> > broken in multi display setups.
> >
> > Arnd, I can take care of this unless you feel an urge to do it yourself.
>
> That would be good, thanks

Should be fixed with:
https://patchwork.freedesktop.org/patch/397482/?series=83153&rev=1

>
> I have no specific interest in the drm drivers, this is just part of a
> larger work to enable more of the W=1 options across the kernel
> by default, after all the existing warnings are addressed.
>
>        Arnd

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

end of thread, other threads:[~2020-10-28 22:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 19:41 [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Arnd Bergmann
2020-10-26 19:41 ` [PATCH 2/4] drm/imx: tve remove extraneous type qualifier Arnd Bergmann
2020-10-26 19:44   ` Nick Desaulniers
2020-10-27 14:56   ` Philipp Zabel
2020-10-26 19:41 ` [PATCH 3/4] drm/msm: fix -Woverride-init warning Arnd Bergmann
2020-10-26 20:52   ` [Freedreno] " abhinavk
2020-10-26 20:56   ` Stephen Boyd
2020-10-26 19:41 ` [PATCH 4/4] drm/gma500: avoid Woverride-init warning Arnd Bergmann
2020-10-27  9:33   ` Daniel Vetter
2020-10-27  9:54     ` Patrik Jakobsson
2020-10-27 16:49       ` Arnd Bergmann
2020-10-28 14:41         ` Patrik Jakobsson
2020-10-27 15:31 ` [PATCH 1/4] drm/tilcdc: avoid 'make W=2' build failure Jyri Sarha
2020-10-27 16:47   ` Arnd Bergmann

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).