mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Miguel Ojeda" <maxextreme@gmail.com>
To: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Kyle Moffett" <mrmacman_g4@mac.com>,
	"Michael Holzheu" <holzheu@linux.vnet.ibm.com>,
	"Joe Perches" <joe@perches.com>, "Rob Landley" <rob@landley.net>,
	"Dick Streefland" <dick.streefland@altium.nl>,
	"Geert Uytterhoeven" <Geert.Uytterhoeven@sonycom.com>,
	"Jesse Barnes" <jesse.barnes@intel.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Jan Engelhardt" <jengelh@computergmbh.de>,
	"Emil Medve" <Emilian.Medve@freescale.com>,
	"Stephen Hemminger" <shemminger@linux-foundation.org>,
	"linux@horizon.com" <linux@horizon.com>
Subject: Re: [RFC] New kernel-message logging API (take 2)
Date: Fri, 28 Sep 2007 15:30:20 +0200	[thread overview]
Message-ID: <653402b90709280630t4168abc4rd114aaa5747adc09@mail.gmail.com> (raw)
In-Reply-To: <19f34abd0709280511h3f31681bh54c6af287a48c02f@mail.gmail.com>

On 9/28/07, Vegard Nossum <vegard.nossum@gmail.com> wrote:
> On 9/27/07, Vegard Nossum <vegard.nossum@gmail.com> wrote:
> >   * Use SUBSYSTEM and KBUILD_MODNAME
>
> snip.
>
> > 2.1.5. Subsystem/driver tags
> >
> >   Many parts of the kernel already prefix their log messages with a
> > subsystem and/or driver tag to identify the source of a particular
> > message. With the kprint interface, these tags are redundant. Instead,
> > the macros SUBSYSTEM and KBUILD_MODNAME are used and recorded along
> > with each log message. Therefore, each source file should define the
> > macro SUBSYSTEM before any of the kprint functions are used. If this
> > macro is not defined, the recorded subsystem will be an empty string.
> > [6][7]
>
> This changes to KPRINT_SUBSYSTEM and KPRINT_DRIVER. The KPRINT_ prefix
> is to clearly say that this is something related to logging. The

Nice. Although the word "DRIVER" may not represent every module, I
think it is the correct option as I suggested, as the word is
meaningful (speaks by itself) and almost every message in the kernel
is printed out by drivers (whatever the big subsystem they belong to:
drivers/,  fs/, net/ ...).

> reason we can't use KBUILD_MODNAME is that this is defined on the
> command line. The declaration inside the header would thus be horribly
> wrong. We can, however, use KBUILD_MODNAME as a default value for
> KPRINT_DRIVER, like:
> static const char *KPRINT_DRIVER = KBUILD_MODNAME;
> which would pre-process to something like:
> static const char *KPRINT_DRIVER = "bcm43xx";
>
> This value can still be overridden using #define KPRINT_DRIVER "new
> name". In this case, it is possible that the original KPRINT_DRIVER
> symbol can cause an "unused variable"-warning. I guess this is fixable
> with the gcc "unused" variable attribute.

Yep, then, in a year or two, we will be able to delete such attribute.

Will there be a team to change main subsystems/drivers to the new API?

-- 
Miguel Ojeda
http://maxextreme.googlepages.com/index.htm

  reply	other threads:[~2007-09-28 13:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 21:18 Vegard Nossum
2007-09-28  1:38 ` linux
2007-09-28  7:31 ` Geert Uytterhoeven
2007-09-28  7:44   ` Kyle Moffett
2007-09-28 11:49     ` Vegard Nossum
2007-09-28 11:46   ` Vegard Nossum
2007-09-28  8:22 ` Dick Streefland
2007-09-28  9:45 ` Jan Engelhardt
2007-09-28 11:59   ` Vegard Nossum
2007-09-28 12:11 ` Vegard Nossum
2007-09-28 13:30   ` Miguel Ojeda [this message]
2007-09-28 13:55     ` Vegard Nossum
2007-09-28 14:00       ` Miguel Ojeda
2007-09-28 16:30   ` Rob Landley
2007-09-28 16:41     ` Vegard Nossum

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=653402b90709280630t4168abc4rd114aaa5747adc09@mail.gmail.com \
    --to=maxextreme@gmail.com \
    --cc=Emilian.Medve@freescale.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=arnd@arndb.de \
    --cc=dick.streefland@altium.nl \
    --cc=holzheu@linux.vnet.ibm.com \
    --cc=jengelh@computergmbh.de \
    --cc=jesse.barnes@intel.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mrmacman_g4@mac.com \
    --cc=rob@landley.net \
    --cc=shemminger@linux-foundation.org \
    --cc=vegard.nossum@gmail.com \
    /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

all inboxes | Powered by JetHome®