All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu-Chien Peter Lin <peterlin@andestech.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 1/5] lib: simplify fdt_parse_plmt_node()
Date: Mon, 28 Nov 2022 07:50:22 +0000	[thread overview]
Message-ID: <Y4RoPh9nle+sLOmY@APC323> (raw)
In-Reply-To: <20221125140827.47018-2-heinrich.schuchardt@canonical.com>

On Fri, Nov 25, 2022 at 03:08:23PM +0100, Heinrich Schuchardt wrote:
> We should not check !plmt_base || !plmt_size twice.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Looks good to me.
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>

> ---
>  lib/utils/fdt/fdt_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c
> index 89b8bba..dbd7484 100644
> --- a/lib/utils/fdt/fdt_helper.c
> +++ b/lib/utils/fdt/fdt_helper.c
> @@ -814,7 +814,7 @@ int fdt_parse_plmt_node(void *fdt, int nodeoffset, unsigned long *plmt_base,
>  
>  	rc = fdt_get_node_addr_size(fdt, nodeoffset, 0,
>  				    &reg_addr, &reg_size);
> -	if (rc < 0 || !plmt_base || !plmt_size)
> +	if (rc < 0)
>  		return SBI_ENODEV;
>  	*plmt_base = reg_addr;
>  	*plmt_size = reg_size;
> -- 
> 2.37.2


  parent reply	other threads:[~2022-11-28  7:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 14:08 [PATCH 0/5] lib: fixes for fdt functions Heinrich Schuchardt
2022-11-25 14:08 ` [PATCH 1/5] lib: simplify fdt_parse_plmt_node() Heinrich Schuchardt
2022-11-26 12:54   ` Xiang W
2022-11-28  7:50   ` Yu-Chien Peter Lin [this message]
2022-11-25 14:08 ` [PATCH 2/5] lib: simplify fdt_parse_plicsw_node() Heinrich Schuchardt
2022-11-26 12:54   ` Xiang W
2022-11-28  8:05   ` Yu-Chien Peter Lin
2022-11-25 14:08 ` [PATCH 3/5] lib: fix fdt_parse_plmt_node() Heinrich Schuchardt
2022-11-26 12:49   ` Xiang W
2022-11-25 14:08 ` [PATCH 4/5] lib: fix fdt_parse_plicsw_node() Heinrich Schuchardt
2022-11-26 12:51   ` Xiang W
2022-11-25 14:08 ` [PATCH 5/5] lib: simplify fdt_translate_address() Heinrich Schuchardt
2022-11-26 12:55   ` Xiang W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4RoPh9nle+sLOmY@APC323 \
    --to=peterlin@andestech.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.