Skip to contentSkip to conversation

OMAPDSS: DSS: fix a warning message

PATCH In review Dan Carpenter 2 participants 2 messages Dec 4, 2015 – Dec 7, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAPDSS: DSS: fix a warning message

The WARN() macro has to take a condition. The current code will just print the stack trace and the function name instead of the intended warning message.

drivers/video/fbdev/omap2/dss/dss.h +2 -1
index 2406bcd..da3a85a 100644
@@ -343,7 +343,8 @@ u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt);
 #else
 static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt)
 {
-	WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__);
+	WARN(1, "%s: DSI not compiled in, returning pixel_size as 0\n",
+	     __func__);
 	return 0;
 }
 #endif
#1 lore raw
Quoted 12 lines · Dan Carpenter

The WARN() macro has to take a condition. The current code will just print the stack trace and the function name instead of the intended warning message.

drivers/video/fbdev/omap2/dss/dss.h +0 -0
index 2406bcd..da3a85a 100644

drivers/video/fbdev/omap2/dss/dss.h u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); · line 350

Quoted 9 lines
drivers/video/fbdev/omap2/dss/dss.h +2 -1
@@ -343,7 +343,8 @@ u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt);
 #else
 static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt)
 {
-	WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__);
+	WARN(1, "%s: DSI not compiled in, returning pixel_size as 0\n",
+	     __func__);
 	return 0;
 }
 #endif

Thanks, queued for 4.5.

Tomi