llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages
       [not found] <20250706100147.1447-1-khaliidcaliy@gmail.com>
@ 2025-07-06 13:24 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-06 13:24 UTC (permalink / raw)
  To: Khalid Ali, ardb, paul.walmsley, palmer, aou, alex
  Cc: llvm, oe-kbuild-all, gargaditya08, jonathan, kees, linux-efi,
	linux-riscv, lukas, linux-kernel, Khalid Ali

Hi Khalid,

kernel test robot noticed the following build warnings:

[auto build test WARNING on efi/next]
[also build test WARNING on linus/master v6.16-rc4 next-20250704]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Khalid-Ali/efi-libstub-Print-uefi-status-code-on-error-messages/20250706-180349
base:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
patch link:    https://lore.kernel.org/r/20250706100147.1447-1-khaliidcaliy%40gmail.com
patch subject: [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages
config: loongarch-randconfig-001-20250706 (https://download.01.org/0day-ci/archive/20250706/202507062122.z20qLlyi-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250706/202507062122.z20qLlyi-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/202507062122.z20qLlyi-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/firmware/efi/libstub/efi-stub.c:117:70: warning: variable 'status' is uninitialized when used here [-Wuninitialized]
     117 |                 efi_err("getting command line via LOADED_IMAGE_PROTOCOL: 0x%lx\n", status);
         |                                                                                    ^~~~~~
   drivers/firmware/efi/libstub/efistub.h:75:39: note: expanded from macro 'efi_err'
      75 |         efi_printk(KERN_ERR "ERROR: " fmt, ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   drivers/firmware/efi/libstub/efi-stub.c:108:21: note: initialize the variable 'status' to silence this warning
     108 |         efi_status_t status;
         |                            ^
         |                             = 0
   1 warning generated.


vim +/status +117 drivers/firmware/efi/libstub/efi-stub.c

   104	
   105	efi_status_t efi_handle_cmdline(efi_loaded_image_t *image, char **cmdline_ptr)
   106	{
   107		char *cmdline __free(efi_pool) = NULL;
   108		efi_status_t status;
   109	
   110		/*
   111		 * Get the command line from EFI, using the LOADED_IMAGE
   112		 * protocol. We are going to copy the command line into the
   113		 * device tree, so this can be allocated anywhere.
   114		 */
   115		cmdline = efi_convert_cmdline(image);
   116		if (!cmdline) {
 > 117			efi_err("getting command line via LOADED_IMAGE_PROTOCOL: 0x%lx\n", status);
   118			return EFI_OUT_OF_RESOURCES;
   119		}
   120	
   121		if (!IS_ENABLED(CONFIG_CMDLINE_FORCE)) {
   122			status = efi_parse_options(cmdline);
   123			if (status != EFI_SUCCESS) {
   124				efi_err("Failed to parse EFI load options: 0x%lx\n", status);
   125				return status;
   126			}
   127		}
   128	
   129		if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
   130		    IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
   131		    cmdline[0] == 0) {
   132			status = efi_parse_options(CONFIG_CMDLINE);
   133			if (status != EFI_SUCCESS) {
   134				efi_err("Failed to parse built-in command line: 0x%lx\n", status);
   135				return status;
   136			}
   137		}
   138	
   139		*cmdline_ptr = no_free_ptr(cmdline);
   140		return EFI_SUCCESS;
   141	}
   142	

-- 
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:[~2025-07-06 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250706100147.1447-1-khaliidcaliy@gmail.com>
2025-07-06 13:24 ` [PATCH v2 2/2] efi/libstub: Print uefi status code on error messages kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).