[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201905270430.RyzTPzov%lkp@intel.com>
Date: Mon, 27 May 2019 04:24:36 +0800
From: kbuild test robot <lkp@...el.com>
To: Renzo Davoli <renzo@...unibo.it>
Cc: kbuild-all@...org, Alexander Viro <viro@...iv.linux.org.uk>,
Davide Libenzi <davidel@...ilserver.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org
Subject: Re: [PATCH 1/1] eventfd new tag EFD_VPOLL: generate epoll events
Hi Renzo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.2-rc1 next-20190524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Renzo-Davoli/eventfd-new-tag-EFD_VPOLL-generate-epoll-events/20190527-023620
config: i386-randconfig-x011-201921 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
In file included from fs/eventfd.c:23:0:
fs/eventfd.c: In function 'eventfd_vpoll_write':
>> include/linux/eventfd.h:31:34: warning: left shift count >= width of type [-Wshift-count-overflow]
#define EFD_VPOLL_ADDEVENTS (1UL << 32)
^
>> fs/eventfd.c:360:7: note: in expansion of macro 'EFD_VPOLL_ADDEVENTS'
case EFD_VPOLL_ADDEVENTS:
^~~~~~~~~~~~~~~~~~~
include/linux/eventfd.h:32:34: warning: left shift count >= width of type [-Wshift-count-overflow]
#define EFD_VPOLL_DELEVENTS (2UL << 32)
^
>> fs/eventfd.c:363:7: note: in expansion of macro 'EFD_VPOLL_DELEVENTS'
case EFD_VPOLL_DELEVENTS:
^~~~~~~~~~~~~~~~~~~
>> fs/eventfd.c:363:2: error: duplicate case value
case EFD_VPOLL_DELEVENTS:
^~~~
fs/eventfd.c:360:2: note: previously used here
case EFD_VPOLL_ADDEVENTS:
^~~~
In file included from fs/eventfd.c:23:0:
include/linux/eventfd.h:33:34: warning: left shift count >= width of type [-Wshift-count-overflow]
#define EFD_VPOLL_MODEVENTS (3UL << 32)
^
>> fs/eventfd.c:366:7: note: in expansion of macro 'EFD_VPOLL_MODEVENTS'
case EFD_VPOLL_MODEVENTS:
^~~~~~~~~~~~~~~~~~~
fs/eventfd.c:366:2: error: duplicate case value
case EFD_VPOLL_MODEVENTS:
^~~~
fs/eventfd.c:360:2: note: previously used here
case EFD_VPOLL_ADDEVENTS:
^~~~
vim +363 fs/eventfd.c
342
343 static ssize_t eventfd_vpoll_write(struct file *file, const char __user *buf,
344 size_t count, loff_t *ppos)
345 {
346 struct eventfd_ctx *ctx = file->private_data;
347 ssize_t res;
348 __u64 ucnt;
349 __u32 events;
350
351 if (count < sizeof(ucnt))
352 return -EINVAL;
353 if (copy_from_user(&ucnt, buf, sizeof(ucnt)))
354 return -EFAULT;
355 spin_lock_irq(&ctx->wqh.lock);
356
357 events = ucnt & EPOLLALLMASK;
358 res = sizeof(ucnt);
359 switch (ucnt & ~((__u64)EPOLLALLMASK)) {
> 360 case EFD_VPOLL_ADDEVENTS:
361 ctx->count |= events;
362 break;
> 363 case EFD_VPOLL_DELEVENTS:
364 ctx->count &= ~(events);
365 break;
> 366 case EFD_VPOLL_MODEVENTS:
367 ctx->count = (ctx->count & ~EPOLLALLMASK) | events;
368 break;
369 default:
370 res = -EINVAL;
371 }
372
373 /* wake up waiting threads */
374 if (res >= 0 && waitqueue_active(&ctx->wqh))
375 wake_up_locked_poll(&ctx->wqh, res);
376
377 spin_unlock_irq(&ctx->wqh.lock);
378
379 return res;
380
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (36461 bytes)
Powered by blists - more mailing lists