[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202504012234.xnBwaq8x-lkp@intel.com>
Date: Wed, 2 Apr 2025 00:32:56 +0800
From: kernel test robot <lkp@...el.com>
To: John Ousterhout <ouster@...stanford.edu>, netdev@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, pabeni@...hat.com,
edumazet@...gle.com, horms@...nel.org, kuba@...nel.org,
John Ousterhout <ouster@...stanford.edu>
Subject: Re: [PATCH net-next v7 14/14] net: homa: create Makefile and Kconfig
Hi John,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/John-Ousterhout/net-homa-define-user-visible-API-for-Homa/20250401-080339
base: net-next/main
patch link: https://lore.kernel.org/r/20250331234548.62070-15-ouster%40cs.stanford.edu
patch subject: [PATCH net-next v7 14/14] net: homa: create Makefile and Kconfig
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250401/202504012234.xnBwaq8x-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250401/202504012234.xnBwaq8x-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504012234.xnBwaq8x-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/homa/homa_incoming.c:742:6: warning: variable 'iteration' set but not used [-Wunused-but-set-variable]
742 | int iteration;
| ^
net/homa/homa_incoming.c:803:6: warning: variable 'iteration' set but not used [-Wunused-but-set-variable]
803 | int iteration;
| ^
2 warnings generated.
vim +/iteration +742 net/homa/homa_incoming.c
2040cdd15cc153 John Ousterhout 2025-03-31 727
2040cdd15cc153 John Ousterhout 2025-03-31 728 /**
2040cdd15cc153 John Ousterhout 2025-03-31 729 * homa_wait_private() - Waits until the response has been received for
2040cdd15cc153 John Ousterhout 2025-03-31 730 * a specific RPC or the RPC has failed with an error.
2040cdd15cc153 John Ousterhout 2025-03-31 731 * @rpc: RPC to wait for; an error will be returned if the RPC is
2040cdd15cc153 John Ousterhout 2025-03-31 732 * not a client RPC or not private. Must be locked by caller.
2040cdd15cc153 John Ousterhout 2025-03-31 733 * @nonblocking: Nonzero means return immediately if @rpc not ready.
2040cdd15cc153 John Ousterhout 2025-03-31 734 * Return: 0 if the response has been successfully received, otherwise
2040cdd15cc153 John Ousterhout 2025-03-31 735 * a negative errno.
2040cdd15cc153 John Ousterhout 2025-03-31 736 */
2040cdd15cc153 John Ousterhout 2025-03-31 737 int homa_wait_private(struct homa_rpc *rpc, int nonblocking)
2040cdd15cc153 John Ousterhout 2025-03-31 738 __must_hold(&rpc->bucket->lock)
2040cdd15cc153 John Ousterhout 2025-03-31 739 {
2040cdd15cc153 John Ousterhout 2025-03-31 740 struct homa_interest interest;
2040cdd15cc153 John Ousterhout 2025-03-31 741 int result = 0;
2040cdd15cc153 John Ousterhout 2025-03-31 @742 int iteration;
2040cdd15cc153 John Ousterhout 2025-03-31 743
2040cdd15cc153 John Ousterhout 2025-03-31 744 if (!(atomic_read(&rpc->flags) & RPC_PRIVATE))
2040cdd15cc153 John Ousterhout 2025-03-31 745 return -EINVAL;
2040cdd15cc153 John Ousterhout 2025-03-31 746
2040cdd15cc153 John Ousterhout 2025-03-31 747 homa_rpc_hold(rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 748
2040cdd15cc153 John Ousterhout 2025-03-31 749 /* Each iteration through this loop waits until rpc needs attention
2040cdd15cc153 John Ousterhout 2025-03-31 750 * in some way (e.g. packets have arrived), then deals with that need
2040cdd15cc153 John Ousterhout 2025-03-31 751 * (e.g. copy to user space). It may take many iterations until the
2040cdd15cc153 John Ousterhout 2025-03-31 752 * RPC is ready for the application.
2040cdd15cc153 John Ousterhout 2025-03-31 753 */
2040cdd15cc153 John Ousterhout 2025-03-31 754 for (iteration = 0; ; iteration++) {
2040cdd15cc153 John Ousterhout 2025-03-31 755 if (!rpc->error)
2040cdd15cc153 John Ousterhout 2025-03-31 756 rpc->error = homa_copy_to_user(rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 757 if (rpc->error) {
2040cdd15cc153 John Ousterhout 2025-03-31 758 result = rpc->error;
2040cdd15cc153 John Ousterhout 2025-03-31 759 break;
2040cdd15cc153 John Ousterhout 2025-03-31 760 }
2040cdd15cc153 John Ousterhout 2025-03-31 761 if (rpc->msgin.length >= 0 &&
2040cdd15cc153 John Ousterhout 2025-03-31 762 rpc->msgin.bytes_remaining == 0 &&
2040cdd15cc153 John Ousterhout 2025-03-31 763 skb_queue_len(&rpc->msgin.packets) == 0)
2040cdd15cc153 John Ousterhout 2025-03-31 764 break;
2040cdd15cc153 John Ousterhout 2025-03-31 765
2040cdd15cc153 John Ousterhout 2025-03-31 766 result = homa_interest_init_private(&interest, rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 767 if (result != 0)
2040cdd15cc153 John Ousterhout 2025-03-31 768 break;
2040cdd15cc153 John Ousterhout 2025-03-31 769
2040cdd15cc153 John Ousterhout 2025-03-31 770 homa_rpc_unlock(rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 771 result = homa_interest_wait(&interest, nonblocking);
2040cdd15cc153 John Ousterhout 2025-03-31 772
2040cdd15cc153 John Ousterhout 2025-03-31 773 atomic_or(APP_NEEDS_LOCK, &rpc->flags);
2040cdd15cc153 John Ousterhout 2025-03-31 774 homa_rpc_lock(rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 775 atomic_andnot(APP_NEEDS_LOCK, &rpc->flags);
2040cdd15cc153 John Ousterhout 2025-03-31 776 homa_interest_unlink_private(&interest);
2040cdd15cc153 John Ousterhout 2025-03-31 777
2040cdd15cc153 John Ousterhout 2025-03-31 778 /* If homa_interest_wait returned an error but the interest
2040cdd15cc153 John Ousterhout 2025-03-31 779 * actually got ready, then ignore the error.
2040cdd15cc153 John Ousterhout 2025-03-31 780 */
2040cdd15cc153 John Ousterhout 2025-03-31 781 if (result != 0 && atomic_read(&interest.ready) == 0)
2040cdd15cc153 John Ousterhout 2025-03-31 782 break;
2040cdd15cc153 John Ousterhout 2025-03-31 783 }
2040cdd15cc153 John Ousterhout 2025-03-31 784
2040cdd15cc153 John Ousterhout 2025-03-31 785 homa_rpc_put(rpc);
2040cdd15cc153 John Ousterhout 2025-03-31 786 return result;
2040cdd15cc153 John Ousterhout 2025-03-31 787 }
2040cdd15cc153 John Ousterhout 2025-03-31 788
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists