oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	stratos-dev@op-lists.linaro.org,
	"Erik Schilling" <erik.schilling@linaro.org>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Mathieu Poirier" <mathieu.poirier@linaro.org>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 2/2] xen: privcmd: Add support for irqfd
Date: Fri, 21 Jul 2023 08:38:40 +0800	[thread overview]
Message-ID: <202307210852.ukq5f98v-lkp@intel.com> (raw)
In-Reply-To: <a25d5f01fe9b4624aa12cab77abd001044ea02d5.1689845210.git.viresh.kumar@linaro.org>

Hi Viresh,

kernel test robot noticed the following build errors:

[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on linus/master v6.5-rc2 next-20230720]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Viresh-Kumar/xen-privcmd-Add-support-for-irqfd/20230720-173905
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
patch link:    https://lore.kernel.org/r/a25d5f01fe9b4624aa12cab77abd001044ea02d5.1689845210.git.viresh.kumar%40linaro.org
patch subject: [PATCH V2 2/2] xen: privcmd: Add support for irqfd
config: arm64-randconfig-r026-20230720 (https://download.01.org/0day-ci/archive/20230721/202307210852.ukq5f98v-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210852.ukq5f98v-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/202307210852.ukq5f98v-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/xen/privcmd.c:961:12: error: call to undeclared function 'eventfd_ctx_fileget'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     961 |         eventfd = eventfd_ctx_fileget(f.file);
         |                   ^
   drivers/xen/privcmd.c:961:12: note: did you mean 'eventfd_ctx_fdget'?
   include/linux/eventfd.h:56:35: note: 'eventfd_ctx_fdget' declared here
      56 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd)
         |                                   ^
>> drivers/xen/privcmd.c:961:10: error: incompatible integer to pointer conversion assigning to 'struct eventfd_ctx *' from 'int' [-Wint-conversion]
     961 |         eventfd = eventfd_ctx_fileget(f.file);
         |                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/eventfd_ctx_fileget +961 drivers/xen/privcmd.c

   936	
   937	static int privcmd_irqfd_assign(struct privcmd_irqfd *irqfd)
   938	{
   939		struct privcmd_kernel_irqfd *kirqfd, *tmp;
   940		struct eventfd_ctx *eventfd;
   941		__poll_t events;
   942		struct fd f;
   943		int ret;
   944	
   945		kirqfd = kzalloc(sizeof(*kirqfd), GFP_KERNEL);
   946		if (!kirqfd)
   947			return -ENOMEM;
   948	
   949		kirqfd->irq = irqfd->irq;
   950		kirqfd->dom = irqfd->dom;
   951		kirqfd->level = irqfd->level;
   952		INIT_LIST_HEAD(&kirqfd->list);
   953		INIT_WORK(&kirqfd->shutdown, irqfd_shutdown);
   954	
   955		f = fdget(irqfd->fd);
   956		if (!f.file) {
   957			ret = -EBADF;
   958			goto error_kfree;
   959		}
   960	
 > 961		eventfd = eventfd_ctx_fileget(f.file);
   962		if (IS_ERR(eventfd)) {
   963			ret = PTR_ERR(eventfd);
   964			goto error_fd_put;
   965		}
   966	
   967		kirqfd->eventfd = eventfd;
   968	
   969		/*
   970		 * Install our own custom wake-up handling so we are notified via a
   971		 * callback whenever someone signals the underlying eventfd.
   972		 */
   973		init_waitqueue_func_entry(&kirqfd->wait, irqfd_wakeup);
   974		init_poll_funcptr(&kirqfd->pt, irqfd_poll_func);
   975	
   976		mutex_lock(&irqfds_lock);
   977	
   978		list_for_each_entry(tmp, &irqfds_list, list) {
   979			if (kirqfd->eventfd == tmp->eventfd) {
   980				ret = -EBUSY;
   981				mutex_unlock(&irqfds_lock);
   982				goto error_eventfd;
   983			}
   984		}
   985	
   986		list_add_tail(&kirqfd->list, &irqfds_list);
   987		mutex_unlock(&irqfds_lock);
   988	
   989		/*
   990		 * Check if there was an event already pending on the eventfd before we
   991		 * registered, and trigger it as if we didn't miss it.
   992		 */
   993		events = vfs_poll(f.file, &kirqfd->pt);
   994		if (events & EPOLLIN)
   995			irqfd_inject(kirqfd);
   996	
   997		/*
   998		 * Do not drop the file until the kirqfd is fully initialized, otherwise
   999		 * we might race against the EPOLLHUP.
  1000		 */
  1001		fdput(f);
  1002		return 0;
  1003	
  1004	error_eventfd:
  1005		eventfd_ctx_put(eventfd);
  1006	
  1007	error_fd_put:
  1008		fdput(f);
  1009	
  1010	error_kfree:
  1011		kfree(kirqfd);
  1012		return ret;
  1013	}
  1014	

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

       reply	other threads:[~2023-07-21  0:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a25d5f01fe9b4624aa12cab77abd001044ea02d5.1689845210.git.viresh.kumar@linaro.org>
2023-07-21  0:38 ` kernel test robot [this message]
2023-07-21  6:45   ` [PATCH V2 2/2] xen: privcmd: Add support for irqfd Viresh Kumar
2023-07-23  4:49 ` kernel test robot

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=202307210852.ukq5f98v-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.bennee@linaro.org \
    --cc=erik.schilling@linaro.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=stratos-dev@op-lists.linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).