From: Joe Perches <joe@perches.com>
To: Roman Fietze <roman.fietze@telemotive.de>
Cc: Jason Baron <jbaron@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Proposal to add dynamic debug feature for print_hex_dump [1/2]
Date: Fri, 03 Dec 2010 12:35:12 -0800 [thread overview]
Message-ID: <1291408512.1815.43.camel@Joe-Laptop> (raw)
In-Reply-To: <201012031519.45827.roman.fietze@telemotive.de>
On Fri, 2010-12-03 at 15:19 +0100, Roman Fietze wrote:
> >From 9990f3b651adad147a40bd4ce6289182e3b7da74 Mon Sep 17 00:00:00 2001
> From: Roman Fietze <roman.fietze@telemotive.de>
> Date: Fri, 3 Dec 2010 14:06:56 +0100
> Subject: [PATCH 1/2] kernel.h: add pr_<level>_hex_dump macros
> Add macros e.g. named pr_<level>_hex_dump calling print_hex_dump with
> the approriate level, with level beeing emerg, alert, ..., debug. This
> is similiar to the functions starting with "pr_".
[]
> diff --git a/include/linux/printk.h b/include/linux/printk.h
[]
> @@ -179,6 +179,44 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
> #define pr_cont(fmt, ...) \
> printk(KERN_CONT fmt, ##__VA_ARGS__)
>
> +#define pr_emerg_hex_dump(prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii) \
> + print_hex_dump(KERN_EMERG, prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii)
Please use full argument names
#define pr_emerg_hex_dump(prefix_str, prefix_type, \
rowsize, groupsize, buf, len, ascii) \
print_hex_dump(KERN_EMERG, prefix_str, prefix_type,
rowsize, groupsize, buf, len, ascii)
etc...
Perhaps prefix_str should be pr_fmt(prefix_str)
> +#define pr_warning_hex_dump(prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii) \
> + print_hex_dump(KERN_WARNING, prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii)
As these macros are not yet in use anywhere, I think
that pr_warning_hex_dump should not be defined and
that pr_warn_hex_dump is sufficient and compatible
with the current use styles in dev_<level> and others.
[]
> +#define pr_cont_hex_dump(prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii) \
> + print_hex_dump(KERN_CONT, prfx_str, prfx_type, rowsz, grpsz, \
> + buf, len, ascii)
pr_cont_hex_dump should not be defined.
next prev parent reply other threads:[~2010-12-03 20:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 14:17 [PATCH] Proposal to add dynamic debug feature for print_hex_dump [0/3] Roman Fietze
2010-12-03 14:19 ` [PATCH] Proposal to add dynamic debug feature for print_hex_dump [1/2] Roman Fietze
2010-12-03 20:35 ` Joe Perches [this message]
2010-12-03 14:21 ` [PATCH] Proposal to add dynamic debug feature for print_hex_dump [2/2] Roman Fietze
2010-12-03 20:37 ` Joe Perches
2010-12-06 5:58 ` Roman Fietze
2010-12-06 6:04 ` Joe Perches
[not found] ` <201012061113.01576.roman.fietze@telemotive.de>
[not found] ` <1291822758.1240.8.camel@Joe-Laptop>
2011-01-14 8:43 ` [PATCH] Proposal to add dynamic debug feature for print_hex_dump Roman Fietze
2011-01-14 18:19 ` Joe Perches
2011-02-01 12:45 ` [PATCH 0/2] Fixed proposal " Roman Fietze
2011-02-01 12:46 ` [PATCH 1/2] printk.h dynamic_debug.h: add hex_dump_<level> macros Roman Fietze
2011-02-01 12:48 ` [PATCH 2/2] hex_dump_dbg: replace all calls to print_hex_dump with level KERN_DEBUG Roman Fietze
2011-02-02 1:27 ` Joe Perches
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=1291408512.1815.43.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roman.fietze@telemotive.de \
/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