* [chrome-os:chromeos-5.4 23/41] drivers/media/pci/intel/ipu6/../ipu-mmu.c:357:9: warning: variable 'unmapped' set but not used
@ 2024-03-30 6:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-30 6:21 UTC (permalink / raw)
To: cros-kernel-buildreports, Guenter Roeck; +Cc: oe-kbuild-all
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 1f54ce33a0c956409b727d5a4450e3dd2c206438
commit: fbf76a456b55f8c41bdf340bde2bc51a001f60ce [23/41] CHROMIUM: media/ipu6: Optimize the IPU MMU mapping and unmapping flow
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240330/202403301404.ToNsHibb-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240330/202403301404.ToNsHibb-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/202403301404.ToNsHibb-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/media/pci/intel/ipu6/../ipu-mmu.c:357:9: warning: variable 'unmapped' set but not used [-Wunused-but-set-variable]
357 | size_t unmapped = 0;
| ^
1 warning generated.
vim +/unmapped +357 drivers/media/pci/intel/ipu6/../ipu-mmu.c
83d148360cd5f0 Tianshu Qiu 2020-04-15 349
fbf76a456b55f8 Jianhui Dai 2024-01-02 350 static void l2_unmap(struct ipu_mmu_info *mmu_info, unsigned long iova,
83d148360cd5f0 Tianshu Qiu 2020-04-15 351 phys_addr_t dummy, size_t size)
83d148360cd5f0 Tianshu Qiu 2020-04-15 352 {
fbf76a456b55f8 Jianhui Dai 2024-01-02 353 u32 l1_idx;
63f5dd5d46796e Tianshu Qiu 2021-07-16 354 u32 *l2_pt;
83d148360cd5f0 Tianshu Qiu 2020-04-15 355 unsigned int l2_idx;
fbf76a456b55f8 Jianhui Dai 2024-01-02 356 unsigned int l2_entries;
83d148360cd5f0 Tianshu Qiu 2020-04-15 @357 size_t unmapped = 0;
63f5dd5d46796e Tianshu Qiu 2021-07-16 358 unsigned long flags;
83d148360cd5f0 Tianshu Qiu 2020-04-15 359
fbf76a456b55f8 Jianhui Dai 2024-01-02 360 spin_lock_irqsave(&mmu_info->lock, flags);
fbf76a456b55f8 Jianhui Dai 2024-01-02 361 for (l1_idx = iova >> ISP_L1PT_SHIFT;
fbf76a456b55f8 Jianhui Dai 2024-01-02 362 size > 0 && l1_idx < ISP_L1PT_PTES; l1_idx++) {
fbf76a456b55f8 Jianhui Dai 2024-01-02 363 dev_dbg(mmu_info->dev,
fbf76a456b55f8 Jianhui Dai 2024-01-02 364 "unmapping l2 page table for l1 index %u (iova 0x%8.8lx)\n",
83d148360cd5f0 Tianshu Qiu 2020-04-15 365 l1_idx, iova);
83d148360cd5f0 Tianshu Qiu 2020-04-15 366
63f5dd5d46796e Tianshu Qiu 2021-07-16 367 if (mmu_info->l1_pt[l1_idx] == mmu_info->dummy_l2_pteval) {
63f5dd5d46796e Tianshu Qiu 2021-07-16 368 dev_err(mmu_info->dev,
63f5dd5d46796e Tianshu Qiu 2021-07-16 369 "unmap iova 0x%8.8lx l1 idx %u which was not mapped\n",
63f5dd5d46796e Tianshu Qiu 2021-07-16 370 iova, l1_idx);
fbf76a456b55f8 Jianhui Dai 2024-01-02 371 continue;
63f5dd5d46796e Tianshu Qiu 2021-07-16 372 }
63f5dd5d46796e Tianshu Qiu 2021-07-16 373 l2_pt = mmu_info->l2_pts[l1_idx];
fbf76a456b55f8 Jianhui Dai 2024-01-02 374
fbf76a456b55f8 Jianhui Dai 2024-01-02 375 l2_entries = 0;
fbf76a456b55f8 Jianhui Dai 2024-01-02 376 for (l2_idx = (iova & ISP_L2PT_MASK) >> ISP_L2PT_SHIFT;
fbf76a456b55f8 Jianhui Dai 2024-01-02 377 size > 0 && l2_idx < ISP_L2PT_PTES; l2_idx++) {
63f5dd5d46796e Tianshu Qiu 2021-07-16 378 dev_dbg(mmu_info->dev,
63f5dd5d46796e Tianshu Qiu 2021-07-16 379 "unmap l2 index %u with pteval 0x%10.10llx\n",
83d148360cd5f0 Tianshu Qiu 2020-04-15 380 l2_idx, TBL_PHYS_ADDR(l2_pt[l2_idx]));
63f5dd5d46796e Tianshu Qiu 2021-07-16 381 l2_pt[l2_idx] = mmu_info->dummy_page_pteval;
63f5dd5d46796e Tianshu Qiu 2021-07-16 382
fbf76a456b55f8 Jianhui Dai 2024-01-02 383 iova += ISP_PAGE_SIZE;
fbf76a456b55f8 Jianhui Dai 2024-01-02 384 unmapped += ISP_PAGE_SIZE;
fbf76a456b55f8 Jianhui Dai 2024-01-02 385 size -= ISP_PAGE_SIZE;
fbf76a456b55f8 Jianhui Dai 2024-01-02 386
fbf76a456b55f8 Jianhui Dai 2024-01-02 387 l2_entries++;
83d148360cd5f0 Tianshu Qiu 2020-04-15 388 }
83d148360cd5f0 Tianshu Qiu 2020-04-15 389
fbf76a456b55f8 Jianhui Dai 2024-01-02 390 WARN_ON_ONCE(!l2_entries);
fbf76a456b55f8 Jianhui Dai 2024-01-02 391 clflush_cache_range(&l2_pt[l2_idx - l2_entries],
fbf76a456b55f8 Jianhui Dai 2024-01-02 392 sizeof(l2_pt[0]) * l2_entries);
83d148360cd5f0 Tianshu Qiu 2020-04-15 393 }
83d148360cd5f0 Tianshu Qiu 2020-04-15 394
fbf76a456b55f8 Jianhui Dai 2024-01-02 395 WARN_ON_ONCE(size);
fbf76a456b55f8 Jianhui Dai 2024-01-02 396 spin_unlock_irqrestore(&mmu_info->lock, flags);
fbf76a456b55f8 Jianhui Dai 2024-01-02 397 }
fbf76a456b55f8 Jianhui Dai 2024-01-02 398
:::::: The code at line 357 was first introduced by commit
:::::: 83d148360cd5f0b1f82fcf95471ac063acd06fcb CHROMIUM: media: intel-ipu6: Add IPU6 and IPU6SE drivers
:::::: TO: Tianshu Qiu <tian.shu.qiu@intel.com>
:::::: CC: Commit Bot <commit-bot@chromium.org>
--
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-03-30 6:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-30 6:21 [chrome-os:chromeos-5.4 23/41] drivers/media/pci/intel/ipu6/../ipu-mmu.c:357:9: warning: variable 'unmapped' 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.