public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Levente Kurusa <levex@linux.com>
To: Tejun Heo <tj@kernel.org>
Cc: Linux IDE/ATA Dev <linux-ide@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH trivial] ata: libata-eh: Remove unnecessary snprintf arithmetic
Date: Tue, 29 Oct 2013 19:58:55 +0100	[thread overview]
Message-ID: <5270056F.4030702@linux.com> (raw)
In-Reply-To: <20131029185302.GA22261@mtj.dyndns.org>

2013-10-29 19:53 keltezéssel, Tejun Heo írta:
> Hello,
> 
> On Tue, Oct 29, 2013 at 07:38:38PM +0100, Levente Kurusa wrote:
>> Remove an unnecessary arithmetic operation from a call to snprintf, because
>> the size parameter of snprintf includes the trailing null byte.
>>
>> Signed-off-by: Levente Kurusa <levex@linux.com>
>> ---
>> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
>> index f9476fb..b7c4146 100644
>> --- a/drivers/ata/libata-eh.c
>> +++ b/drivers/ata/libata-eh.c
>> @@ -2427,7 +2434,7 @@ static void ata_eh_link_report(struct ata_link *link)
>>
>>  	memset(tries_buf, 0, sizeof(tries_buf));
> 
> While at it, can you please remove the above and just initialize the
> buffer to "" on definition?

Sure, sending v2 in a moment.

-- 
Regards,
Levente Kurusa

      reply	other threads:[~2013-10-29 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 18:38 [PATCH trivial] ata: libata-eh: Remove unnecessary snprintf arithmetic Levente Kurusa
2013-10-29 18:53 ` Tejun Heo
2013-10-29 18:58   ` Levente Kurusa [this message]

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=5270056F.4030702@linux.com \
    --to=levex@linux.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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