From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [efi:next 4/6] drivers/firmware/efi/libstub/x86-stub.c:276 apple_set_os() error: uninitialized symbol 'set_os'.
Date: Sun, 7 Jul 2024 09:32:18 +0800 [thread overview]
Message-ID: <202407070905.agBmzzaD-lkp@intel.com> (raw)
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
reply other threads:[~2024-07-07 1:32 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=202407070905.agBmzzaD-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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.