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: <1332951765.16535.38.camel@joe2Laptop>
Date:	Wed, 28 Mar 2012 09:22:45 -0700
From:	Joe Perches <joe@...ches.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Clemens Ladisch <clemens@...isch.de>, 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>
Subject: Re: [RFC] Remove most all #define pr_fmt(fmt) lines

On Wed, 2012-03-28 at 10:46 +0100, Mark Brown wrote:
> On Wed, Mar 28, 2012 at 12:30:03AM -0700, Joe Perches wrote:
> > On Wed, 2012-03-28 at 09:27 +0200, Clemens Ladisch wrote:
> > > Joe Perches wrote:
> > > > +regulator-y := core.o dummy.o fixed-helper.o
> > > > +regulator-objs := $(regulator-y)
> > > > -obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o
> > > > +obj-$(CONFIG_REGULATOR) += regulator.o
> > > > Any objections or other suggestions/improvements?
> This seems an incredibly obscure approach.
> > > Instead of doing a Makefile change that has no _obvious_ connection with
> > > printk, wouldn't it be better to just define pr_fmt with "regulator: "?
> This seems like a much better idea if we're going to do anything; it
> means that we don't end up embedding module names in things (which are
> after all a bit of an implementation detail) and get to pick the name so
> we can do something like get the prefix which is used for the symbols in
> the code even if things are split over multiple modules.

A negative is that requires #defines in multiple
source files or rearranging #includes to centralize
that #define.

A negative of the Makefile approach is the name is
obscurely chosen.  A positive is it's only chosen
once.

> In the case above we don't support modular build in the first place.

Unrelated but is there any particular reason why
the regulator core code couldn't be build as a
module?

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