All of lore.kernel.org
 help / color / mirror / Atom feed
* [efi:next 14/16] drivers/firmware/efi/libstub/file.c:221:3: warning: label followed by a declaration is a C23 extension
@ 2024-11-17  5:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-17  5:04 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: llvm, oe-kbuild-all, linux-efi

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head:   8e060452c658e09ce7bcdeaa19dc080d74176a56
commit: 257f826a691aa9eff8767f0ca5b82a3368b3d02a [14/16] efi/libstub: Fix command line fallback handling when loading files
config: arm-randconfig-002-20241117 (https://download.01.org/0day-ci/archive/20241117/202411171305.mtelLSJK-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171305.mtelLSJK-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/202411171305.mtelLSJK-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/firmware/efi/libstub/file.c:11:
   In file included from arch/arm/include/asm/efi.h:9:
   In file included from arch/arm/include/asm/cacheflush.h:10:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/firmware/efi/libstub/file.c:221:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     221 |                 static const efi_char16_t builtin_cmdline[] = L"" CONFIG_CMDLINE;
         |                 ^
   2 warnings generated.


vim +221 drivers/firmware/efi/libstub/file.c

   177	
   178	/*
   179	 * Check the cmdline for a LILO-style file= arguments.
   180	 *
   181	 * We only support loading a file from the same filesystem as
   182	 * the kernel image.
   183	 */
   184	efi_status_t handle_cmdline_files(efi_loaded_image_t *image,
   185					  const efi_char16_t *optstr,
   186					  int optstr_size,
   187					  unsigned long soft_limit,
   188					  unsigned long hard_limit,
   189					  unsigned long *load_addr,
   190					  unsigned long *load_size)
   191	{
   192		const bool ignore_load_options = false;
   193		const efi_char16_t *cmdline = efi_table_attr(image, load_options);
   194		u32 cmdline_len = efi_table_attr(image, load_options_size);
   195		unsigned long efi_chunk_size = ULONG_MAX;
   196		efi_file_protocol_t *volume = NULL;
   197		efi_file_protocol_t *file;
   198		unsigned long alloc_addr;
   199		unsigned long alloc_size;
   200		efi_status_t status;
   201		bool twopass;
   202		int offset;
   203	
   204		if (!load_addr || !load_size)
   205			return EFI_INVALID_PARAMETER;
   206	
   207		efi_apply_loadoptions_quirk((const void **)&cmdline, &cmdline_len);
   208		cmdline_len /= sizeof(*cmdline);
   209	
   210		if (IS_ENABLED(CONFIG_X86) && !efi_nochunk)
   211			efi_chunk_size = EFI_READ_CHUNK_SIZE;
   212	
   213		alloc_addr = alloc_size = 0;
   214	
   215		if (!ignore_load_options && cmdline_len > 0) {
   216			twopass = IS_ENABLED(CONFIG_CMDLINE_BOOL) ||
   217				  IS_ENABLED(CONFIG_CMDLINE_EXTEND);
   218		} else {
   219	do_builtin:
   220	#ifdef CONFIG_CMDLINE
 > 221			static const efi_char16_t builtin_cmdline[] = L"" CONFIG_CMDLINE;

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-17  5:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17  5:04 [efi:next 14/16] drivers/firmware/efi/libstub/file.c:221:3: warning: label followed by a declaration is a C23 extension kernel test robot

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.