Re: [PATCH v3] ACPI, APEI: Cleanup alignment related codes for APEI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux