lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] of/fdt: Remove duplicate memory clearing on FDT unflattening
On 29/08/13 15:44, Grant Likely wrote:
> Patch 9e4012752, "of: fdt: fix memory initialization for expanded DT"
> fixed incomplete clearing of memory when unflattening the device tree.
> However the code was already clearing some of the memory, it just wasn't
> doing so for all allocations. Now that the memory is cleared right at
> the point of allocation, the memset after unflatten_dt_alloc() is
> redundant. Remove it.

Acked-by: Wladislav Wiebe <wladislav.kw@gmail.com>

>
> Signed-off-by: Grant Likely <grant.likely@linaro.org>
> Cc: Wladislav Wiebe <wladislav.kw@gmail.com>
> ---
> drivers/of/fdt.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 55b028f..9d9be9617 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -202,7 +202,6 @@ static void * unflatten_dt_node(struct boot_param_header *blob,
> __alignof__(struct device_node));
> if (allnextpp) {
> char *fn;
> - memset(np, 0, sizeof(*np));
> np->full_name = fn = ((char *)np) + sizeof(*np);
> if (new_format) {
> /* rebuild full path for new format */
>



\
 
 \ /
  Last update: 2013-08-29 19:21    [W:0.019 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site