Back to home page

LXR

 
 

    


Warning, /cpukit/dtc/VERSION is written in an unsupported language. File is not indexed.

0001 Import from:
0002 
0003 git://git.kernel.org/pub/scm/utils/dtc/dtc.git
0004 
0005 commit 2cd89f862cdb04d91c5d59c5b39647f7d5d5b3b8
0006 Author: David Gibson <david@gibson.dropbear.id.au>
0007 Date:   Mon Nov 21 14:18:44 2022 +1100
0008 
0009     dtc: Warning rather than error on possible truncation of cell values
0010 
0011     We always evaluate integer values in cell arrays as 64-bit quantities, then
0012     truncate to the size of the array cells (32-bit by default).  However to
0013     detect accidental truncation of meaningful values, we give an error if the
0014     truncated portion isn't either all 0 or all 1 bits.  However, this can
0015     still give counterintuitive errors.  For if the user is thinking in 2's
0016     complement 32-bit arithmetic (which would be quite natural), then they'd
0017     expect the expression (-0xffffffff-2) to evaluate to -1 (0xffffffff).
0018     However in 64-bit it evaluates to 0xfffffffeffffffff which does truncate
0019     to the expected value but trips this error message.
0020 
0021     Because of this reduce the error to only a warnings, with a somewhat more
0022     helpful message.
0023 
0024     Fixes: https://github.com/dgibson/dtc/issues/74
0025 
0026     Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
0027 
0028 Commands to generate update patches:
0029 
0030 git format-patch 2cd89f862cdb04d91c5d59c5b39647f7d5d5b3b8 -- libfdt/fdt_addresses.c libfdt/fdt.c libfdt/fdt_empty_tree.c libfdt/fdt.h libfdt/fdt_ro.c libfdt/fdt_rw.c libfdt/fdt_strerror.c libfdt/fdt_sw.c libfdt/fdt_wip.c libfdt/libfdt_env.h libfdt/libfdt.h libfdt/libfdt_internal.h libfdt/TODO
0031 sed -i 's%/libfdt/fdt.h%/cpukit/include/fdt.h%g' 00*
0032 sed -i 's%/libfdt/libfdt.h%/cpukit/include/libfdt.h%g' 00*
0033 sed -i 's%/libfdt/libfdt_env.h%/cpukit/include/libfdt_env.h%g' 00*
0034 sed -i 's%/libfdt/%/cpukit/dtc/libfdt/%g' 00*