linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] OMAPDSS: DSS: fix a warning message
@ 2015-12-04 13:14 Dan Carpenter
  2015-12-07 15:39 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-12-04 13:14 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jean-Christophe Plagniol-Villard, Laurent Pinchart, linux-omap,
	linux-fbdev, kernel-janitors

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] OMAPDSS: DSS: fix a warning message
  2015-12-04 13:14 [patch] OMAPDSS: DSS: fix a warning message Dan Carpenter
@ 2015-12-07 15:39 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2015-12-07 15:39 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jean-Christophe Plagniol-Villard, Laurent Pinchart, linux-omap,
	linux-fbdev, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]



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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-07 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-04 13:14 [patch] OMAPDSS: DSS: fix a warning message Dan Carpenter
2015-12-07 15:39 ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).