From: kbuild test robot <lkp@intel.com>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: kbuild-all@01.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>, Felipe Balbi <balbi@kernel.org>,
davem@davemloft.net,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Ruslan Bilovol <ruslan.bilovol@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: Re: [PATCH v2 1/3] usb: gadget: ccid: add support for USB CCID Gadget Device
Date: Tue, 29 May 2018 09:15:37 +0800 [thread overview]
Message-ID: <201805290510.1VIvGilo%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180526211940.25474-1-marcus.folkesson@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 9645 bytes --]
Hi Marcus,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on balbi-usb/next]
[also build test WARNING on v4.17-rc7]
[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/Marcus-Folkesson/usb-gadget-ccid-add-support-for-USB-CCID-Gadget-Device/20180529-014427
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: s390-allyesconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:332:0,
from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/cdev.h:5,
from drivers/usb/gadget/function/f_ccid.c:8:
drivers/usb/gadget/function/f_ccid.c: In function 'ccidg_bulk_read':
>> drivers/usb/gadget/function/f_ccid.c:612:5: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
"ccid: too small buffer size. %i provided, need at least %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
>> drivers/usb/gadget/function/f_ccid.c:611:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
>> drivers/usb/gadget/function/f_ccid.c:612:5: warning: format '%i' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
"ccid: too small buffer size. %i provided, need at least %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
>> drivers/usb/gadget/function/f_ccid.c:611:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
drivers/usb/gadget/function/f_ccid.c: In function 'ccidg_bulk_write':
drivers/usb/gadget/function/f_ccid.c:683:5: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
"ccid: too much data. %i provided, but we can only handle %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb/gadget/function/f_ccid.c:682:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
drivers/usb/gadget/function/f_ccid.c:683:5: warning: format '%i' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
"ccid: too much data. %i provided, but we can only handle %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb/gadget/function/f_ccid.c:682:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
--
In file included from include/linux/printk.h:332:0,
from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/kobject.h:19,
from include/linux/cdev.h:5,
from drivers/usb//gadget/function/f_ccid.c:8:
drivers/usb//gadget/function/f_ccid.c: In function 'ccidg_bulk_read':
drivers/usb//gadget/function/f_ccid.c:612:5: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
"ccid: too small buffer size. %i provided, need at least %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb//gadget/function/f_ccid.c:611:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
drivers/usb//gadget/function/f_ccid.c:612:5: warning: format '%i' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
"ccid: too small buffer size. %i provided, need at least %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb//gadget/function/f_ccid.c:611:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
drivers/usb//gadget/function/f_ccid.c: In function 'ccidg_bulk_write':
drivers/usb//gadget/function/f_ccid.c:683:5: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
"ccid: too much data. %i provided, but we can only handle %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb//gadget/function/f_ccid.c:682:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
drivers/usb//gadget/function/f_ccid.c:683:5: warning: format '%i' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
"ccid: too much data. %i provided, but we can only handle %i\n",
^
include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg'
__dynamic_dev_dbg(&descriptor, dev, fmt, \
^~~
>> include/linux/usb/composite.h:632:2: note: in expansion of macro 'dev_dbg'
dev_dbg(&(d)->gadget->dev , fmt , ## args)
^~~~~~~
drivers/usb//gadget/function/f_ccid.c:682:3: note: in expansion of macro 'DBG'
DBG(ccidg->function.config->cdev,
^~~
vim +612 drivers/usb/gadget/function/f_ccid.c
599
600 static ssize_t ccidg_bulk_read(struct file *file, char __user *buf,
601 size_t count, loff_t *pos)
602 {
603 struct f_ccidg *ccidg = file->private_data;
604 struct ccidg_bulk_dev *bulk_dev = &ccidg->bulk_dev;
605 struct usb_request *req;
606 int r = count, xfer;
607 int ret;
608
609 /* Make sure we have enough space for a whole package */
610 if (count < sizeof(struct ccidg_bulk_out_header)) {
> 611 DBG(ccidg->function.config->cdev,
> 612 "ccid: too small buffer size. %i provided, need at least %i\n",
613 count, sizeof(struct ccidg_bulk_out_header));
614 return -ENOMEM;
615 }
616
617 if (!atomic_read(&ccidg->online))
618 return -ENODEV;
619
620 /* queue a request */
621 req = bulk_dev->rx_req;
622 req->length = count;
623 atomic_set(&bulk_dev->rx_done, 0);
624
625 ret = usb_ep_queue(ccidg->out, req, GFP_KERNEL);
626 if (ret < 0) {
627 ERROR(ccidg->function.config->cdev,
628 "ccid: usb ep queue failed\n");
629 return -EIO;
630 }
631
632 if (!atomic_read(&bulk_dev->rx_done) &&
633 file->f_flags & (O_NONBLOCK | O_NDELAY))
634 return -EAGAIN;
635
636 /* wait for a request to complete */
637 ret = wait_event_interruptible(bulk_dev->read_wq,
638 atomic_read(&bulk_dev->rx_done) ||
639 !atomic_read(&ccidg->online));
640 if (ret < 0) {
641 usb_ep_dequeue(ccidg->out, req);
642 return -ERESTARTSYS;
643 }
644
645 /* Still online? */
646 if (!atomic_read(&ccidg->online))
647 return -ENODEV;
648
649 atomic_set(&bulk_dev->rx_req_busy, 1);
650 xfer = (req->actual < count) ? req->actual : count;
651
652 if (copy_to_user(buf, req->buf, xfer))
653 r = -EFAULT;
654
655 atomic_set(&bulk_dev->rx_req_busy, 0);
656 if (!atomic_read(&ccidg->online)) {
657 ccidg_request_free(bulk_dev->rx_req, ccidg->out);
658 return -ENODEV;
659 }
660
661 return xfer;
662 }
663
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49294 bytes --]
next prev parent reply other threads:[~2018-05-29 1:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180526212048epcas2p1510fd6c92f20e8f6d0059742ab5fb3f7@epcas2p1.samsung.com>
2018-05-26 21:19 ` [PATCH v2 1/3] usb: gadget: ccid: add support for USB CCID Gadget Device Marcus Folkesson
2018-05-26 21:19 ` [PATCH v2 2/3] Documentation: usb: add documentation " Marcus Folkesson
2018-05-27 23:36 ` Randy Dunlap
2018-05-28 7:42 ` Marcus Folkesson
2018-05-26 21:19 ` [PATCH v2 3/3] MAINTAINERS: add " Marcus Folkesson
2018-05-28 7:04 ` [PATCH v2 1/3] usb: gadget: ccid: add support for " Andrzej Pietrasiewicz
2018-05-28 8:38 ` Marcus Folkesson
2018-05-28 9:12 ` Andrzej Pietrasiewicz
2018-05-28 9:32 ` Marcus Folkesson
2018-05-28 9:58 ` Andrzej Pietrasiewicz
2018-05-29 1:15 ` kbuild test robot [this message]
2018-05-29 2:57 ` kbuild test robot
2018-05-29 2:57 ` [RFC PATCH] usb: gadget: ccid: ccidg_start_ep() can be static kbuild 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=201805290510.1VIvGilo%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=balbi@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marcus.folkesson@gmail.com \
--cc=mchehab+samsung@kernel.org \
--cc=rdunlap@infradead.org \
--cc=ruslan.bilovol@gmail.com \
--cc=tglx@linutronix.de \
/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).