tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/cifs-for-viro head: 36501a16f9488b5e40c3649db6c72ad356a4b861 commit: b21cd8eded0be08b72dca58736fb226e00f648e0 [3/13] iov_iter: Add a function to extract a page list from an iterator config: mips-randconfig-s033-20221106 compiler: mips-linux-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://github.com/ammarfaizi2/linux-block/commit/b21cd8eded0be08b72dca58736fb226e00f648e0 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/cifs-for-viro git checkout b21cd8eded0be08b72dca58736fb226e00f648e0 # 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=mips SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> lib/iov_iter.c:2215:19: sparse: sparse: incompatible types in comparison expression (different signedness): lib/iov_iter.c:2215:19: sparse: unsigned int * >> lib/iov_iter.c:2215:19: sparse: int * vim +2215 lib/iov_iter.c 2159 2160 /** 2161 * iov_iter_extract_pages - Extract a list of contiguous pages from an iterator 2162 * @i: The iterator to extract from 2163 * @pages: Where to return the list of pages 2164 * @maxsize: The maximum amount of iterator to extract 2165 * @maxpages: The maximum size of the list of pages 2166 * @offset0: Where to return the starting offset into (*@pages)[0] 2167 * 2168 * Extract a list of contiguous pages from the current point of the iterator, 2169 * advancing the iterator. The maximum number of pages and the maximum amount 2170 * of page contents can be set. 2171 * 2172 * If *@pages is NULL, a page list will be allocated to the required size and 2173 * *@pages will be set to its base. If *@pages is not NULL, it will be assumed 2174 * that the caller allocated a page list at least @maxpages in size and this 2175 * will be filled in. 2176 * 2177 * Extra refs or pins on the pages may be obtained as follows: 2178 * 2179 * (*) If the iterator is user-backed (ITER_IOVEC/ITER_UBUF) and data is to be 2180 * transferred /OUT OF/ the described buffer, refs will be taken on the 2181 * pages, but pins will not be added. This can be used for DMA from a 2182 * page; it cannot be used for DMA to a page, as it may cause page-COW 2183 * problems in fork. 2184 * 2185 * (*) If the iterator is user-backed (ITER_IOVEC/ITER_UBUF) and data is to be 2186 * transferred /INTO/ the described buffer, pins will be added to the 2187 * pages, but refs will not be taken. This must be used for DMA to a 2188 * page. 2189 * 2190 * (*) If the iterator is ITER_PIPE, this must describe a destination for the 2191 * data. Additional pages may be allocated and added to the pipe (which 2192 * will hold the refs), but neither refs nor pins will be obtained for the 2193 * caller. The caller must hold the pipe lock. 2194 * 2195 * (*) If the iterator is ITER_BVEC or ITER_XARRAY, the pages are merely 2196 * listed; no extra refs or pins are obtained. 2197 * 2198 * Note also: 2199 * 2200 * (*) Use with ITER_KVEC is not supported as that may refer to memory that 2201 * doesn't have associated page structs. 2202 * 2203 * (*) Use with ITER_DISCARD is not supported as that has no content. 2204 * 2205 * On success, the function sets *@pages to the new pagelist, if allocated, and 2206 * sets *offset0 to the offset into the first page and returns the amount of 2207 * buffer space added represented by the page list. 2208 * 2209 * It may also return -ENOMEM and -EFAULT. 2210 */ 2211 ssize_t iov_iter_extract_pages(struct iov_iter *i, struct page ***pages, 2212 size_t maxsize, unsigned int maxpages, 2213 size_t *offset0) 2214 { > 2215 maxsize = min3(maxsize, i->count, MAX_RW_COUNT); -- 0-DAY CI Kernel Test Service https://01.org/lkp