Files
android_external_dtc/tests
Thierry Reding 2bc5b66d7f libfdt: Add new maximum phandle lookup function
The fdt_get_max_phandle() function has some shortcomings. On one hand
it returns just a uint32_t which means to check for the "negative"
error code a caller has to explicitly check against the error code
(uint32_t)-1. In addition, the -1 is the only error code that can be
returned, so a caller cannot tell the difference between the various
failures.

Fix this by adding a new fdt_find_max_phandle() function that returns an
error code on failure and 0 on success, just like other APIs, and stores
the maximum phandle value in an output argument on success.

This also refactors fdt_get_max_phandle() to use the new function. Add a
note pointing out that the new fdt_find_max_phandle() function should be
preferred over fdt_get_max_phandle().

Signed-off-by: Thierry Reding <treding@nvidia.com>
Message-Id: <20190326153302.17109-1-thierry.reding@gmail.com>
[dwg: Reword for some inaccuracies in the commit message]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-29 13:29:51 +11:00
..
2019-03-29 12:12:29 +11:00
2017-12-15 13:26:57 +11:00
2018-03-07 14:55:39 +11:00
2007-02-15 11:02:44 -06:00
2007-02-15 11:02:44 -06:00
2007-02-15 11:02:44 -06:00
2017-03-06 12:08:53 +11:00
2012-07-08 13:45:21 -05:00
2018-06-07 11:49:14 +10:00
2017-03-06 12:08:53 +11:00
2017-02-24 11:12:50 +11:00
2017-03-06 12:08:53 +11:00
2017-10-26 09:25:14 +02:00
2017-03-06 12:08:53 +11:00
2018-07-09 15:03:14 +10:00
2007-02-15 11:02:44 -06:00
2007-02-15 11:02:44 -06:00
2019-03-29 12:12:29 +11:00
2019-03-29 12:12:29 +11:00
2017-06-15 15:37:07 +08:00
2019-03-29 12:12:29 +11:00
2017-03-06 12:08:53 +11:00