From 12b29a3a9bcfad4e245f4cf3bbc4812641ecc1ea Mon Sep 17 00:00:00 2001 From: Markus Lidel Date: Fri, 14 Jan 2005 23:35:06 -0800 Subject: [PATCH] I2O: printk cleanup and unnecessary code removal - removed commented part in header which is not used anymore - added wrappers for printk to make code more readable - cleaned up logging output and removed unneccessary output Signed-off-by: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/i2o.h | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/linux/i2o.h b/include/linux/i2o.h index ba2e945d31f4..ea9a3ad4b67f 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h @@ -631,15 +631,25 @@ static inline void i2o_dma_unmap(struct device *dev, struct i2o_dma *addr) extern int i2o_parm_field_get(struct i2o_device *, int, int, void *, int); extern int i2o_parm_table_get(struct i2o_device *, int, int, int, void *, int, void *, int); -/* FIXME: remove -extern int i2o_query_table(int, struct i2o_controller *, int, int, int, - void *, int, void *, int); -extern int i2o_clear_table(struct i2o_controller *, int, int); -extern int i2o_row_add_table(struct i2o_controller *, int, int, int, - void *, int); -extern int i2o_issue_params(int, struct i2o_controller *, int, void *, int, - void *, int); -*/ + +/* debugging and troubleshooting/diagnostic helpers. */ +#define osm_printk(level, format, arg...) \ + printk(level "%s: " format, OSM_NAME , ## arg) + +#ifdef DEBUG +#define osm_debug(format, arg...) \ + osm_printk(KERN_DEBUG, format , ## arg) +#else +#define osm_debug(format, arg...) \ + do { } while (0) +#endif + +#define osm_err(format, arg...) \ + osm_printk(KERN_ERR, format , ## arg) +#define osm_info(format, arg...) \ + osm_printk(KERN_INFO, format , ## arg) +#define osm_warn(format, arg...) \ + osm_printk(KERN_WARNING, format , ## arg) /* debugging functions */ extern void i2o_report_status(const char *, const char *, struct i2o_message *); -- cgit v1.2.3