All of lore.kernel.org
 help / color / mirror / Atom feed
* [efi:next 4/6] drivers/firmware/efi/libstub/x86-stub.c:276 apple_set_os() error: uninitialized symbol 'set_os'.
@ 2024-07-07  1:32 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-07  1:32 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-efi@vger.kernel.org
TO: Aditya Garg <gargaditya08@live.com>
CC: Ard Biesheuvel <ardb@kernel.org>
CC: Lukas Wunner <lukas@wunner.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
head:   f06ecac98e56e2d6c8cb04da732dc6709f7e3fef
commit: d68cc8abc357c05ca1567458965f009add8bab69 [4/6] x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
:::::: branch date: 3 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-161-20240707 (https://download.01.org/0day-ci/archive/20240707/202407070905.agBmzzaD-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202407070905.agBmzzaD-lkp@intel.com/

New smatch warnings:
drivers/firmware/efi/libstub/x86-stub.c:276 apple_set_os() error: uninitialized symbol 'set_os'.

Old smatch warnings:
drivers/firmware/efi/libstub/x86-stub.c:190 retrieve_apple_device_properties() error: uninitialized symbol 'p'.
drivers/firmware/efi/libstub/x86-stub.c:190 retrieve_apple_device_properties() error: uninitialized symbol 'p'.
drivers/firmware/efi/libstub/x86-stub.c:208 retrieve_apple_device_properties() error: uninitialized symbol 'new'.
drivers/firmware/efi/libstub/x86-stub.c:208 retrieve_apple_device_properties() error: uninitialized symbol 'new'.

vim +/set_os +276 drivers/firmware/efi/libstub/x86-stub.c

d68cc8abc357c0 Aditya Garg 2024-06-30  258  
d68cc8abc357c0 Aditya Garg 2024-06-30  259  static void apple_set_os(void)
d68cc8abc357c0 Aditya Garg 2024-06-30  260  {
d68cc8abc357c0 Aditya Garg 2024-06-30  261  	struct {
d68cc8abc357c0 Aditya Garg 2024-06-30  262  		unsigned long version;
d68cc8abc357c0 Aditya Garg 2024-06-30  263  		efi_status_t (__efiapi *set_os_version)(const char *);
d68cc8abc357c0 Aditya Garg 2024-06-30  264  		efi_status_t (__efiapi *set_os_vendor)(const char *);
d68cc8abc357c0 Aditya Garg 2024-06-30  265  	} *set_os;
d68cc8abc357c0 Aditya Garg 2024-06-30  266  	efi_status_t status;
d68cc8abc357c0 Aditya Garg 2024-06-30  267  
d68cc8abc357c0 Aditya Garg 2024-06-30  268  	if (!efi_is_64bit() || !apple_match_product_name())
d68cc8abc357c0 Aditya Garg 2024-06-30  269  		return;
d68cc8abc357c0 Aditya Garg 2024-06-30  270  
d68cc8abc357c0 Aditya Garg 2024-06-30  271  	status = efi_bs_call(locate_protocol, &APPLE_SET_OS_PROTOCOL_GUID, NULL,
d68cc8abc357c0 Aditya Garg 2024-06-30  272  			     (void **)&set_os);
d68cc8abc357c0 Aditya Garg 2024-06-30  273  	if (status != EFI_SUCCESS)
d68cc8abc357c0 Aditya Garg 2024-06-30  274  		return;
d68cc8abc357c0 Aditya Garg 2024-06-30  275  
d68cc8abc357c0 Aditya Garg 2024-06-30 @276  	if (set_os->version >= 2) {
d68cc8abc357c0 Aditya Garg 2024-06-30  277  		status = set_os->set_os_vendor("Apple Inc.");
d68cc8abc357c0 Aditya Garg 2024-06-30  278  		if (status != EFI_SUCCESS)
d68cc8abc357c0 Aditya Garg 2024-06-30  279  			efi_err("Failed to set OS vendor via apple_set_os\n");
d68cc8abc357c0 Aditya Garg 2024-06-30  280  	}
d68cc8abc357c0 Aditya Garg 2024-06-30  281  
d68cc8abc357c0 Aditya Garg 2024-06-30  282  	if (set_os->version > 0) {
d68cc8abc357c0 Aditya Garg 2024-06-30  283  		/* The version being set doesn't seem to matter */
d68cc8abc357c0 Aditya Garg 2024-06-30  284  		status = set_os->set_os_version("Mac OS X 10.9");
d68cc8abc357c0 Aditya Garg 2024-06-30  285  		if (status != EFI_SUCCESS)
d68cc8abc357c0 Aditya Garg 2024-06-30  286  			efi_err("Failed to set OS version via apple_set_os\n");
d68cc8abc357c0 Aditya Garg 2024-06-30  287  	}
d68cc8abc357c0 Aditya Garg 2024-06-30  288  }
d68cc8abc357c0 Aditya Garg 2024-06-30  289  

-- 
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-07-07  1:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-07  1:32 [efi:next 4/6] drivers/firmware/efi/libstub/x86-stub.c:276 apple_set_os() error: uninitialized symbol 'set_os' 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.