[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211219122937.7zi3etrcl6rpob3t@liuwe-devbox-debian-v2>
Date: Sun, 19 Dec 2021 12:29:37 +0000
From: Wei Liu <wei.liu@...nel.org>
To: kernel test robot <lkp@...el.com>
Cc: Tianyu Lan <Tianyu.Lan@...rosoft.com>, llvm@...ts.linux.dev,
kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Wei Liu <wei.liu@...nel.org>, Long Li <longli@...rosoft.com>,
Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [hyperv:hyperv-next 4/5] drivers/hv/vmbus_drv.c:2082:29:
warning: shift count >= width of type
On Sat, Dec 18, 2021 at 06:20:43PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
> head: 19fd7ca00201c0525452dcf5a490e4b01674ef4c
> commit: 6327882f7b4a476ea902de4bee5657f1028d6859 [4/5] scsi: storvsc: Add Isolation VM support for storvsc driver
> config: x86_64-randconfig-a013-20211216 (https://download.01.org/0day-ci/archive/20211218/202112181827.o3X7GmHz-lkp@intel.com/config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4c9e31a4814592bbda7153833e46728dc7b21100)
> 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
> # https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?id=6327882f7b4a476ea902de4bee5657f1028d6859
> git remote add hyperv https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
> git fetch --no-tags hyperv hyperv-next
> git checkout 6327882f7b4a476ea902de4bee5657f1028d6859
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/hv/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@...el.com>
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/hv/vmbus_drv.c:2082:29: warning: shift count >= width of type [-Wshift-count-overflow]
> static u64 vmbus_dma_mask = DMA_BIT_MASK(64);
> ^~~~~~~~~~~~~~~~
> include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
> #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
> ^ ~~~
I don't think there is anything wrong with the code. When n is 64 the
problematic expression is not evaluated.
Wei.
Powered by blists - more mailing lists