lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Suggest pr_<level> over printk(KERN_<LEVEL>
On Tue, Mar 13, 2012 at 07:31:51PM -0700, Joe Perches wrote:
> Right now many fs ext4 messages are somewhat opaque
> without any reference to what kernel subsystem produced
> the message.
>
> For instance:
>
> fs/ext4/ialloc.c: printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n",
>
> This is a somewhat senseless output in dmesg without
> any linkage to ext4.
>
> Using pr_fmt and pr_debug as I sent a patch to do
> instead emits in dmesg:
>
> EXT4-fs: group: etc...
>
> Using subsystem prefixes makes it easy and consistent to
> grep dmesg.

That's a debug message which is never by anyone other than ext4
developers. Your patch also hacked the Makefile to enable it by
default, which also enabled some performance degrading code paths
(again, only enabled by developers who manually drop the #define in a
header file when they are trying to figure out some obscure failure
during the development process). This is why I don't like people who
are wanking around in code they don't understand just to fix style
fixes, in the mistaken belief that it adds value.

- Ted


\
 
 \ /
  Last update: 2012-03-14 03:43    [W:0.303 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site