Commit bec5f60
of/fdt: Fix the len check in early_init_dt_check_for_elfcorehdr()
The len value is in bytes, while `dt_root_addr_cells + dt_root_size_cells`
is in cells (4 bytes per cell). Comparing them directly is incorrect.
Use a helper function to simplify the code and address this issue.
Fixes: f7e7ce9 ("of: fdt: Add generic support for handling elf core headers property")
Fixes: e62aaea ("arm64: kdump: provide /proc/vmcore file")
Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev>
Link: https://patch.msgid.link/20251115134753.179931-3-yuntao.wang@linux.dev
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>1 parent 8278cb7 commit bec5f60
1 file changed
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | 856 | | |
860 | 857 | | |
861 | 858 | | |
862 | 859 | | |
863 | 860 | | |
864 | | - | |
865 | | - | |
| 861 | + | |
| 862 | + | |
866 | 863 | | |
867 | 864 | | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | 865 | | |
872 | 866 | | |
873 | 867 | | |
| |||
0 commit comments