[PATCH] of: fdt: modify small size memory check

From: skseofh
Date: Mon Mar 04 2024 - 17:38:48 EST



> >
> >
> > >>
> > >> From: Daero Lee <skseofh@xxxxxxxxx>
> > >>
> > >> After page aligning, the size may become zero. So I added exception
> > >> handling code for size 0.
> > >
> > >That may be true, but when would anyone only have memory regions of
> > >less than 2 pages. In any case memblock_add will just do nothing. What
> > >is the actual problem you are having?
> > >
> > >Rob
> >
> > Ignore the previous mail.
> > I modified the patch to clear this size check routine. Please check
>
> You still haven't answered my questions above.
>
> Though the patch below is a bit more readable than what we currently have...

Well.. I don't see any 'real' problem with this.
But I'm not sure if it's appropriate to leave a part that will be returned
directly in the next fuction called. Wouldn't it be better to handle the part
can be handled in this function, rather than expecting the next function to
handle this exception?