[PATCH v15 06/16] of/fdt: add helper functions for handling properties
From: David Gibson <hidden>
Date: 2018-10-10 00:58:49
Also in:
kexec, linux-devicetree, lkml
From: David Gibson <hidden>
Date: 2018-10-10 00:58:49
Also in:
kexec, linux-devicetree, lkml
On Tue, Oct 09, 2018 at 11:02:29AM -0700, Frank Rowand wrote:
On 10/04/18 22:06, AKASHI, Takahiro wrote:
[snip]
quoted
quoted
quoted
quoted
+int fdt_setprop_reg(void *fdt, int nodeoffset, const char *name, + u64 addr, u64 size) +{ + int addr_cells, size_cells;unsignedfdt_[address|size]_cell() returns an int.I stand corrected. They take advantage of the fact that valid values are in the range 0..4 and return a negative value for error.
I'm not sure if the spec formally defines that these values will fit in a positive 'int'. But if addresses are 8GiB each, you're going to have much bigger problems putting it in a device tree than this function. -- 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: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181010/6840e7e7/attachment.sig>