linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Joe Perches <joe@perches.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] framebuffer: Add fb_<level> convenience logging macros
Date: Tue, 29 Oct 2013 10:56:21 +0000	[thread overview]
Message-ID: <526F9455.7070103@ti.com> (raw)
In-Reply-To: <0926c7a34ac51c4cbb67debd0d883f41891e75d9.1379640011.git.joe@perches.com>

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

On 20/09/13 04:35, Joe Perches wrote:
> Add fb_<level> convenience macros for emitting the
> "fb%d: ", struct fb_info->node value.
> 
> Neatens and shortens the code a bit.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  include/linux/fb.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index ffac70a..70c4836 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -792,4 +792,16 @@ extern int fb_find_mode(struct fb_var_screeninfo *var,
>  			const struct fb_videomode *default_mode,
>  			unsigned int default_bpp);
>  
> +/* Convenience logging macros */
> +#define fb_err(fb_info, fmt, ...)					\
> +	pr_err("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
> +#define fb_notice(info, fmt, ...)					\
> +	pr_notice("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
> +#define fb_warn(fb_info, fmt, ...)					\
> +	pr_warn("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
> +#define fb_info(fb_info, fmt, ...)					\
> +	pr_info("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
> +#define fb_dbg(fb_info, fmt, ...)					\
> +	pr_debug("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
> +
>  #endif /* _LINUX_FB_H */
> 

Thanks, queued this and the next one for 3.13.

 Tomi



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

      parent reply	other threads:[~2013-10-29 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20  1:35 [PATCH 1/2] framebuffer: Add fb_<level> convenience logging macros Joe Perches
2013-09-20  1:35 ` [PATCH 2/2] framebuffer: Use fb_<level> Joe Perches
2013-10-13 17:39   ` Joe Perches
2013-10-13 17:39 ` [PATCH 1/2] framebuffer: Add fb_<level> convenience logging macros Joe Perches
2013-10-29 10:56 ` Tomi Valkeinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=526F9455.7070103@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=joe@perches.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).