From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sam Hansen <solid.se7en@gmail.com>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] xgifb: checkpatch cleanup, printk() KERN_*
Date: Sat, 21 Jan 2012 18:52:35 +0300 [thread overview]
Message-ID: <20120121155235.GN3294@mwanda> (raw)
In-Reply-To: <1327140612-9694-3-git-send-email-solid.se7en@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
On Sat, Jan 21, 2012 at 02:10:12AM -0800, Sam Hansen wrote:
> if (reg1 != 0xa1) { /*I/O error */
> - printk("\nXGIfb: I/O error!!!");
> + printk(KERN_ERR "\nXGIfb: I/O error!!!");
It doesn't make sense to do this. KERN_ERR puts a "<3>" in front of
the line so we know how important it is, but it's a blank line
because of the "\n" at the start.
Also the should probably be using pr_err() or dev_err().
> - printk("XGIfb: XGIInitNew() ...");
> + printk(KERN_INFO "XGIfb: XGIInitNew() ...");
> pci_set_drvdata(pdev, xgifb_info);
> if (XGIInitNew(pdev))
> - printk("OK\n");
> + printk(KERN_INFO "OK\n");
> else
> - printk("Fail\n");
> + printk(KERN_ERR "Fail\n");
These put a "<3>" in the middle of the line which doesn't help
anyone. Rewrite it so it's on one line. Get rid of the OK line.
> if (pVBInfo->FBAddr == NULL) {
> - printk("\n pVBInfo->FBAddr == 0 ");
> + printk(KERN_INFO "\n pVBInfo->FBAddr == 0 ");
Same.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-01-21 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-21 10:10 [PATCH 1/3] xgifb: checkpatch cleanup, braces Sam Hansen
2012-01-21 10:10 ` [PATCH 2/3] xgifb: checkpatch cleanup __func__ Sam Hansen
2012-01-21 10:10 ` [PATCH 3/3] xgifb: checkpatch cleanup, printk() KERN_* Sam Hansen
2012-01-21 15:52 ` Dan Carpenter [this message]
2012-01-21 17:13 ` sam hansen
2012-01-21 16:42 ` Joe Perches
2012-01-21 17:18 ` sam hansen
2012-01-21 19:22 ` sam hansen
2012-01-21 19:45 ` Joe Perches
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=20120121155235.GN3294@mwanda \
--to=dan.carpenter@oracle.com \
--cc=aaro.koskinen@iki.fi \
--cc=arnaud.patard@rtp-net.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=solid.se7en@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.