From: Julia Lawall <julia@diku.dk>
To: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] arch/powerpc/platforms/pseries/ras.c - cleanup
Date: Mon, 8 Mar 2010 22:36:01 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.1003082235030.5727@ask.diku.dk> (raw)
In-Reply-To: <hn3osd$4in$1@dough.gmane.org>
On Mon, 8 Mar 2010, Christophe Jaillet wrote:
> From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
>
> Hi, here is a patch against arch/powerpc/platforms/pseries/ras.c.
>
> No need to memset (.., 0, ...) a buffer that is complety filled by a memcpy
> the line after.
I find 14 occurrences of this in linux-next. Could it be useful for
something?
julia
>
>
> Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
>
> ---
>
> diff --git a/arch/powerpc/platforms/pseries/ras.c
> b/arch/powerpc/platforms/pseries/ras.c
> index 2b548af..7a401ed 100644
> --- a/arch/powerpc/platforms/pseries/ras.c
> +++ b/arch/powerpc/platforms/pseries/ras.c
> @@ -276,7 +276,6 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct
> pt_regs *regs)
> (errdata >= rtas.base && errdata < rtas.base + rtas.size - 16)) {
> savep = __va(errdata);
> regs->gpr[3] = savep[0]; /* restore original r3 */
> - memset(mce_data_buf, 0, RTAS_ERROR_LOG_MAX);
> memcpy(mce_data_buf, (char *)(savep + 1), RTAS_ERROR_LOG_MAX);
> errhdr = (struct rtas_error_log *)mce_data_buf;
> } else {
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next parent reply other threads:[~2010-03-08 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <hn3osd$4in$1@dough.gmane.org>
2010-03-08 21:36 ` Julia Lawall [this message]
2010-03-09 6:14 ` Christophe Jaillet
2010-03-09 17:21 ` Julia Lawall
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=Pine.LNX.4.64.1003082235030.5727@ask.diku.dk \
--to=julia@diku.dk \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@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
all inboxes | Powered by JetHome®