From: Borislav Petkov <bp@alien8.de>
To: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: tony.luck@intel.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3] ACPI, APEI: Cleanup alignment related codes for APEI
Date: Mon, 16 Dec 2013 15:19:06 +0100 [thread overview]
Message-ID: <20131216141906.GC4922@pd.tnic> (raw)
In-Reply-To: <1384494356-4034-1-git-send-email-gong.chen@linux.intel.com>
On Fri, Nov 15, 2013 at 12:45:56AM -0500, Chen, Gong wrote:
> diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> index 26311f2..bf30a12 100644
> --- a/drivers/acpi/apei/erst.c
> +++ b/drivers/acpi/apei/erst.c
> @@ -611,7 +611,7 @@ static void __erst_record_id_cache_compact(void)
> if (entries[i] == APEI_ERST_INVALID_RECORD_ID)
> continue;
> if (wpos != i)
> - memcpy(&entries[wpos], &entries[i], sizeof(entries[i]));
> + entries[wpos] = entries[i];
Why is it ok to drop the memcpy here and do a normal access?
__erst_record_id_cache_add_one still has a memcpy-like access.
What is the difference with all those accesses to erst_record_id_cache
and why doesn't it need the unaligned helpers?
This all needs to be explained in detail in the commit message.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-12-16 14:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 2:07 [PATCH V2] ACPI, APEI: Cleanup alignment related codes for APEI Chen, Gong
2013-11-14 1:49 ` Chen, Gong
2013-11-14 12:29 ` Borislav Petkov
2013-11-15 5:38 ` Chen, Gong
2013-11-15 5:45 ` [PATCH v3] " Chen, Gong
2013-11-16 11:48 ` Borislav Petkov
2013-12-14 13:41 ` Chen, Gong
2013-12-14 16:45 ` Borislav Petkov
2013-12-16 14:19 ` Borislav Petkov [this message]
2013-12-16 14:39 ` Chen, Gong
2013-12-16 17:55 ` Borislav Petkov
2013-12-17 5:34 ` Chen, Gong
2013-12-17 15:17 ` Borislav Petkov
2013-12-18 6:30 ` [PATCH v4] " Chen, Gong
2013-12-18 21:13 ` Borislav Petkov
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=20131216141906.GC4922@pd.tnic \
--to=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).