All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Thu, 13 Aug 2026 20:00:18 +0800	[thread overview]
Message-ID: <202608131912.702Adcgl-lkp@intel.com> (raw)

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/202608131912.702Adcgl-lkp@intel.com/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/202608131912.702Adcgl-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608131912.702Adcgl-lkp@intel.com/

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

                 reply	other threads:[~2026-08-13 12:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608131912.702Adcgl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.