[PATCH v2] fdtput: expand fdt if value does not fit (v2).

David Gibson dwg at au1.ibm.com
Tue Apr 30 17:56:22 EST 2013


On Tue, Apr 30, 2013 at 07:49:16AM +0100, Srinivas KANDAGATLA wrote:
> On 29/04/13 10:08, David Gibson wrote:
> > On Fri, Apr 19, 2013 at 09:36:36AM +0100, Srinivas KANDAGATLA wrote:
> >> From: Srinivas Kandagatla <srinivas.kandagatla at st.com>
[snip]
> >
> >> +		delta = sizeof(struct fdt_node_header) +
> >> +				ALIGN(newlen + 1) + FDT_TAGSIZE;
> > struct fdt_node_header already includes the FDT_BEGIN_NODE tag, so
> > you've allocated space for the tag twice.
> Here am allocating space for FDT_BEGIN_NODE + node name in off_struct +
> FDT_END_NODE.
> So am not allocating space for the tag twice.
> Am I missing something?

Oh, yes, sorry.  Maybe put /* FDT_END_NODE */ next to the extra
FDT_TAGSIZE to stop someone else missing this the way I did.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130430/8e65de0a/attachment-0001.sig>


More information about the devicetree-discuss mailing list