[openib-general] Re: [PATCH 6 of 20] ipath - driver debugging headers
Pekka Enberg
penberg at cs.helsinki.fi
Thu Dec 29 00:22:26 PST 2005
On 12/29/05, Bryan O'Sullivan <bos at pathscale.com> wrote:
> +#endif /* _IPATH_DEBUG_H */
> diff -r 2d9a3f27a10c -r 9e8d017ed298 drivers/infiniband/hw/ipath/ipath_kdebug.h
> --- /dev/null Thu Jan 1 00:00:00 1970 +0000
> +++ b/drivers/infiniband/hw/ipath/ipath_kdebug.h Wed Dec 28 14:19:42 2005 -0800
> @@ -0,0 +1,109 @@
> +#ifndef _IPATH_KDEBUG_H
> +#define _IPATH_KDEBUG_H
> +
> +#include "ipath_debug.h"
> +
> +/*
> + * This file contains lightweight kernel tracing code.
> + */
> +
> +extern unsigned infinipath_debug;
> +const char *ipath_get_unit_name(int unit);
> +
> +#if _IPATH_DEBUGGING
> +
> +#define _IPATH_UNIT_ERROR(unit,fmt,...) \
> + printk(KERN_ERR "%s: " fmt, ipath_get_unit_name(unit), ##__VA_ARGS__)
> +
> +#define _IPATH_ERROR(fmt,...) printk(KERN_ERR "infinipath: " fmt, ##__VA_ARGS__)
> +
> +#define _IPATH_INFO(fmt,...) \
> + do { \
> + if(unlikely(infinipath_debug & __IPATH_INFO)) \
> + printk(KERN_INFO "infinipath: " fmt, ##__VA_ARGS__); \
> + } while(0)
> +
[snip, snip]
Please consider using dev_dbg, dev_err, et al from <linux/device.h>.
Pekka
More information about the general
mailing list