diff mbox series

[3/4] drm/msm: fix -Woverride-init warning

Message ID 20201026194110.3817470-3-arnd@kernel.org
State New
Headers show
Series None | expand

Commit Message

Arnd Bergmann Oct. 26, 2020, 7:41 p.m. UTC
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(-)

Comments

Abhinav Kumar Oct. 26, 2020, 8:52 p.m. UTC | #1
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,
Stephen Boyd Oct. 26, 2020, 8:56 p.m. UTC | #2
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>
diff mbox series

Patch

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,