diff mbox

OMAPDSS: DSS: fix a warning message

Message ID 20151204131458.GA12792@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Dec. 4, 2015, 1:14 p.m. UTC
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tomi Valkeinen Dec. 7, 2015, 3:39 p.m. UTC | #1
On 04/12/15 15:14, Dan Carpenter wrote:
> 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.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h
> index 2406bcd..da3a85a 100644
> --- a/drivers/video/fbdev/omap2/dss/dss.h
> +++ b/drivers/video/fbdev/omap2/dss/dss.h
> @@ -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
diff mbox

Patch

diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h
index 2406bcd..da3a85a 100644
--- a/drivers/video/fbdev/omap2/dss/dss.h
+++ b/drivers/video/fbdev/omap2/dss/dss.h
@@ -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