[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131029185302.GA22261@mtj.dyndns.org>
Date: Tue, 29 Oct 2013 14:53:02 -0400
From: Tejun Heo <tj@...nel.org>
To: Levente Kurusa <levex@...ux.com>
Cc: Linux IDE/ATA Dev <linux-ide@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH trivial] ata: libata-eh: Remove unnecessary snprintf
arithmetic
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@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists