[arm-integrator:virt-to-pfn-v6.0-rc1 10/24] fs/iomap/direct-io.c:195:29: sparse: sparse: Using plain integer as NULL pointer

From: kernel test robot
Date: Tue Aug 30 2022 - 18:02:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git virt-to-pfn-v6.0-rc1
head: fd7709c9f1119794e96665ae423d79d93bfe43fc
commit: cb1bcb8486737f0d37b3ee9522ee44106d9875ae [10/24] ARM: mm: Make virt_to_pfn() a static inline
config: arm-randconfig-s042-20220830 (https://download.01.org/0day-ci/archive/20220831/202208310538.aeMiqjUq-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=cb1bcb8486737f0d37b3ee9522ee44106d9875ae
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator virt-to-pfn-v6.0-rc1
git checkout cb1bcb8486737f0d37b3ee9522ee44106d9875ae
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash block/ fs/cifs/ fs/iomap/ lib/crypto/ net/ceph/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

sparse warnings: (new ones prefixed by >>)
>> fs/iomap/direct-io.c:195:29: sparse: sparse: Using plain integer as NULL pointer
--
>> block/blk-lib.c:186:53: sparse: sparse: Using plain integer as NULL pointer
--
>> net/ceph/messenger.c:247:26: sparse: sparse: Using plain integer as NULL pointer
--
>> lib/crypto/chacha20poly1305.c:60:26: sparse: sparse: Using plain integer as NULL pointer
lib/crypto/chacha20poly1305.c:128:26: sparse: sparse: Using plain integer as NULL pointer
lib/crypto/chacha20poly1305.c:215:26: sparse: sparse: Using plain integer as NULL pointer
--
>> lib/crypto/chacha20poly1305-selftest.c:8833:26: sparse: sparse: Using plain integer as NULL pointer

vim +195 fs/iomap/direct-io.c

db074436f42196 Darrick J. Wong 2019-07-15 190
a6d3d49587d10d Christoph Hellwig 2021-08-10 191 static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio,
a6d3d49587d10d Christoph Hellwig 2021-08-10 192 loff_t pos, unsigned len)
db074436f42196 Darrick J. Wong 2019-07-15 193 {
489734ef94f4f7 Eric Biggers 2022-01-28 194 struct inode *inode = file_inode(dio->iocb->ki_filp);
db074436f42196 Darrick J. Wong 2019-07-15 @195 struct page *page = ZERO_PAGE(0);
db074436f42196 Darrick J. Wong 2019-07-15 196 struct bio *bio;
db074436f42196 Darrick J. Wong 2019-07-15 197
908c54909ae72d Christoph Hellwig 2022-05-05 198 bio = iomap_dio_alloc_bio(iter, dio, 1, REQ_OP_WRITE | REQ_SYNC | REQ_IDLE);
489734ef94f4f7 Eric Biggers 2022-01-28 199 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
489734ef94f4f7 Eric Biggers 2022-01-28 200 GFP_KERNEL);
a6d3d49587d10d Christoph Hellwig 2021-08-10 201 bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos);
db074436f42196 Darrick J. Wong 2019-07-15 202 bio->bi_private = dio;
db074436f42196 Darrick J. Wong 2019-07-15 203 bio->bi_end_io = iomap_dio_bio_end_io;
db074436f42196 Darrick J. Wong 2019-07-15 204
db074436f42196 Darrick J. Wong 2019-07-15 205 get_page(page);
db074436f42196 Darrick J. Wong 2019-07-15 206 __bio_add_page(bio, page, len, 0);
a6d3d49587d10d Christoph Hellwig 2021-08-10 207 iomap_dio_submit_bio(iter, dio, bio, pos);
db074436f42196 Darrick J. Wong 2019-07-15 208 }
db074436f42196 Darrick J. Wong 2019-07-15 209

:::::: The code at line 195 was first introduced by commit
:::::: db074436f421967f4f30cfbb6fbc2a728f3e62b3 iomap: move the direct IO code into a separate file

:::::: TO: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
:::::: CC: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp