lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Aug 2006 12:44:49 +0300
From:	"Shem Multinymous" <multinymous@...il.com>
To:	"Greg KH" <gregkh@...e.de>
Cc:	"Pavel Machek" <pavel@...e.cz>, "Robert Love" <rlove@...ve.org>,
	"Jean Delvare" <khali@...ux-fr.org>,
	"Alan Cox" <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, hdaps-devel@...ts.sourceforge.net
Subject: Re: [PATCH 01/12] thinkpad_ec: New driver for ThinkPad embedded controller access

On 8/8/06, Greg KH <gregkh@...e.de> wrote:
> > > >> +module_param_named(debug, tp_debug, int, 0600);
> > > >> +MODULE_PARM_DESC(debug, "Debug level (0=off, 1=on)");
> > > >> +
> > > >> +/* A few macros for printk()ing: */
> > > >> +#define DPRINTK(fmt, args...) \
> > > >> +  do { if (tp_debug) printk(KERN_DEBUG fmt, ## args); } while (0)
> > > >
> > > >Is not there generic function doing this?
> > >
> > > None that I found. Many drivers do it this way.
> >
> > linux/kernel.h : pr_debug() looks similar.
>
> Use dev_dbg() and friends please instead of rolling your own.

But both pr_debug() and dev_dbg() do a static "#ifdef DEBUG", not a
runtime check of the 'debug' module paraeter.

Anyway, it turns out I don't really have any interesting debug outputs
anymore, so I'm eliminating DPRINTK() and the 'debug' module
parameter.

I'm still rolling my own printk formatting macro because thinkpad_ec
doesn't have a device for dev_dbg().

  Shem
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ