Skip to contentSkip to conversation

debug printk's

DISCUSSION Paul Jimenez 2 participants 2 messages Aug 16, 2007 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Is there stated kernel plicy on debug printk's? The source shows
a lot of different versions of dprintk defined, some very small scripts came up with:

# symbol
1 ASD_DPRINTK
1 bay_dprintk
1 dprintk1
1 dprintk2
1 dprintk_core
1 dprintkl
1 i2cdprintk
1 ir_dprintk
1 PDprintk
2 cmdprintk
2 ddprintk
2 DDPRINTK
2 dprintkdbg
2 fs_dprintk
2 gs_dprintk
2 P9_DPRINTK
2 PDPRINTK
2 rio_dprintk
2 SAS_DPRINTK
2 sx_dprintk
2 TOSHIBA_RBTX4927_IRQ_DPRINTK
2 TOSHIBA_RBTX4927_SETUP_DPRINTK
2 TX4927_IRQ_DPRINTK
10 Dprintk
130 DPRINTK
187 dprintk

So: 187 definitions of dprintk and 130 definitions of DPRINTK. Plus 10 mixed-case fans and various and sundry miscellaneous versions. Note this is not *uses*, it's the number of *definitions*.

So, to clarify my original question a bit: is there policy we can refer to to justify cleaning this up?

--pj

#1 lore raw
Quoted 6 lines · Paul Jimenez

So: 187 definitions of dprintk and 130 definitions of DPRINTK. Plus 10 mixed-case fans and various and sundry miscellaneous versions. Note this is not *uses*, it's the number of *definitions*.

So, to clarify my original question a bit: is there policy we can refer to to justify cleaning this up?

pr_debug() in include/linux/kernel.h, which also refers to dev_dbg(), neither of which you mentioned ;-)

But take it slowly, co-ordinate with the driver author, and don't try to tell people that it's policy -- it's a best practice, sure, but people are free to ignore it if it makes their life easier.

Signature · 3 lines
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."