[efi:next 14/16] drivers/firmware/efi/libstub/file.c:221:3: error: expected expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-defconfig (https://download.01.org/0day-ci/archive/20241117/202411171307.NTJaEkIS-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171307.NTJaEkIS-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411171307.NTJaEkIS-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/firmware/efi/libstub/file.c:221:3: error: expected expression
                   static const efi_char16_t builtin_cmdline[] = L"" CONFIG_CMDLINE;
                   ^
>> drivers/firmware/efi/libstub/file.c:223:17: error: use of undeclared identifier 'builtin_cmdline'
                   cmdline     = builtin_cmdline;
                                 ^
   drivers/firmware/efi/libstub/file.c:224:28: error: use of undeclared identifier 'builtin_cmdline'
                   cmdline_len = ARRAY_SIZE(builtin_cmdline) - 1;
                                            ^
   drivers/firmware/efi/libstub/file.c:224:28: error: use of undeclared identifier 'builtin_cmdline'
   drivers/firmware/efi/libstub/file.c:224:28: error: use of undeclared identifier 'builtin_cmdline'
   5 errors 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;
   222	
 > 223			cmdline	    = builtin_cmdline;

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux