Skip to content

Commit

Permalink
V4L/DVB (4173): Dprintk macro beautification
Browse files Browse the repository at this point in the history
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Manu Abraham authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 6cd9474 commit 9500c7b
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions drivers/media/dvb/bt8xx/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,24 @@ MODULE_PARM_DESC(dst_algo, "tuning algo: default is 0=(SW), 1=(HW)");
#define DST_INFO 2
#define DST_DEBUG 3

#define dprintk(x, y, z, format, arg...) do { \
if (z) { \
if ((x > DST_ERROR) && (x > y)) \
printk(KERN_ERR "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \
else if ((x > DST_NOTICE) && (x > y)) \
printk(KERN_NOTICE "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \
else if ((x > DST_INFO) && (x > y)) \
printk(KERN_INFO "dst(%d) %s: " format "\n", state->bt->nr, __FUNCTION__ , ##arg); \
else if ((x > DST_DEBUG) && (x > y)) \
printk(KERN_DEBUG "dst(%d) %s: " format "\n",state->bt->nr, __FUNCTION__ , ##arg); \
} else { \
if (x > y) \
printk(format, ##arg); \
} \
#define dprintk(x, y, z, format, arg...) do { \
if (z) { \
if ((x > DST_ERROR) && (x > y)) \
printk(KERN_ERR "dst(%d) %s: " format "\n", \
state->bt->nr, __func__ , ##arg); \
else if ((x > DST_NOTICE) && (x > y)) \
printk(KERN_NOTICE "dst(%d) %s: " format "\n", \
state->bt->nr, __func__ , ##arg); \
else if ((x > DST_INFO) && (x > y)) \
printk(KERN_INFO "dst(%d) %s: " format "\n", \
state->bt->nr, __func__ , ##arg); \
else if ((x > DST_DEBUG) && (x > y)) \
printk(KERN_DEBUG "dst(%d) %s: " format "\n", \
state->bt->nr, __func__ , ##arg); \
} else { \
if (x > y) \
printk(format, ##arg); \
} \
} while(0)


Expand Down

0 comments on commit 9500c7b

Please sign in to comment.