From: Nick Andrew <nick-linuxtv@nick-andrew.net>
To: Andy Walls <awalls@radix.net>
Cc: linux-dvb@linuxtv.org, ivtv-devel@ivtvdriver.org
Subject: Re: [linux-dvb] [PATCH] mxl500x: Add module parameter to enable/disable debug messages
Date: Fri, 25 Apr 2008 14:55:20 +1000 [thread overview]
Message-ID: <20080425045520.GA17371@tull.net> (raw)
In-Reply-To: <1209093378.6367.22.camel@palomino.walls.org>
On Thu, Apr 24, 2008 at 11:16:18PM -0400, Andy Walls wrote:
> +#define dprintk(level, fmt, arg...) \
> + do { \
> + if (debug >= level) \
> + printk(KERN_DEBUG "%s: " fmt, "mxl500x", ## arg); \
> + } while (0)
I think this code will be far more useful in kernel/printk.c rather
than every device driver and subsystem rolling their own (as seems to
happen at this time).
Also see dev_dbg() and dev_printk() in include/linux/device.h.
What those macros are missing is what you have here - messages
printed or ignored depending on the value of a module variable
and/or parameter.
Nick.
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
next prev parent reply other threads:[~2008-04-25 4:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-25 3:16 [linux-dvb] [PATCH] mxl500x: Add module parameter to enable/disable debug messages Andy Walls
2008-04-25 4:55 ` Nick Andrew [this message]
2008-04-26 1:59 ` Andy Walls
2008-04-26 11:52 ` Gurumurti Laxman Maharana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080425045520.GA17371@tull.net \
--to=nick-linuxtv@nick-andrew.net \
--cc=awalls@radix.net \
--cc=ivtv-devel@ivtvdriver.org \
--cc=linux-dvb@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox