Jelajahi Sumber

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 <[email protected]>
Nilaan Gunabalachandran 2 tahun lalu
induk
melakukan
275c881ae4
3 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 2 1
      msm/Kbuild
  2. 1 1
      msm/dsi/dsi_panel.c
  3. 2 1
      msm/sde_power_handle.c

+ 2 - 1
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)

+ 1 - 1
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;
 	}
 

+ 2 - 1
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 : "<unknown>");