Re: fs/io_uring.c:10086:24: warning: Value stored to 'sqe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

From: Jens Axboe
Date: Fri Nov 05 2021 - 11:32:52 EST


On 11/5/21 12:42 AM, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: d4439a1189f93d0ac1eaf0197db8e6b3e197d5c7
> commit: f75d118349be055d47407b4ba4ceb98e6437e472 io_uring: harder fdinfo sq/cq ring iterating
> date: 7 days ago
> config: arm-randconfig-c002-20211031 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82ed106567063ea269c6d5669278b733e173a42f)
> 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 arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f75d118349be055d47407b4ba4ceb98e6437e472
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout f75d118349be055d47407b4ba4ceb98e6437e472
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
>
> clang-analyzer warnings: (new ones prefixed by >>)
>
> >> fs/io_uring.c:10086:24: warning: Value stored to 'sqe' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
> struct io_uring_sqe *sqe = &ctx->sq_sqes[sq_idx];
> ^~~ ~~~~~~~~~~~~~~~~~~~~~

Thanks, now fixed:

https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-5.16&id=a19577808fd33d9e64e015808fbca2769a96721b

--
Jens Axboe