From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] libfdt: simplify fdt_del_mem_rsv()
Date: Mon, 22 Aug 2016 06:54:39 -0400 [thread overview]
Message-ID: <20160822105439.GA16293@littlecatz> (raw)
In-Reply-To: <1471859749-1210-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
On Mon, Aug 22, 2016 at 06:55:49PM +0900, Masahiro Yamada wrote:
> The variable "err" is unneeded.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Applied, thanks.
> ---
> libfdt/fdt_rw.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c
> index 8be02b1..2eed4f5 100644
> --- a/libfdt/fdt_rw.c
> +++ b/libfdt/fdt_rw.c
> @@ -191,17 +191,13 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
> int fdt_del_mem_rsv(void *fdt, int n)
> {
> struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
> - int err;
>
> FDT_RW_CHECK_HEADER(fdt);
>
> if (n >= fdt_num_mem_rsv(fdt))
> return -FDT_ERR_NOTFOUND;
>
> - err = _fdt_splice_mem_rsv(fdt, re, 1, 0);
> - if (err)
> - return err;
> - return 0;
> + return _fdt_splice_mem_rsv(fdt, re, 1, 0);
> }
>
> static int _fdt_resize_property(void *fdt, int nodeoffset, const char *name,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-08-22 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 9:55 [PATCH] libfdt: simplify fdt_del_mem_rsv() Masahiro Yamada
[not found] ` <1471859749-1210-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2016-08-22 10:54 ` David Gibson [this message]
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=20160822105439.GA16293@littlecatz \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).