Re: drivers/media/pci/intel/ipu3/ipu3-cio2.c:163:63: sparse: sparse: cast truncates bits from constant value (20000 becomes 0)

From: Andy Shevchenko
Date: Tue Jan 12 2021 - 09:03:11 EST


On Tue, Jan 12, 2021 at 3:07 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: a0d54b4f5b219fb31f0776e9f53aa137e78ae431
> commit: 7b285f41f7376dc37e7fad1e803995fd39f42848 media: ipu3-cio2: Introduce CIO2_LOP_ENTRIES constant
> date: 4 months ago
> config: ia64-randconfig-s031-20210112 (attached as .config)
> compiler: ia64-linux-gcc (GCC) 9.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.3-208-g46a52ca4-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b285f41f7376dc37e7fad1e803995fd39f42848
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 7b285f41f7376dc37e7fad1e803995fd39f42848
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
>
> "sparse warnings: (new ones prefixed by >>)"
> >> drivers/media/pci/intel/ipu3/ipu3-cio2.c:163:63: sparse: sparse: cast truncates bits from constant value (20000 becomes 0)

Patch should be somewhere on its way to upstream.

--
With Best Regards,
Andy Shevchenko