On Thu, Aug 11, 2022 at 10:22 AM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote: > > On Thu, Aug 11, 2022 at 10:12:17AM +0200, Stefano Garzarella wrote: > > Hi Michael, > > > > On Thu, Aug 11, 2022 at 03:46:35PM +0800, kernel test robot wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > > head: 40d43a7507e1547dd45cb02af2e40d897c591870 > > > commit: d79b32c2e4a4e66d5678410cd45815c1c2375196 [14849/15097] vdpa_sim_blk: add support for discard and write-zeroes > > > config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220811/202208111501.5PSP1WaM-lkp@xxxxxxxxx/config) > > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520) > > > 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/next/linux-next.git/commit/?id=d79b32c2e4a4e66d5678410cd45815c1c2375196 > > > 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 d79b32c2e4a4e66d5678410cd45815c1c2375196 > > > # save the config file > > > mkdir build_dir && cp config build_dir/.config > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vdpa/vdpa_sim/ > > > > > > If you fix the issue, kindly add following tag where applicable > > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:201:3: error: expected expression > > > struct virtio_blk_discard_write_zeroes range; > > > ^ > > > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:204:25: error: use of undeclared identifier 'range' > > > if (to_pull != sizeof(range)) { > > > ^ > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:207:21: error: use of undeclared identifier 'range' > > > to_pull, sizeof(range)); > > > ^ > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:212:60: error: use of undeclared identifier 'range' > > > bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &range, > > > ^ > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:222:38: error: use of undeclared identifier 'range' > > > sector = vdpasim64_to_cpu(vdpasim, range.sector); > > > ^ > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:224:43: error: use of undeclared identifier 'range' > > > num_sectors = vdpasim32_to_cpu(vdpasim, range.num_sectors); > > > ^ > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:225:37: error: use of undeclared identifier 'range' > > > flags = vdpasim32_to_cpu(vdpasim, range.flags); > > > ^ > > > > > drivers/vdpa/vdpa_sim/vdpa_sim_blk.c:202:7: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement] > > > u32 num_sectors, flags; > > > ^ > > > 1 warning and 7 errors generated. > > > > I'll send followup patches to fix this issue and another that I found > > building with C=2 (virtio_blk_discard_write_zeroes fields are __leX not > > __virtioX, so I should use leX_to_cpu). > > > > Is that okay or should I re-send the original series fixed? > > > > Thanks, > > Resend, I dropped them for now. Unlikely to be included in this window, at this point. > Okay, next time I'll build also with clang. FYI, rebuilding with C=2 I also had this warning: ../drivers/vdpa/vdpa.c:811:19: warning: cast to restricted __le16 ../drivers/vdpa/vdpa.c:811:19: warning: cast from restricted __virtio16 I'll send a separate patch for that. Thanks, Stefano