* Re: [PATCH net-next v3 14/18] sfc: Remove usage of list iterator for list_add() after the loop body
[not found] <20220412121557.3553555-15-jakobkoschel@gmail.com>
@ 2022-04-13 12:41 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-13 12:41 UTC (permalink / raw)
To: Jakob Koschel; +Cc: llvm, kbuild-all
Hi Jakob,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Jakob-Koschel/Remove-use-of-list-iterator-after-loop-body/20220412-203605
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b66bfc131c69bd9a5ed3ae90be4cf47ec46c1526
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220413/202204132006.lzf9FA9Y-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project fe2478d44e4f7f191c43fef629ac7a23d0251e72)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/37e6782c31906d38fba33faf3b6d7af0c463598e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jakob-Koschel/Remove-use-of-list-iterator-after-loop-body/20220412-203605
git checkout 37e6782c31906d38fba33faf3b6d7af0c463598e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/sfc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/sfc/rx_common.c:561:28: error: use of undeclared identifier 'pos'
struct list_head *head = *pos = &efx->rss_context.list;
^
drivers/net/ethernet/sfc/rx_common.c:570:4: error: use of undeclared identifier 'pos'
pos = &ctx->list;
^
drivers/net/ethernet/sfc/rx_common.c:590:28: error: use of undeclared identifier 'pos'
list_add_tail(&new->list, pos);
^
3 errors generated.
vim +/pos +561 drivers/net/ethernet/sfc/rx_common.c
555
556 /* RSS contexts. We're using linked lists and crappy O(n) algorithms, because
557 * (a) this is an infrequent control-plane operation and (b) n is small (max 64)
558 */
559 struct efx_rss_context *efx_alloc_rss_context_entry(struct efx_nic *efx)
560 {
> 561 struct list_head *head = *pos = &efx->rss_context.list;
562 struct efx_rss_context *ctx, *new;
563 u32 id = 1; /* Don't use zero, that refers to the master RSS context */
564
565 WARN_ON(!mutex_is_locked(&efx->rss_lock));
566
567 /* Search for first gap in the numbering */
568 list_for_each_entry(ctx, head, list) {
569 if (ctx->user_id != id) {
570 pos = &ctx->list;
571 break;
572 }
573 id++;
574 /* Check for wrap. If this happens, we have nearly 2^32
575 * allocated RSS contexts, which seems unlikely.
576 */
577 if (WARN_ON_ONCE(!id))
578 return NULL;
579 }
580
581 /* Create the new entry */
582 new = kmalloc(sizeof(*new), GFP_KERNEL);
583 if (!new)
584 return NULL;
585 new->context_id = EFX_MCDI_RSS_CONTEXT_INVALID;
586 new->rx_hash_udp_4tuple = false;
587
588 /* Insert the new entry into the gap */
589 new->user_id = id;
590 list_add_tail(&new->list, pos);
591 return new;
592 }
593
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-13 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220412121557.3553555-15-jakobkoschel@gmail.com>
2022-04-13 12:41 ` [PATCH net-next v3 14/18] sfc: Remove usage of list iterator for list_add() after the loop body kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).