All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 3547/3547] drivers/ub/obmm/obmm_addr_check.c:53:14: warning: variable 'user' set but not used
@ 2025-12-20 13:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-12-20 13:46 UTC (permalink / raw)
  To: kernel, Li Ruilin; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-20 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-20 13:46 [openeuler:OLK-6.6 3547/3547] drivers/ub/obmm/obmm_addr_check.c:53:14: warning: variable 'user' set but not used 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.