lkml.org 
[lkml]   [2012]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] xgifb: checkpatch cleanup, printk() KERN_*
From
> These last two should be KERN_CONT
> though the block could be rewritten as
>
>        if (XGIInitNew(pdev))
>                printk(KERN_INFO "XGIfb: XGIInitNew() ... OK\n");
>        else
>                printk(KERN_ERR "XGIfb: XGIInitNew() ... Fail\n");
>
> Emitting any dmesg output like "XGIInitNew() ... OK\n"
> is almost always low value.
>
> Perhaps just emitting on the error case is better:
>        if (!XGIInitNew(pdev))
>                printk(KERN_ERR "XGIfb: XBIInitNew() failed\n");

Cool. See Re: Dan. I will fold the printk logic up.

> One other thing.  It would be better to add
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> before any #include and convert all the
> printks(KERN_<LEVEL> to pr_<level>(
> stripping all the leading XGIfb: too.

I might take a stab at eliminating explicit calls to printk and use a macro.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-21 18:21    [W:0.580 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site