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
| ||
|
Date: Tue, 10 Jul 2012 13:59:14 -0700 From: Joe Perches <joe@...ches.com> To: Toshiaki Yamane <yamanetoshi@...il.com> Cc: greg@...ah.com, willy@...a-x.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 3/3] panel: Use pr_err(...) rather than printk(KERN_ERR ...) On Tue, 2012-07-10 at 20:25 +0900, Toshiaki Yamane wrote: > This change is inspired by checkpatch. [] Please add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt before any #include and remove the "panel: " prefixes from output messages. > diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c [] > @@ -1987,7 +1987,7 @@ static struct logical_input *panel_bind_key(char *name, char *press, > > key = kzalloc(sizeof(struct logical_input), GFP_KERNEL); > if (!key) { > - printk(KERN_ERR "panel: not enough memory\n"); > + pr_err("panel: not enough memory\n"); OOM messages are duplicative and unnecessary. alloc failures get a dump_stack. [] > @@ -2109,8 +2109,7 @@ static void panel_attach(struct parport *port) > return; > > if (pprt) { > - printk(KERN_ERR > - "panel_attach(): port->number=%d parport=%d, " > + pr_err("panel_attach(): port->number=%d parport=%d, " > "already registered !\n", Please coalesce formats and use "%s: ...", __func__ when there is an embedded function name. It'd also be nice to use argument alignment to open parenthesis. pr_err("%s: port->number=%d parport=%d, already registered\n", port->number, parport); etc... cheers, Joe -- 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