mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frans Pop <elendil@planet.nl>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, trivial@kernel.org
Subject: Trailing periods in kernel messages (was: [PATCH 6/6] tick: add a missing dot in prink)
Date: Thu, 29 Nov 2007 11:20:18 +0100	[thread overview]
Message-ID: <200711291120.19595.elendil@planet.nl> (raw)
In-Reply-To: <474E8669.6060409@cn.fujitsu.com>

On Thursday 29 November 2007, Li Zefan wrote:
> Frans Pop wrote:
> > Li Zefan wrote:
> >> Add a missing '.' in prink information.
> >> -			printk(" no tick device\n");
> >> +			printk(" no tick device.\n");
> >
> > I wonder if that is correct. CodingStyle says:
> >                 Chapter 13: Printing kernel messages
> >    [...]
> >    Kernel messages do not have to be terminated with a period.
> >
> > I personally think that rule could be made a bit stricter as for
> > example dmesg output currently looks fairly inconsistent with some
> > messages terminated with a period while most messages are not and have
> > been wondering if I should file patches to _remove_ periods.
> >
> > Maybe the rule should be changed to:
> >    Kernel messages should not be terminated with a period, unless a
> >    single message contains multiple sentences.
> > ?
>
> But why a kernel message should not be terminated with a period?

Exactly because kernel messages are in general _not_ sentences.
IMO trailing periods

> It does no harm at all.

Well, for one it needlessly increases the size of log files.
It also IMO just looks weird to have a trailing period only for some 
messages and it certainly is completely inappropriate for messages like:
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[...]
ACPI: RSDP 000FE020, 0014 (r0 INTEL )
ACPI: RSDT 7F6FDE48, 0058 (r1 INTEL  D945GCZ       FF9 MSFT  1000013)

If I look at my current dmesg output, *only* 16 out of 543 line have a 
trailing period, and in almost all cases they just looks out of place. See 
some examples at the bottom of this mail.

> And if the message is a complete sentence, it's grammatical correct to
> terminated with a period. 

Exactly why I make an exception for those in my proposal.

> I think CodingStyle just says an ending period is not mandatory. It does
> not discourage the ending period.

I feel that to improve consistency the CodingStyle should be clear about 
when a period should and should not be used.


Some examples of IMO unneeded/inconsistent use of trailing periods:
Entering add_active_range(0, 521983, 521984) 3 entries of 3200 used
end_pfn_map = 521984
DMI 2.3 present.
ACPI: RSDP 000FE020, 0014 (r0 INTEL )
[...]
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Setting APIC routing to flat
ACPI: HPET id: 0x8086a201 base: 0xfed00000
[...]
hpet clockevent registered
TSC calibrated against HPET
time.c: Detected 3199.880 MHz processor.
Console: colour dummy device 80x25
[...]
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 9 10 *11 12)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 9 10 11 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 *9 10 11 12)
[...]
pnp: the driver 'i8042 kbd' has been unregistered
pnp: the driver 'i8042 aux' has been unregistered
PNP: No PS/2 controller found. Probing ports directly.
[...]
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a 
report
PCI-GART: No AMD northbridge found.

The last example shows the inconsistency very well. And in this case the 
second line could easily be "reduced" to a regular message by using a 
semicolon instead of a period between the "sentences".
This is already being done in a number of other messages, for example:
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

So I'd suggest to change those last three lines to (including some textual 
improvements):
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq"; if that helps, please 
post a report
PCI-GART: No AMD northbridge found

  reply	other threads:[~2007-11-29 10:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29  7:35 [PATCH 6/6] tick: add a missing dot in prink Li Zefan
2007-11-29  8:58 ` Frans Pop
2007-11-29  9:29   ` Li Zefan
2007-11-29 10:20     ` Frans Pop [this message]
2007-11-29 11:20       ` Trailing periods in kernel messages (was: [PATCH 6/6] tick: add a missing dot in prink) Andrew Morton
2007-11-30  1:12         ` Trailing periods in kernel messages Li Zefan
2007-11-30  1:30           ` Joe Perches
2007-11-30  1:54             ` Li Zefan
2007-11-30  2:35               ` Joe Perches
2007-12-20 16:29                 ` Andy Whitcroft
2007-12-20 21:07                   ` Alan Cox
2007-12-20 21:43                     ` Joe Perches
2007-12-20 21:54                       ` Alan Cox
2007-12-20 22:19                         ` Andrew Morton
2007-12-20 22:34                           ` Randy Dunlap
2007-12-20 23:40                           ` Alan Cox
2007-12-20 22:22                         ` Theodore Tso
2007-12-20 23:38                           ` Alan Cox
2007-12-21 15:54                       ` Lennart Sorensen
2007-12-20 21:51                     ` David Miller
2007-12-20 22:07                       ` Joe Perches
2007-12-20 22:08                         ` Alan Cox
2007-12-20 23:14                           ` J.A. Magallón
2007-12-21  0:04                           ` Joe Perches
2007-12-21  0:40                             ` Alan Cox
2007-12-21  9:56                           ` Herbert Xu
2007-12-21 10:10                             ` Jan Engelhardt
2007-12-21 10:12                               ` David Miller
2007-12-21 13:43                                 ` David Newall
2007-12-21 14:01                                   ` David Miller
2007-12-21 15:37                                     ` David Newall
2007-12-21 11:41                               ` Herbert Xu
2007-12-21 11:55                                 ` Jan Engelhardt
2007-12-21 16:01                                   ` Lennart Sorensen
2007-12-22 14:04                                     ` Benny Amorsen
2007-12-22 20:20                                       ` Radoslaw Szkodzinski
2007-12-21 12:06                               ` David Schwartz
2007-12-21 15:18                               ` Stefan Richter
2007-12-20 22:09                       ` Roland Dreier
2007-12-21  1:43                     ` Frans Pop
2007-12-21  2:15                       ` Andrew Morton
2007-12-21  3:12                         ` David Miller
2007-12-21 10:15                         ` Jan Engelhardt
2007-12-21 10:21                       ` Alan Cox

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=200711291120.19595.elendil@planet.nl \
    --to=elendil@planet.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=trivial@kernel.org \
    /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

Powered by JetHome