Re: [PATCH 01/12] libfdt: Clean up header checking functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi David,

On 26 March 2018 at 07:25, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Many of the libfdt entry points call some sort of sanity check function
> before doing anything else.  These need to do slightly different things for
> the various classes of functions.
>
> The read-only version is shared with the exported fdt_check_header(), which
> limits us a bit in how we can improve it.  For that reason split the two
> functions apart (though the exported one just calls the ro one for now).
>
> We also rename the functions for more consistency - they're all named
> fdt_XX_probe_() where the XX indicates which class of functions they're
> for.  "probe" is a better "term" than the previous check, since they really
> only do minimal validation.
>
> Signed-off-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  libfdt/fdt.c             |  9 +++++++--
>  libfdt/fdt_overlay.c     |  6 +++---
>  libfdt/fdt_ro.c          | 18 +++++++++---------
>  libfdt/fdt_rw.c          | 28 ++++++++++++++--------------
>  libfdt/fdt_sw.c          | 18 +++++++++---------
>  libfdt/libfdt_internal.h |  6 ++++--

Can you add comments to this file to explain what the new functions actually do?

>  6 files changed, 46 insertions(+), 39 deletions(-)

Also what do you think about a build option to disable these checks?
They might increase code size for small environments. Some build
systems will be able to ensure that the DT is valid and won't want
these checks.

Regards,
Simon
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux