From: Tejun Heo <tj@kernel.org>
To: Levente Kurusa <levex@linux.com>
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 14:53:02 -0400 [thread overview]
Message-ID: <20131029185302.GA22261@mtj.dyndns.org> (raw)
In-Reply-To: <527000AE.8060506@linux.com>
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?
Thanks.
--
tejun
next prev parent reply other threads:[~2013-10-29 18:53 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 [this message]
2013-10-29 18:58 ` Levente Kurusa
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=20131029185302.GA22261@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=levex@linux.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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