From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: Jan-Bernd Themann <ossthema@de.ibm.com>,
netdev <netdev@vger.kernel.org>, Thomas Klein <tklein@de.ibm.com>,
Christoph Raisch <raisch@de.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Marcus Eder <meder@de.ibm.com>
Subject: Re: [PATCH 4/6] ehea: header files
Date: Wed, 9 Aug 2006 15:17:36 +0200 [thread overview]
Message-ID: <200608091517.37379.arnd.bergmann@de.ibm.com> (raw)
In-Reply-To: <44D99F56.7010201@de.ibm.com>
On Wednesday 09 August 2006 10:39, Jan-Bernd Themann wrote:
> +extern int ehea_trace_level;
> +
> +#ifdef EHEA_NO_EDEB
> +#define EDEB_P_GENERIC(level, idstring, format, args...) \
> + while (0 == 1) { \
> + if(unlikely (level <= ehea_trace_level)) { \
> + printk("%s " idstring " "format "\n", \
> + __func__, ##args); \
> + } \
> + } \
> +
> +#else
> +
> +#define EDEB_P_GENERIC(level,idstring,format,args...) \
> +if (level < KEEP_EDEBS_BELOW) { \
> + do { \
> + if(unlikely (level <= ehea_trace_level)) { \
> + printk("%s " idstring " "format "\n", \
> + __func__, ##args); \
> + } \
> + } while (1 == 0); \
> +}
> +#endif
> +
> +#define EDEB(level, format, args...) \
> + EDEB_P_GENERIC(level, "", format, ##args)
> +
> +#define EDEB_ERR(level, format, args...) \
> + EDEB_P_GENERIC(level, "EHEA_ERROR", format, ##args)
> +
> +#define EDEB_EN(level, format, args...) \
> + EDEB_P_GENERIC(level, ">>>", format, ##args)
> +
> +#define EDEB_EX(level, format, args...) \
> + EDEB_P_GENERIC(level, "<<<", format, ##args)
Please don't invent your own debugging macros. You can either use the
pr_debug/pr_info facility from <linux/kernel.h> or get rid of those
completely. The latter is probably preferred for most of your calls.
Arnd <><
next prev parent reply other threads:[~2006-08-09 13:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 8:39 [PATCH 4/6] ehea: header files Jan-Bernd Themann
2006-08-09 13:17 ` Arnd Bergmann [this message]
2006-08-10 6:22 ` Michael Ellerman
2006-08-14 12:53 ` Jan-Bernd Themann
2006-08-15 0:08 ` Michael Ellerman
2006-08-15 9:44 ` Jan-Bernd Themann
2006-08-15 10:53 ` Jenkins, Clive
2006-08-15 11:07 ` Christoph Raisch
2006-08-16 0:58 ` Michael Ellerman
2006-08-11 21:40 ` Anton Blanchard
2006-08-14 3:20 ` Michael Ellerman
2006-08-14 6:19 ` Jan-Bernd Themann
2006-08-11 22:07 ` Anton Blanchard
2006-08-12 16:40 ` Thomas Klein
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=200608091517.37379.arnd.bergmann@de.ibm.com \
--to=arnd.bergmann@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=meder@de.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ossthema@de.ibm.com \
--cc=raisch@de.ibm.com \
--cc=tklein@de.ibm.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).