From: kbuild test robot <lkp@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Wei Wang <wei.w.wang@intel.com>,
David Hildenbrand <david@redhat.com>
Subject: drivers//virtio/virtio_balloon.c:594:22: note: in expansion of macro 'VIRTIO_BALLOON_HINT_BLOCK_BYTES'
Date: Thu, 26 Dec 2019 11:05:49 +0800 [thread overview]
Message-ID: <201912261129.OpTsC8Mn%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 46cf053efec6a3a5f343fead837777efe8252a46
commit: 2a946fa1c8bc26df03bacebb6811b656d5e0cf1c virtio_balloon: name cleanups
date: 2 weeks ago
config: ia64-randconfig-a001-20191226 (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2a946fa1c8bc26df03bacebb6811b656d5e0cf1c
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers//virtio/virtio_balloon.c: In function 'get_free_page_and_send':
drivers//virtio/virtio_balloon.c:38:5: warning: left shift count >= width of type [-Wshift-count-overflow]
(1 << (VIRTIO_BALLOON_HINT_BLOCK_ORDER + PAGE_SHIFT))
^
>> drivers//virtio/virtio_balloon.c:594:22: note: in expansion of macro 'VIRTIO_BALLOON_HINT_BLOCK_BYTES'
sg_init_one(&sg, p, VIRTIO_BALLOON_HINT_BLOCK_BYTES);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/VIRTIO_BALLOON_HINT_BLOCK_BYTES +594 drivers//virtio/virtio_balloon.c
571
572 static int get_free_page_and_send(struct virtio_balloon *vb)
573 {
574 struct virtqueue *vq = vb->free_page_vq;
575 struct page *page;
576 struct scatterlist sg;
577 int err, unused;
578 void *p;
579
580 /* Detach all the used buffers from the vq */
581 while (virtqueue_get_buf(vq, &unused))
582 ;
583
584 page = alloc_pages(VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG,
585 VIRTIO_BALLOON_HINT_BLOCK_ORDER);
586 /*
587 * When the allocation returns NULL, it indicates that we have got all
588 * the possible free pages, so return -EINTR to stop.
589 */
590 if (!page)
591 return -EINTR;
592
593 p = page_address(page);
> 594 sg_init_one(&sg, p, VIRTIO_BALLOON_HINT_BLOCK_BYTES);
595 /* There is always 1 entry reserved for the cmd id to use. */
596 if (vq->num_free > 1) {
597 err = virtqueue_add_inbuf(vq, &sg, 1, p, GFP_KERNEL);
598 if (unlikely(err)) {
599 free_pages((unsigned long)p,
600 VIRTIO_BALLOON_HINT_BLOCK_ORDER);
601 return err;
602 }
603 virtqueue_kick(vq);
604 spin_lock_irq(&vb->free_page_list_lock);
605 balloon_page_push(&vb->free_page_list, page);
606 vb->num_free_page_blocks++;
607 spin_unlock_irq(&vb->free_page_list_lock);
608 } else {
609 /*
610 * The vq has no available entry to add this page block, so
611 * just free it.
612 */
613 free_pages((unsigned long)p, VIRTIO_BALLOON_HINT_BLOCK_ORDER);
614 }
615
616 return 0;
617 }
618
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26281 bytes --]
reply other threads:[~2019-12-26 3:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201912261129.OpTsC8Mn%lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=wei.w.wang@intel.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).