[Home]

Summary:DAHLIN-00011: [patch] printk-s without priority in zaptel
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2007-12-10 11:30:39.000-0600Date Closed:2008-08-03 11:39:25
Priority:MinorRegression?No
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080717__issue11504_dahdi_printk_without_priority.diff
Description:There are still quite a few places in zaptel where printk is used without a priority string (KERN_DEBUG, KERN_ERR, etc.).

To see them:

 grep -w printk *.[ch] */*.[ch] | egrep -v 'KERN_(DEBUG|INFO|NOTICE|WARNING|ERR)' | grep -v '\.mod\.c'

Use 'grep -wl' instead of 'grep -w' to get a list of files.


****** ADDITIONAL INFORMATION ******

Some excuses:

xpp/zap_debug.h - false alarm
xpp/xproto.c, xpp/card_fxs.c - The priority string is knowngly ommited to allow printing from several printk-s in one line.

wcte12xp/vpmadt032.c: likewise, for most of the printk-s.
Comments:By: Brett Bryant (bbryant) 2008-07-17 12:58:42

I've uploaded a patch that adds priorities to everything in dahdi/linux/trunk ...

Brett

By: Shaun Ruffell (sruffell) 2008-07-17 13:48:59

Thanks for the patch Brett.  I believe I looked through all the changes, and with the exception of line 31 in dahdi_echocan_hpec (the kernel log level in that case should be passed as part of the format string from the caller), the other places look good to me.  At least they'll all have a level...

If you want me to commit this, I'll do it one module at a time (so I can recheck before I commit each one).

By: Brett Bryant (bbryant) 2008-07-17 14:17:43

sruffell, that'd be great. I didn't want to commit anything before someone had a chance to review it.

As for the priority in debug_printk: except for a missing newline on line 261 of wcte12xp/base.c there don't seem to be any places that use it with a priority or a multiline statement which was why my motivation was for putting it there instead. If you want, I can change the debug_printk statements to add KERN_DEBUG so it can be used for multiline statements. That wouldn't take long to do.



By: Digium Subversion (svnbot) 2008-08-03 11:39:22

Repository: dahdi
Revision: 4685

U   linux/trunk/drivers/dahdi/dahdi-base.c
U   linux/trunk/drivers/dahdi/dahdi_dummy.c
U   linux/trunk/drivers/dahdi/dahdi_dynamic.c
U   linux/trunk/drivers/dahdi/dahdi_dynamic_eth.c
U   linux/trunk/drivers/dahdi/dahdi_dynamic_loc.c
U   linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c
U   linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
U   linux/trunk/drivers/dahdi/dahdi_echocan_sec.c
U   linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
U   linux/trunk/drivers/dahdi/dahdi_transcode.c
U   linux/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
U   linux/trunk/drivers/dahdi/pciradio.c
U   linux/trunk/drivers/dahdi/tor2.c
U   linux/trunk/drivers/dahdi/voicebus.c
U   linux/trunk/drivers/dahdi/wcfxo.c
U   linux/trunk/drivers/dahdi/wct1xxp.c
U   linux/trunk/drivers/dahdi/wct4xxp/base.c
U   linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
U   linux/trunk/drivers/dahdi/wctc4xxp/base.c
U   linux/trunk/drivers/dahdi/wctdm.c
U   linux/trunk/drivers/dahdi/wctdm24xxp/GpakApi.c
U   linux/trunk/drivers/dahdi/wctdm24xxp/GpakCust.c
U   linux/trunk/drivers/dahdi/wctdm24xxp/base.c
U   linux/trunk/drivers/dahdi/wcte11xp.c
U   linux/trunk/drivers/dahdi/wcte12xp/base.c
U   linux/trunk/drivers/dahdi/wcte12xp/vpmadt032.c
U   linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h
U   linux/trunk/drivers/dahdi/xpp/card_fxs.c
U   linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
U   linux/trunk/drivers/dahdi/xpp/xproto.c

------------------------------------------------------------------------
r4685 | russell | 2008-08-03 11:39:21 -0500 (Sun, 03 Aug 2008) | 7 lines

Change all instances of printk in DAHDI to include a priority

(closes issue DAHLIN-11)
Reported by: tzafrir
Patches:
     20080717__issue11504_dahdi_printk_without_priority.diff uploaded by bbryant (license 36)

------------------------------------------------------------------------

http://svn.digium.com/view/dahdi?view=rev&revision=4685