From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Date: Thu, 25 Apr 2019 15:25:14 +0200 Subject: [U-Boot] [PATCH 1/2] fdtdec: Use fdt_setprop_u32() for fdtdec_set_phandle() In-Reply-To: <20190415080821.441-1-thierry.reding@gmail.com> References: <20190415080821.441-1-thierry.reding@gmail.com> Message-ID: <20190425132514.GC10218@ulmo> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Apr 15, 2019 at 10:08:20AM +0200, Thierry Reding wrote: > From: Thierry Reding > > The fdt_setprop_u32() function does everything that we need, so we > really only use the function as a convenience wrapper, in which case it > can simply be a static inline function. > > Signed-off-by: Thierry Reding > --- > include/fdtdec.h | 5 ++++- > lib/fdtdec.c | 7 ------- > 2 files changed, 4 insertions(+), 8 deletions(-) Hi Simon, gentle reminder on these. These are the two follow-up patches that you had suggested I make on top of the other fdtdec series that you applied a couple of weeks ago. Thierry > diff --git a/include/fdtdec.h b/include/fdtdec.h > index 266c58271f0b..110aa6ab6dea 100644 > --- a/include/fdtdec.h > +++ b/include/fdtdec.h > @@ -1029,7 +1029,10 @@ int fdtdec_setup_memory_banksize(void); > * @param phandle phandle to set for the given node > * @return 0 on success or a negative error code on failure > */ > -int fdtdec_set_phandle(void *blob, int node, uint32_t phandle); > +static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) > +{ > + return fdt_setprop_u32(blob, node, "phandle", phandle); > +} > > /** > * fdtdec_add_reserved_memory() - add or find a reserved-memory node > diff --git a/lib/fdtdec.c b/lib/fdtdec.c > index 9c9c30234732..fea44a9a8c65 100644 > --- a/lib/fdtdec.c > +++ b/lib/fdtdec.c > @@ -1261,13 +1261,6 @@ __weak void *board_fdt_blob_setup(void) > } > #endif > > -int fdtdec_set_phandle(void *blob, int node, uint32_t phandle) > -{ > - fdt32_t value = cpu_to_fdt32(phandle); > - > - return fdt_setprop(blob, node, "phandle", &value, sizeof(value)); > -} > - > static int fdtdec_init_reserved_memory(void *blob) > { > int na, ns, node, err; > -- > 2.21.0 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: