* [PATCH] libfdt: simplify fdt_del_mem_rsv()
@ 2016-08-22 9:55 Masahiro Yamada
[not found] ` <1471859749-1210-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2016-08-22 9:55 UTC (permalink / raw)
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA; +Cc: Masahiro Yamada
The variable "err" is unneeded.
Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
---
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,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libfdt: simplify fdt_del_mem_rsv()
[not found] ` <1471859749-1210-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
@ 2016-08-22 10:54 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2016-08-22 10:54 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-22 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).