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]
Message-ID: <1332921820.16535.32.camel@joe2Laptop>
Date:	Wed, 28 Mar 2012 01:03:40 -0700
From:	Joe Perches <joe@...ches.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jason Baron <jbaron@...hat.com>,
	Jim Cromie <jim.cromie@...il.com>, Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [RFC] Remove most all #define pr_fmt(fmt) lines

On Wed, 2012-03-28 at 09:42 +0200, Geert Uytterhoeven wrote:
> On Tue, Mar 27, 2012 at 19:23, Joe Perches <joe@...ches.com> wrote:
> >  #ifndef pr_fmt
> > +
> > +#ifndef pr_fmt_std
> > +#define pr_fmt_std(fmt) KBUILD_MODNAME ": " fmt
> > +#endif
> > +#ifndef pr_fmt_dbg
> > +#define pr_fmt_dbg(fmt) fmt
> > +#endif
> >  #define pr_fmt(fmt) fmt
> 
> What's the rationale behind the above line?
> I had expected
> 
>      #define pr_fmt(fmt) pr_fmt_std(fmt)

Keeping current pr_debug output as similar to
possible to the output produced by this patch.

pr_debug predates pr_fmt by quite awhile, it
dates back from kernel version 2.0 days, and
there are _many_ instances of pr_debug in files
without a pr_fmt define.

The other defines of pr_<level> were introduced
more or less the same time as pr_fmt so there
aren't _too_ many that couldn't reasonably be
prefixed.

commit d091c2f58ba32029495a933b721e8e02fbd12caa
Author: Martin Schwidefsky <schwidefsky@...ibm.com>
Date:   Wed Nov 12 21:16:43 2008 +0100

    Add 'pr_fmt()' format modifier to pr_xyz macros.

commit 1f7c8234c7a68c2ccc2a33f3b7d48057980e7c35
Author: Emil Medve <Emilian.Medve@...escale.com>
Date:   Tue Oct 16 23:29:48 2007 -0700

    Make the pr_*() family of macros in kernel.h complete

> > +#ifndef pr_fmt_std
> > +#define pr_fmt_std(fmt...) pr_fmt(fmt)
> 
> Why the "fmt..." here, and "fmt" in the definitions above?

Where pr_fmt is already defined, these pr_fmt_std and _dbg
macros must work with pr_fmt defines like:

#define pr_fmt(fmt) "my special prefix:%s:%d", __func__, __LINE__



--
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