lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] of: fdt: remove unnecessary codes
On Thu, 01 Jul 2021 23:04:57 +0900, 권오훈 wrote:
> While unflattening the device tree, we try to populate dt nodes and
> properties into tree-shaped data structure.
>
> In populate_properties function, pprev is initially set to
> &np->properties, and then updated to &pp->next.
>
> In both scenarios *pprev is NULL, since the memory area that we are
> allocating from is initially zeroed.
>
> I tested the code as below, and it showed that BUG was never called.
>
> - if (!dryrun)
> + if (!dryrun) {
> + if (*pprev)
> + BUG();
> *pprev = NULL;
> + }
>
> Let's remove unnecessary code.
>
> Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
> ---
> drivers/of/fdt.c | 3 ---
> 1 file changed, 3 deletions(-)
>

Applied, thanks!

\
 
 \ /
  Last update: 2021-07-15 00:51    [W:0.035 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site