[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200608091517.37379.arnd.bergmann@de.ibm.com>
Date: Wed, 9 Aug 2006 15:17:36 +0200
From: Arnd Bergmann <arnd.bergmann@...ibm.com>
To: linuxppc-dev@...abs.org
Cc: Jan-Bernd Themann <ossthema@...ibm.com>,
netdev <netdev@...r.kernel.org>,
Thomas Klein <tklein@...ibm.com>,
Christoph Raisch <raisch@...ibm.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Marcus Eder <meder@...ibm.com>
Subject: Re: [PATCH 4/6] ehea: header files
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 <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists