[ardb:arm64-bti-veneers 16/19] drivers/firmware/efi/fdtparams.c:148:8: warning: assignment to 'efi_system_table_t *' {aka 'union <anonymous> *'} from 'int' makes pointer from integer without a cast
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm64-bti-veneers head: 86ddd7b8abc1d6c5c6b58b302386c9a6ebde2d77 commit: 7b7e705d322908f785f10aa482dc9a75570bc831 [16/19] efi: Make the 'linux,uefi-boot-memmap' DT property optional config: arm-randconfig-001-20260813 (https://download.01.org/0day-ci/archive/20260813/[email protected]/config) compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): drivers/firmware/efi/fdtparams.c: In function 'efi_get_fdt_params': drivers/firmware/efi/fdtparams.c:148:10: error: implicit declaration of function 'early_memremap_ro'; did you mean 'arch_memremap_wb'? [-Werror=implicit-function-declaration] st = early_memremap_ro(systab, sizeof(*st)); ^~~~~~~~~~~~~~~~~ arch_memremap_wb >> drivers/firmware/efi/fdtparams.c:148:8: warning: assignment to 'efi_system_table_t *' {aka 'union <anonymous> *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] st = early_memremap_ro(systab, sizeof(*st)); ^ drivers/firmware/efi/fdtparams.c:157:5: error: implicit declaration of function 'early_memunmap'; did you mean 'devm_memunmap'? [-Werror=implicit-function-declaration] early_memunmap(st, sizeof(*st)); ^~~~~~~~~~~~~~ devm_memunmap >> drivers/firmware/efi/fdtparams.c:159:9: warning: assignment to 'efi_config_table_t *' {aka 'union <anonymous> *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] tbl = early_memremap_ro(tables, sizeof(*tbl) * nr_tables); ^ drivers/firmware/efi/fdtparams.c:174:7: warning: assignment to 'struct efi_boot_memmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion] bm = early_memremap_ro(memmap, sizeof(*bm)); ^ cc1: some warnings being treated as errors vim +148 drivers/firmware/efi/fdtparams.c 86 87 u64 __init efi_get_fdt_params(struct efi_memory_map_data *mm) 88 { 89 const void *fdt = initial_boot_params; 90 unsigned long systab, memmap = 0; 91 int i, j, node; 92 struct { 93 void *var; 94 int size; 95 int optional; 96 } target[] = { 97 [SYSTAB] = { &systab, sizeof(systab) }, 98 [MEMMAP] = { &memmap, sizeof(memmap), 1 }, 99 #ifdef CONFIG_XEN 100 [MMBASE] = { &mm->phys_map, sizeof(mm->phys_map) }, 101 [MMSIZE] = { &mm->size, sizeof(mm->size) }, 102 [DCSIZE] = { &mm->desc_size, sizeof(mm->desc_size) }, 103 [DCVERS] = { &mm->desc_version, sizeof(mm->desc_version) }, 104 #endif 105 }; 106 107 BUILD_BUG_ON(ARRAY_SIZE(target) != ARRAY_SIZE(name)); 108 BUILD_BUG_ON(ARRAY_SIZE(target) != ARRAY_SIZE(dt_params[0].params)); 109 110 if (!fdt) 111 return 0; 112 113 for (i = 0; i < ARRAY_SIZE(dt_params); i++) { 114 node = fdt_path_offset(fdt, dt_params[i].path); 115 if (node < 0) 116 continue; 117 118 if (efi_enabled(EFI_DBG)) 119 pr_info("Getting UEFI parameters from %s in DT:\n", 120 dt_params[i].path); 121 122 for (j = 0; j < ARRAY_SIZE(target); j++) { 123 const char *pname = dt_params[i].params[j]; 124 125 if (pname[0] == '\0') 126 continue; 127 128 if (!efi_get_fdt_prop(fdt, node, pname, name[j], 129 target[j].var, target[j].size)) 130 continue; 131 if (!j) 132 goto notfound; 133 if (!target[j].optional) { 134 pr_err("Can't find property '%s' in DT!\n", pname); 135 return 0; 136 } 137 } 138 if (IS_ENABLED(CONFIG_XEN) && dt_params[i].paravirt) { 139 set_bit(EFI_PARAVIRT, &efi.flags); 140 } else { 141 struct efi_boot_memmap *bm; 142 143 if (!memmap) { 144 unsigned long tables, nr_tables; 145 efi_system_table_t *st; 146 efi_config_table_t *tbl; 147 > 148 st = early_memremap_ro(systab, sizeof(*st)); 149 if (!st) { 150 pr_err("Cannot remap EFI system table\n"); 151 return 0; 152 } 153 154 tables = st->tables; 155 nr_tables = st->nr_tables; 156 157 early_memunmap(st, sizeof(*st)); 158 > 159 tbl = early_memremap_ro(tables, sizeof(*tbl) * nr_tables); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki