[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201809181612.E5Y7onI9%fengguang.wu@intel.com>
Date: Tue, 18 Sep 2018 16:09:00 +0800
From: kbuild test robot <lkp@...el.com>
To: Nadav Amit <namit@...are.com>
Cc: kbuild-all@...org, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Nadav Amit <namit@...are.com>
Subject: Re: [PATCH 08/19] vmw_balloon: refactor change size from
vmballoon_work
Hi Nadav,
I love your patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.19-rc4 next-20180913]
[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/Nadav-Amit/vmw_balloon-compaction-shrinker-64-bit-etc/20180918-152302
config: x86_64-randconfig-x007-201837 (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=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from drivers/misc/vmw_balloon.c:20:
drivers/misc/vmw_balloon.c: In function 'vmballoon_change.isra.2':
include/linux/compiler.h:358:38: error: call to '__compiletime_assert_659' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^~~~
>> drivers/misc/vmw_balloon.c:659:2: note: in expansion of macro 'if'
if (target < size && size - target < HPAGE_PMD_NR && target != 0)
^~
include/linux/compiler.h:346:2: note: in expansion of macro '__compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
include/linux/huge_mm.h:250:28: note: in expansion of macro 'BUILD_BUG'
#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
^~~~~~~~~
include/linux/huge_mm.h:80:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
^~~~~~~~~~~~~~~
include/linux/huge_mm.h:81:26: note: in expansion of macro 'HPAGE_PMD_ORDER'
#define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
^~~~~~~~~~~~~~~
drivers/misc/vmw_balloon.c:659:39: note: in expansion of macro 'HPAGE_PMD_NR'
if (target < size && size - target < HPAGE_PMD_NR && target != 0)
^~~~~~~~~~~~
In file included from include/linux/mm.h:10:0,
from drivers/misc/vmw_balloon.c:21:
In function 'vmballoon_alloc_page',
inlined from 'vmballoon_inflate' at drivers/misc/vmw_balloon.c:702:8,
inlined from 'vmballoon_work' at drivers/misc/vmw_balloon.c:971:4:
include/linux/compiler.h:358:38: error: call to '__compiletime_assert_389' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/gfp.h:518:46: note: in definition of macro 'alloc_pages'
alloc_pages_node(numa_node_id(), gfp_mask, order)
^~~~~
include/linux/compiler.h:346:2: note: in expansion of macro '__compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:79:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
include/linux/huge_mm.h:250:28: note: in expansion of macro 'BUILD_BUG'
#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
^~~~~~~~~
include/linux/huge_mm.h:80:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
^~~~~~~~~~~~~~~
drivers/misc/vmw_balloon.c:389:49: note: in expansion of macro 'HPAGE_PMD_ORDER'
return alloc_pages(VMW_HUGE_PAGE_ALLOC_FLAGS, HPAGE_PMD_ORDER);
^~~~~~~~~~~~~~~
vim +/if +659 drivers/misc/vmw_balloon.c
634
635 /**
636 * vmballoon_change - retrieve the required balloon change
637 *
638 * @b: pointer for the balloon.
639 *
640 * Return: the required change for the balloon size. A positive number
641 * indicates inflation, a negative number indicates a deflation.
642 */
643 static int64_t vmballoon_change(struct vmballoon *b)
644 {
645 int64_t size, target;
646
647 size = b->size;
648 target = b->target;
649
650 /*
651 * We must cast first because of int sizes
652 * Otherwise we might get huge positives instead of negatives
653 */
654
655 if (b->reset_required)
656 return 0;
657
658 /* consider a 2MB slack on deflate, unless the balloon is emptied */
> 659 if (target < size && size - target < HPAGE_PMD_NR && target != 0)
660 return 0;
661
662 return target - size;
663 }
664
---
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" (32216 bytes)
Powered by blists - more mailing lists