linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joe Damato <jdamato@fastly.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, chuck.lever@oracle.com,
	jlayton@kernel.org, linux-api@vger.kernel.org,
	brauner@kernel.org, edumazet@google.com, davem@davemloft.net,
	alexander.duyck@gmail.com, sridhar.samudrala@intel.com,
	kuba@kernel.org, weiwan@google.com,
	Joe Damato <jdamato@fastly.com>
Subject: Re: [net-next v2 3/4] eventpoll: Add epoll ioctl for epoll_params
Date: Thu, 25 Jan 2024 21:12:35 +0800	[thread overview]
Message-ID: <202401252141.eUlgsF08-lkp@intel.com> (raw)
In-Reply-To: <20240125003014.43103-4-jdamato@fastly.com>

Hi Joe,

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/Joe-Damato/eventpoll-support-busy-poll-per-epoll-instance/20240125-083418
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240125003014.43103-4-jdamato%40fastly.com
patch subject: [net-next v2 3/4] eventpoll: Add epoll ioctl for epoll_params
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20240125/202401252141.eUlgsF08-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240125/202401252141.eUlgsF08-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/202401252141.eUlgsF08-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/eventpoll.c: In function 'ep_eventpoll_ioctl':
>> fs/eventpoll.c:879:22: warning: unused variable 'uarg' [-Wunused-variable]
     879 |         void __user *uarg = (void __user *) arg;
         |                      ^~~~
>> fs/eventpoll.c:878:29: warning: unused variable 'epoll_params' [-Wunused-variable]
     878 |         struct epoll_params epoll_params;
         |                             ^~~~~~~~~~~~
   fs/eventpoll.c:877:27: warning: variable 'ep' set but not used [-Wunused-but-set-variable]
     877 |         struct eventpoll *ep;
         |                           ^~


vim +/uarg +879 fs/eventpoll.c

   873	
   874	static long ep_eventpoll_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
   875	{
   876		int ret;
   877		struct eventpoll *ep;
 > 878		struct epoll_params epoll_params;
 > 879		void __user *uarg = (void __user *) arg;
   880	
   881		if (!is_file_epoll(file))
   882			return -EINVAL;
   883	
   884		ep = file->private_data;
   885	
   886		switch (cmd) {
   887	#ifdef CONFIG_NET_RX_BUSY_POLL
   888		case EPIOCSPARAMS:
   889			if (copy_from_user(&epoll_params, uarg, sizeof(epoll_params)))
   890				return -EFAULT;
   891	
   892			if (epoll_params.busy_poll_budget > NAPI_POLL_WEIGHT)
   893				pr_err("busy poll budget %u exceeds suggested maximum %u\n",
   894						epoll_params.busy_poll_budget, NAPI_POLL_WEIGHT);
   895	
   896			ep->busy_poll_usecs = epoll_params.busy_poll_usecs;
   897			ep->busy_poll_budget = epoll_params.busy_poll_budget;
   898			return 0;
   899	
   900		case EPIOCGPARAMS:
   901			memset(&epoll_params, 0, sizeof(epoll_params));
   902			epoll_params.busy_poll_usecs = ep->busy_poll_usecs;
   903			epoll_params.busy_poll_budget = ep->busy_poll_budget;
   904			if (copy_to_user(uarg, &epoll_params, sizeof(epoll_params)))
   905				return -EFAULT;
   906	
   907			return 0;
   908	#endif
   909		default:
   910			ret = -EINVAL;
   911			break;
   912		}
   913	
   914		return ret;
   915	}
   916	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-01-25 13:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  0:30 [net-next v2 0/4] Per epoll context busy poll support Joe Damato
2024-01-25  0:30 ` [net-next v2 1/4] eventpoll: support busy poll per epoll instance Joe Damato
2024-01-25  0:30 ` [net-next v2 2/4] eventpoll: Add per-epoll busy poll packet budget Joe Damato
2024-01-25  0:30 ` [net-next v2 3/4] eventpoll: Add epoll ioctl for epoll_params Joe Damato
2024-01-25  2:46   ` Willem de Bruijn
2024-01-25  4:27     ` Joe Damato
2024-01-25 14:11       ` Willem de Bruijn
2024-01-25 13:12   ` kernel test robot [this message]
2024-01-25  0:30 ` [net-next v2 4/4] net: print error if SO_BUSY_POLL_BUDGET is large Joe Damato

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=202401252141.eUlgsF08-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jdamato@fastly.com \
    --cc=jlayton@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sridhar.samudrala@intel.com \
    --cc=weiwan@google.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 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).