From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com,
Guenter Roeck <groeck@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [chrome-os:chromeos-5.4 23/41] drivers/media/pci/intel/ipu6/../ipu-mmu.c:357:9: warning: variable 'unmapped' set but not used
Date: Sat, 30 Mar 2024 14:21:09 +0800 [thread overview]
Message-ID: <202403301404.ToNsHibb-lkp@intel.com> (raw)
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
reply other threads:[~2024-03-30 6:21 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=202403301404.ToNsHibb-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=groeck@google.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.