All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/firmware/efi/ovmf-debug-log.c:94 ovmf_log_probe() warn: missing unwind goto?
Date: Wed, 13 Aug 2025 14:44:22 +0800	[thread overview]
Message-ID: <202508131440.KXL63uuM-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Gerd Hoffmann <kraxel@redhat.com>
CC: Ard Biesheuvel <ardb@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8742b2d8935f476449ef37e263bc4da3295c7b58
commit: f393a761763c542761abcf978252d431269366d6 efi: add ovmf debug log driver
date:   5 weeks ago
:::::: branch date: 11 hours ago
:::::: commit date: 5 weeks ago
config: x86_64-randconfig-161-20250813 (https://download.01.org/0day-ci/archive/20250813/202508131440.KXL63uuM-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)

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/202508131440.KXL63uuM-lkp@intel.com/

smatch warnings:
drivers/firmware/efi/ovmf-debug-log.c:94 ovmf_log_probe() warn: missing unwind goto?

vim +94 drivers/firmware/efi/ovmf-debug-log.c

f393a761763c54 Gerd Hoffmann 2025-07-08  66  
f393a761763c54 Gerd Hoffmann 2025-07-08  67  int __init ovmf_log_probe(unsigned long ovmf_debug_log_table)
f393a761763c54 Gerd Hoffmann 2025-07-08  68  {
f393a761763c54 Gerd Hoffmann 2025-07-08  69  	int ret = -EINVAL;
f393a761763c54 Gerd Hoffmann 2025-07-08  70  	u64 size;
f393a761763c54 Gerd Hoffmann 2025-07-08  71  
f393a761763c54 Gerd Hoffmann 2025-07-08  72  	/* map + verify header */
f393a761763c54 Gerd Hoffmann 2025-07-08  73  	hdr = memremap(ovmf_debug_log_table, sizeof(*hdr), MEMREMAP_WB);
f393a761763c54 Gerd Hoffmann 2025-07-08  74  	if (!hdr) {
f393a761763c54 Gerd Hoffmann 2025-07-08  75  		pr_err("OVMF debug log: header map failed\n");
f393a761763c54 Gerd Hoffmann 2025-07-08  76  		return -EINVAL;
f393a761763c54 Gerd Hoffmann 2025-07-08  77  	}
f393a761763c54 Gerd Hoffmann 2025-07-08  78  
f393a761763c54 Gerd Hoffmann 2025-07-08  79  	if (hdr->magic1 != OVMF_DEBUG_LOG_MAGIC1 ||
f393a761763c54 Gerd Hoffmann 2025-07-08  80  	    hdr->magic2 != OVMF_DEBUG_LOG_MAGIC2) {
f393a761763c54 Gerd Hoffmann 2025-07-08  81  		printk(KERN_ERR "OVMF debug log: magic mismatch\n");
f393a761763c54 Gerd Hoffmann 2025-07-08  82  		goto err_unmap;
f393a761763c54 Gerd Hoffmann 2025-07-08  83  	}
f393a761763c54 Gerd Hoffmann 2025-07-08  84  
f393a761763c54 Gerd Hoffmann 2025-07-08  85  	size = hdr->hdr_size + hdr->log_size;
f393a761763c54 Gerd Hoffmann 2025-07-08  86  	pr_info("OVMF debug log: firmware version: \"%s\"\n", hdr->fw_version);
f393a761763c54 Gerd Hoffmann 2025-07-08  87  	pr_info("OVMF debug log: buffer size: %lluk\n", size / 1024);
f393a761763c54 Gerd Hoffmann 2025-07-08  88  
f393a761763c54 Gerd Hoffmann 2025-07-08  89  	/* map complete log buffer */
f393a761763c54 Gerd Hoffmann 2025-07-08  90  	memunmap(hdr);
f393a761763c54 Gerd Hoffmann 2025-07-08  91  	hdr = memremap(ovmf_debug_log_table, size, MEMREMAP_WB);
f393a761763c54 Gerd Hoffmann 2025-07-08  92  	if (!hdr) {
f393a761763c54 Gerd Hoffmann 2025-07-08  93  		pr_err("OVMF debug log: buffer map failed\n");
f393a761763c54 Gerd Hoffmann 2025-07-08 @94  		return -EINVAL;

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

             reply	other threads:[~2025-08-13  6:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  6:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-16 11:15 drivers/firmware/efi/ovmf-debug-log.c:94 ovmf_log_probe() warn: missing unwind goto? kernel test robot

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=202508131440.KXL63uuM-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.