From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH V4 2/2] gpio: virtio: Add IRQ support
Date: Wed, 04 Aug 2021 14:29:15 +0800 [thread overview]
Message-ID: <202108041437.ITZSWk3x-lkp@intel.com> (raw)
In-Reply-To: <75c8e6e5e8dfa1889938f3a6b2d991763c7a3717.1627989586.git.viresh.kumar@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 5329 bytes --]
Hi Viresh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on soc/for-next]
[also build test WARNING on vhost/linux-next linus/master v5.14-rc4 next-20210803]
[cannot apply to gpio/for-next]
[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]
url: https://github.com/0day-ci/linux/commits/Viresh-Kumar/gpio-Add-virtio-based-driver/20210803-193849
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
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/0day-ci/linux/commit/8dd9cb7c610a2132488399e36ff7fe34115035ef
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Viresh-Kumar/gpio-Add-virtio-based-driver/20210803-193849
git checkout 8dd9cb7c610a2132488399e36ff7fe34115035ef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/gpio/driver.h:5,
from drivers/gpio/gpio-virtio.c:14:
drivers/gpio/gpio-virtio.c: In function 'vgpio_work_handler':
>> drivers/gpio/gpio-virtio.c:364:17: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
364 | dev_err(dev, "irq with incorrect length (%u : %lu)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/gpio/gpio-virtio.c:364:4: note: in expansion of macro 'dev_err'
364 | dev_err(dev, "irq with incorrect length (%u : %lu)\n",
| ^~~~~~~
drivers/gpio/gpio-virtio.c:364:52: note: format string is defined here
364 | dev_err(dev, "irq with incorrect length (%u : %lu)\n",
| ~~^
| |
| long unsigned int
| %u
drivers/gpio/gpio-virtio.c: At top level:
drivers/gpio/gpio-virtio.c:623:4: error: 'VIRTIO_ID_GPIO' undeclared here (not in a function); did you mean 'VIRTIO_ID_GPU'?
623 | { VIRTIO_ID_GPIO, VIRTIO_DEV_ANY_ID },
| ^~~~~~~~~~~~~~
| VIRTIO_ID_GPU
vim +364 drivers/gpio/gpio-virtio.c
346
347 static void vgpio_work_handler(struct work_struct *work)
348 {
349 struct virtio_gpio *vgpio = container_of(work, struct virtio_gpio,
350 work);
351 struct device *dev = &vgpio->vdev->dev;
352 struct vgpio_irq_line *irq_line;
353 int irq, gpio, ret;
354 unsigned int len;
355
356 mutex_lock(&vgpio->irq_lock);
357
358 while (true) {
359 irq_line = virtqueue_get_buf(vgpio->event_vq, &len);
360 if (!irq_line)
361 break;
362
363 if (len != sizeof(irq_line->ires)) {
> 364 dev_err(dev, "irq with incorrect length (%u : %lu)\n",
365 len, sizeof(irq_line->ires));
366 continue;
367 }
368
369 WARN_ON(!irq_line->queued);
370 irq_line->queued = false;
371
372 /* Buffer is returned after interrupt is masked */
373 if (irq_line->ires.status == VIRTIO_GPIO_IRQ_STATUS_INVALID)
374 continue;
375
376 if (WARN_ON(irq_line->ires.status != VIRTIO_GPIO_IRQ_STATUS_VALID))
377 continue;
378
379 /*
380 * Find GPIO line number from the offset of irq_line within the
381 * irq_lines block. We can also get GPIO number from
382 * irq-request, but better not rely on a value returned by
383 * remote.
384 */
385 gpio = irq_line - vgpio->irq_lines;
386 WARN_ON(gpio >= vgpio->config.ngpio);
387
388 irq = irq_find_mapping(vgpio->gc.irq.domain, gpio);
389 WARN_ON(!irq);
390
391 local_irq_disable();
392 ret = generic_handle_irq(irq);
393 local_irq_enable();
394
395 if (ret)
396 dev_err(dev, "failed to handle interrupt: %d\n", ret);
397
398 /* The interrupt may have been disabled by now */
399 if (irq_line->update_pending && irq_line->masked)
400 update_irq_type(vgpio, gpio, VIRTIO_GPIO_IRQ_TYPE_NONE);
401 else
402 virtio_gpio_irq_prepare(vgpio, gpio);
403
404 irq_line->update_pending = false;
405 };
406
407 mutex_unlock(&vgpio->irq_lock);
408 }
409
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60681 bytes --]
prev parent reply other threads:[~2021-08-04 6:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 11:36 [PATCH V4 0/2] gpio: Add virtio based driver Viresh Kumar
2021-08-03 11:36 ` Viresh Kumar
2021-08-03 11:36 ` [PATCH V4 1/2] gpio: Add virtio-gpio driver Viresh Kumar
2021-08-03 11:36 ` Viresh Kumar
2021-08-04 0:14 ` kernel test robot
2021-08-04 4:07 ` Viresh Kumar
2021-08-03 11:36 ` [PATCH V4 2/2] gpio: virtio: Add IRQ support Viresh Kumar
2021-08-03 11:36 ` Viresh Kumar
2021-08-03 15:01 ` Arnd Bergmann
2021-08-04 7:05 ` Viresh Kumar
2021-08-04 7:05 ` Viresh Kumar
2021-08-04 8:27 ` Arnd Bergmann
2021-08-05 7:05 ` Viresh Kumar
2021-08-05 7:05 ` Viresh Kumar
2021-08-05 11:26 ` Viresh Kumar
2021-08-05 11:26 ` Viresh Kumar
[not found] ` <0100017b1610f711-c53c79f2-9e28-4c45-bb42-8db09688b18e-000000@email.amazonses.com>
2021-08-05 12:03 ` [Stratos-dev] " Arnd Bergmann
2021-08-05 12:49 ` Viresh Kumar
2021-08-05 12:49 ` Viresh Kumar
2021-08-05 13:10 ` Arnd Bergmann
2021-08-06 7:44 ` Viresh Kumar
2021-08-06 7:44 ` Viresh Kumar
[not found] ` <0100017b1a6c0a05-e41dc16c-b326-4017-a63d-a24a6c1fde70-000000@email.amazonses.com>
2021-08-06 8:00 ` Arnd Bergmann
2021-08-09 7:30 ` Viresh Kumar
2021-08-09 7:30 ` Viresh Kumar
2021-08-09 7:55 ` Arnd Bergmann
2021-08-09 10:46 ` Viresh Kumar
2021-08-09 10:46 ` Viresh Kumar
[not found] ` <0100017b2a85eaf8-08b905fc-89f7-43a4-857e-070ca9691ce1-000000@email.amazonses.com>
2021-08-09 11:19 ` Arnd Bergmann
2021-08-10 7:35 ` Viresh Kumar
2021-08-10 7:35 ` Viresh Kumar
2021-08-04 6:29 ` kernel test robot [this message]
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=202108041437.ITZSWk3x-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.