From 275c881ae4027fb2d2e00faff98cf4636d6b0cb9 Mon Sep 17 00:00:00 2001 From: Nilaan Gunabalachandran Date: Tue, 8 Nov 2022 14:10:10 -0500 Subject: [PATCH] disp: msm: fix printk argument errors This change fixes printk arguments in display driver which is found with additional compilation flags and adds the compile flags too. Change-Id: Ic653591db49b49b9ce1ce04e7df89216772d0e71 Signed-off-by: Nilaan Gunabalachandran --- msm/Kbuild | 3 ++- msm/dsi/dsi_panel.c | 2 +- msm/sde_power_handle.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/msm/Kbuild b/msm/Kbuild index 00980d4a23..2c227ae640 100644 --- a/msm/Kbuild +++ b/msm/Kbuild @@ -82,7 +82,8 @@ ifeq ($(call cc-option-yn, -Wheader-guard),y) EXTRA_CFLAGS += -Wheader-guard endif -EXTRA_CFLAGS += -Wformat-extra-args -Wstrict-prototypes +ccflags-y += -Wformat-extra-args -Wstrict-prototypes -Wformat-insufficient-args \ + -Wformat-invalid-specifier -Wformat-zero-length -Wnonnull ifneq ($(MODNAME), qdsp6v2) CHIP_NAME ?= $(MODNAME) diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index b996cbbdd0..94ef74a5f1 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -1294,7 +1294,7 @@ static int dsi_panel_parse_avr_caps(struct dsi_panel *panel, return rc; } else if (val > 1 && val != panel->dfps_caps.dfps_list_len) { DSI_ERR("[%s] avr step list size %d not same as dfps list %d\n", - val, panel->dfps_caps.dfps_list_len); + panel->name, val, panel->dfps_caps.dfps_list_len); return -EINVAL; } diff --git a/msm/sde_power_handle.c b/msm/sde_power_handle.c index a88bab1b0a..61473e07d5 100644 --- a/msm/sde_power_handle.c +++ b/msm/sde_power_handle.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) "[drm:%s:%d]: " fmt, __func__, __LINE__ @@ -286,7 +287,7 @@ static int sde_power_parse_dt_clock(struct platform_device *pdev, mp->clk_config[i].type = DSS_CLK_MMRM; mp->clk_config[i].mmrm.clk_id = clock_mmrm; } - pr_debug("clk[%d]:%d mmrm:%d rate:%d name:%s dev:%s\n", + pr_debug("clk[%d] mmrm:%d rate:%d name:%s dev:%s\n", i, clock_mmrm, clock_rate, clock_name, pdev->name ? pdev->name : "");