[SLOF] [PATCH v2 1/3] board_qemu: drop unused values early in fdt-fix-node-phandle

Segher Boessenkool segher at kernel.crashing.org
Fri Jul 14 09:03:11 AEST 2017


On Fri, Jul 14, 2017 at 12:25:14AM +0200, Greg Kurz wrote:
> These two values are pushed on the stack by decode-int and stay unused
> until the 2drop line. Let's drop them right away to make it obvious.
> 
> Signed-off-by: Greg Kurz <groug at kaod.org>
> ---
>  board-qemu/slof/fdt.fs |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
> index 8d4635f30495..eff3375c5916 100644
> --- a/board-qemu/slof/fdt.fs
> +++ b/board-qemu/slof/fdt.fs
> @@ -314,11 +314,10 @@ fdt-claim-reserve
>     >r
>     FALSE TO (fdt-phandle-replaced)
>     s" phandle" r@ get-property 0= IF
> -      decode-int                       ( p-addr2 p-len2 val )
> +      decode-int -rot 2drop

decode-int nip nip   may be a tiny bit clearer (and faster).  But,
looks good anyway :-)


Segher


>        \ ." found phandle: " dup . cr
> -      r@ s" /" find-node               ( p-addr2 p-len2 val node root )  
> -      fdt-replace-all-phandles         ( p-addr2 p-len2 )
> -      2drop
> +      r@ s" /" find-node               ( val node root )
> +      fdt-replace-all-phandles
>        (fdt-phandle-replaced) IF
>           r@ set-node
>           s" phandle" delete-property


More information about the SLOF mailing list