From: kernel test robot <lkp@intel.com>
To: Kairui Song <kasong@tencent.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
0day robot <lkp@intel.com>, Youngjun Park <youngjun.park@lge.com>
Subject: mm/swapfile.c:453:6: warning: unused variable 'ret'
Date: Sat, 16 May 2026 00:22:23 +0200 [thread overview]
Message-ID: <202605160059.RigLlGEw-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song-via-B4-Relay/mm-swap-simplify-swap-cache-allocation-helper/20260515-182232
head: 0c9b851d54d8858aefdd082f59e488eeaa4c6f6f
commit: 0c9b851d54d8858aefdd082f59e488eeaa4c6f6f mm, swap: merge zeromap into swap table
date: 12 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260516/202605160059.RigLlGEw-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260516/202605160059.RigLlGEw-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/202605160059.RigLlGEw-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/swapfile.c:453:6: warning: unused variable 'ret' [-Wunused-variable]
453 | int ret = 0;
| ^~~
1 warning generated.
vim +/ret +453 mm/swapfile.c
16dc0672038592 Kairui Song 2026-05-15 448
16dc0672038592 Kairui Song 2026-05-15 449 static int swap_cluster_alloc_table(struct swap_cluster_info *ci, gfp_t gfp)
16dc0672038592 Kairui Song 2026-05-15 450 {
16dc0672038592 Kairui Song 2026-05-15 451 struct swap_table *table = NULL;
16dc0672038592 Kairui Song 2026-05-15 452 struct folio *folio;
d029b4aa29fcfc Kairui Song 2026-05-15 @453 int ret = 0;
16dc0672038592 Kairui Song 2026-05-15 454
16dc0672038592 Kairui Song 2026-05-15 455 /* The cluster must be empty and not on any list during allocation. */
16dc0672038592 Kairui Song 2026-05-15 456 VM_WARN_ON_ONCE(ci->flags || !cluster_is_empty(ci));
16dc0672038592 Kairui Song 2026-05-15 457 if (rcu_access_pointer(ci->table))
16dc0672038592 Kairui Song 2026-05-15 458 return 0;
16dc0672038592 Kairui Song 2026-05-15 459
16dc0672038592 Kairui Song 2026-05-15 460 if (SWP_TABLE_USE_PAGE) {
16dc0672038592 Kairui Song 2026-05-15 461 folio = folio_alloc(gfp | __GFP_ZERO, 0);
16dc0672038592 Kairui Song 2026-05-15 462 if (folio)
16dc0672038592 Kairui Song 2026-05-15 463 table = folio_address(folio);
16dc0672038592 Kairui Song 2026-05-15 464 } else {
16dc0672038592 Kairui Song 2026-05-15 465 table = kmem_cache_zalloc(swap_table_cachep, gfp);
16dc0672038592 Kairui Song 2026-05-15 466 }
16dc0672038592 Kairui Song 2026-05-15 467 if (!table)
16dc0672038592 Kairui Song 2026-05-15 468 return -ENOMEM;
16dc0672038592 Kairui Song 2026-05-15 469
16dc0672038592 Kairui Song 2026-05-15 470 rcu_assign_pointer(ci->table, table);
d029b4aa29fcfc Kairui Song 2026-05-15 471
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-15 22:23 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=202605160059.RigLlGEw-lkp@intel.com \
--to=lkp@intel.com \
--cc=kasong@tencent.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=youngjun.park@lge.com \
/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.