Re: [linux-next:master 5267/5396] drivers/gpu/drm/i915/gem/i915_gem_object.h:39:6: error: shift count >= width of type
From: Andrew Morton <akpm@linux-foundation.org>
Date: 2021-05-26 19:58:23
Also in:
oe-kbuild-all
On Thu, 27 May 2021 03:24:25 +0800 kernel test robot [off-list ref] wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: f6b46ef27317b3441138b902689bd89e4f82c6f4 commit: 55b24f9ce03ee4d6a06b874350c8297ac8135bf5 [5267/5396] mm/early_ioremap: add prototype for early_memremap_pgprot_adjust config: x86_64-randconfig-a012-20210526 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1) 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 # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=55b24f9ce03ee4d6a06b874350c8297ac8135bf5 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 55b24f9ce03ee4d6a06b874350c8297ac8135bf5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c:7: In file included from include/linux/dma-buf.h:16: In file included from include/linux/dma-buf-map.h:9: In file included from include/linux/io.h:13: In file included from arch/x86/include/asm/io.h:44: In file included from ./arch/x86/include/generated/asm/early_ioremap.h:1: In file included from include/asm-generic/early_ioremap.h:6: arch/x86/include/asm/fixmap.h:103:48: error: use of undeclared identifier 'NR_CPUS' FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1, ^
urgh, so x86_64 asm/fixmap.h isn't standalone - it needs threads.h for NR_CPUS. We have a lot of asm/fixmap.h's, so lazyass here will try this:
--- a/include/asm-generic/early_ioremap.h~mm-early_ioremap-add-prototype-for-early_memremap_pgprot_adjust-fix
+++ a/include/asm-generic/early_ioremap.h@@ -3,6 +3,7 @@ #define _ASM_EARLY_IOREMAP_H_ #include <linux/types.h> +#include <linux/threads.h> /* x86 fixmap.h needs NR_CPUS */ #include <asm/fixmap.h> /*
but really we should make those fixmap.h's standalone.
quoted
quoted
drivers/gpu/drm/i915/gem/i915_gem_object.h:39:6: error: shift count >= width of type [-Werror,-Wshift-count-overflow]if (overflows_type(size, obj->base.size)) ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/i915_utils.h:125:32: note: expanded from macro 'overflows_type' (sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
Hopefully this is just fallout from the first error.