From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Mel Gorman <mgorman@suse.de>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Linux Memory Management List <linux-mm@kvack.org>,
Yang Shi <shy828301@gmail.com>
Subject: Re: [linux-next:master 5267/5396] drivers/gpu/drm/i915/gem/i915_gem_object.h:39:6: error: shift count >= width of type
Date: Wed, 26 May 2021 12:58:19 -0700 [thread overview]
Message-ID: <20210526125819.b3f0bf497fb7f5cdc2923400@linux-foundation.org> (raw)
In-Reply-To: <202105270316.jfrF2O3P-lkp@intel.com>
On Thu, 27 May 2021 03:24:25 +0800 kernel test robot <lkp@intel.com> 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 <lkp@intel.com>
>
> 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.
> >> 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.
prev parent reply other threads:[~2021-05-26 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 19:24 kernel test robot
2021-05-26 19:58 ` Andrew Morton [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=20210526125819.b3f0bf497fb7f5cdc2923400@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mgorman@suse.de \
--cc=shy828301@gmail.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