2015-04-01 07:05:56

by Alessandro Zummo

[permalink] [raw]
Subject: Re: [rtc-linux] Re: [PATCH 3/3] rtc: hctosys: use function name in the error log

On Tue, 31 Mar 2015 20:18:28 -0700
Joe Perches <[email protected]> wrote:

> Neither __func__ or __FILE__ is really useful here.
> The message is already specific enough without it.
>
> If anything, it'd probably be better to add
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Seems reasonable given that pr_fmt is widely
used elsewhere.

I don't like too much the need to have one define for
each file, but it's the way it works :-/

--

Best regards,

Alessandro Zummo - CEO,
Tower Technologies - Torino, Italy

http://www.towertech.it


2015-04-01 07:15:21

by Joe Perches

[permalink] [raw]
Subject: Re: [rtc-linux] Re: [PATCH 3/3] rtc: hctosys: use function name in the error log

On Wed, 2015-04-01 at 09:05 +0200, Alessandro Zummo wrote:
> On Tue, 31 Mar 2015 20:18:28 -0700
> Joe Perches <[email protected]> wrote:
>
> > Neither __func__ or __FILE__ is really useful here.
> > The message is already specific enough without it.
> >
> > If anything, it'd probably be better to add
> >
> > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> Seems reasonable given that pr_fmt is widely
> used elsewhere.
>
> I don't like too much the need to have one define for
> each file, but it's the way it works :-/

True. Right now.

I've a desire to make a change one day so that's
the default instead of blank.

http://comments.gmane.org/gmane.linux.kernel/1052288

There are some remaining treewide complications
before that can be done effectively though.

A few files will need "#define pr_fmt(fmt) fmt"
so no prefix is used.