From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Li Ruilin <liruilin4@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 3547/3547] drivers/ub/obmm/obmm_addr_check.c:53:14: warning: variable 'user' set but not used
Date: Sat, 20 Dec 2025 21:46:44 +0800 [thread overview]
Message-ID: <202512202127.FExeoFRI-lkp@intel.com> (raw)
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 04473ee9ed912a16fff0d8846ad565bbf3d63c77
commit: e777551b49fb8d8dbad14dd3a44c2f9b5c8fa6d4 [3547/3547] obmm: Remove log pringts of physical address and kernelspace virtual address
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251220/202512202127.FExeoFRI-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251220/202512202127.FExeoFRI-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/202512202127.FExeoFRI-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/ub/obmm/obmm_addr_check.c:53:14: warning: variable 'user' set but not used [-Wunused-but-set-variable]
53 | const char *user;
| ^
1 warning generated.
vim +/user +53 drivers/ub/obmm/obmm_addr_check.c
67ffb2edb43cde9 Li Ruilin 2025-11-07 49
67ffb2edb43cde9 Li Ruilin 2025-11-07 50 int free_pa_range(const struct obmm_pa_range *pa_range)
67ffb2edb43cde9 Li Ruilin 2025-11-07 51 {
67ffb2edb43cde9 Li Ruilin 2025-11-07 52 int ret;
67ffb2edb43cde9 Li Ruilin 2025-11-07 @53 const char *user;
67ffb2edb43cde9 Li Ruilin 2025-11-07 54 void *entry;
67ffb2edb43cde9 Li Ruilin 2025-11-07 55 unsigned long flags;
67ffb2edb43cde9 Li Ruilin 2025-11-07 56
67ffb2edb43cde9 Li Ruilin 2025-11-07 57 spin_lock_irqsave(&g_pa_checker.lock, flags);
67ffb2edb43cde9 Li Ruilin 2025-11-07 58 entry = mtree_erase(&g_pa_checker.pa_ranges, (unsigned long)pa_range->start);
67ffb2edb43cde9 Li Ruilin 2025-11-07 59 spin_unlock_irqrestore(&g_pa_checker.lock, flags);
67ffb2edb43cde9 Li Ruilin 2025-11-07 60 if (!entry) {
e777551b49fb8d8 Li Ruilin 2025-12-15 61 pr_err("PA range to be freed not found.\n");
67ffb2edb43cde9 Li Ruilin 2025-11-07 62 return -EFAULT;
67ffb2edb43cde9 Li Ruilin 2025-11-07 63 }
67ffb2edb43cde9 Li Ruilin 2025-11-07 64 ret = 0;
67ffb2edb43cde9 Li Ruilin 2025-11-07 65 if (!is_same_pa_range((const struct obmm_pa_range *)entry, pa_range)) {
67ffb2edb43cde9 Li Ruilin 2025-11-07 66 /* expected to be UNREACHABLE */
e777551b49fb8d8 Li Ruilin 2025-12-15 67 pr_err("BUG: PA range to be freed does not fully match.\n");
67ffb2edb43cde9 Li Ruilin 2025-11-07 68 ret = -ENOTRECOVERABLE;
67ffb2edb43cde9 Li Ruilin 2025-11-07 69 }
0f73521b11e7af9 Li Ruilin 2025-11-07 70 user = ((struct obmm_pa_range *)entry)->info.user == OBMM_ADDR_USER_DIRECT_IMPORT ?
0f73521b11e7af9 Li Ruilin 2025-11-07 71 "import" : "preimport";
67ffb2edb43cde9 Li Ruilin 2025-11-07 72 kfree(entry);
67ffb2edb43cde9 Li Ruilin 2025-11-07 73 return ret;
67ffb2edb43cde9 Li Ruilin 2025-11-07 74 }
67ffb2edb43cde9 Li Ruilin 2025-11-07 75
:::::: The code at line 53 was first introduced by commit
:::::: 67ffb2edb43cde96368000620a63d0f6be11820f obmm: Add address validation and checking
:::::: TO: Li Ruilin <liruilin4@huawei.com>
:::::: CC: Li Ruilin <liruilin4@huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-20 13:46 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=202512202127.FExeoFRI-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=liruilin4@huawei.com \
--cc=oe-kbuild-all@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.