public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 15/17] Staging: quickstart: Use pr_err and pr_info for logs
Date: Wed, 11 Jan 2012 23:58:00 +0000	[thread overview]
Message-ID: <1326326280.7886.6.camel@joe2Laptop> (raw)
In-Reply-To: <1326320574-11220-17-git-send-email-szymon@janc.net.pl>

On Wed, 2012-01-11 at 23:22 +0100, Szymon Janc wrote:
> Signed-off-by: Szymon Janc <szymon@janc.net.pl>

trivia:

> diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
[]
> @@ -25,6 +25,8 @@
[]
> +#define pr_fmt(fmt) KBUILD_MODNAME": " fmt

Add a space please between KBUILD_MODNAME and the quoted string.
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

[]
> @@ -207,9 +209,8 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart)
>  		quickstart->button->id = *(uint64_t *)buffer.pointer;
>  		break;
>  	default:
> -		printk(KERN_ERR "quickstart: %s GHID method returned buffer "
> -				"of unexpected length %u\n",
> -				quickstart->button->name, buffer.length);
> +		pr_err("%s GHID method returned buffer of unexpected length %u"
> +				"\n", quickstart->button->name, buffer.length);

Please try not to break format strings into multiple bits.
It's very error prone and can make it harder to grep.
It's OK to have the line with the format exceed 80 chars.

		pr_err("%s GHID method returned buffer of unexpected length %u\n",
		       quickstart->button->name, buffer.length);



  reply	other threads:[~2012-01-11 23:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 22:22 [PATCH v2 15/17] Staging: quickstart: Use pr_err and pr_info for logs Szymon Janc
2012-01-11 23:58 ` Joe Perches [this message]
2012-01-14 22:20 ` Szymon Janc
2012-01-22 18:52 ` Szymon Janc
2012-01-23 17:44 ` 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=1326326280.7886.6.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=kernel-janitors@vger.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