mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matthias Schid <aircrach115@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	cruz@massive-dynamics.biz, jonbrett.dev@gmail.com,
	linux-kernel@i4.cs.fau.de, linux-kernel@vger.kernel.org,
	sjakub@gmail.com, joe@perches.com, steffhip@googlemail.com,
	simon.puels@gmail.com
Subject: Re: [PATCH 2/2] staging/asus_oled fixed linebreak style issue
Date: Wed, 5 Jun 2013 14:15:12 +0300	[thread overview]
Message-ID: <20130605111512.GW28112@mwanda> (raw)
In-Reply-To: <1370429445-17185-3-git-send-email-aircrach115@gmail.com>

On Wed, Jun 05, 2013 at 12:50:45PM +0200, Matthias Schid wrote:
> fixed a linebreak within an error message string coding style
> issue reported by checkpatch.pl
> 
> Signed-off-by: Matthias Schid <aircrach115@gmail.com>
> Signed-off-by: Stefan Huber <steffhip@googlemail.com>
> Signed-off-by: Simon Puels <simon.puels@gmail.com>
> ---
>  drivers/staging/asus_oled/asus_oled.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
> index 173fb9a..a7cd65a 100644
> --- a/drivers/staging/asus_oled/asus_oled.c
> +++ b/drivers/staging/asus_oled/asus_oled.c
> @@ -383,8 +383,7 @@ static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
>  		}
>  
>  		if (i >= odev->buf_size) {
> -			dev_err(odev->dev, "Buffer overflow! Report a bug:"
> -			       "offs: %d >= %d i: %d (x: %d y: %d)\n",
> +			dev_err(odev->dev, "Buffer overflow! Report a bug: offs: %d >= %d i: %d (x: %d y: %d)\n",
>  			       (int) odev->buf_offs, (int) odev->buf_size,
>  			       (int) i, (int) x, (int) y);

This could be improved:

			dev_err(odev->dev,
				"Buffer overflow! Report a bug: offs: %zu >= %d i: %zu (x: %zu y: %zu)\n",
			     	odev->buf_offs, odev->buf_size, i, x, y);

Printk fromats are documented in Documentation/printk-formats.txt.

regards,
dan carpenter


  reply	other threads:[~2013-06-05 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 10:50 [PATCH 0/2] staging/asus_oled fixed style issues Matthias Schid
2013-06-05 10:50 ` [PATCH 1/2] staging/asus_oled fixed alignment in defines Matthias Schid
2013-06-05 10:50 ` [PATCH 2/2] staging/asus_oled fixed linebreak style issue Matthias Schid
2013-06-05 11:15   ` Dan Carpenter [this message]
2013-06-05 12:04     ` [PATCH 2/2] staging/asus_oled fixed linebreak and printk issue Matthias Schid

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=20130605111512.GW28112@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aircrach115@gmail.com \
    --cc=cruz@massive-dynamics.biz \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=jonbrett.dev@gmail.com \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon.puels@gmail.com \
    --cc=sjakub@gmail.com \
    --cc=steffhip@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®