public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [xiang:erofs/advancedpcl 16/16] fs/erofs/zdata.c:901:36: error: 'mappednr' undeclared
@ 2022-07-11 13:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-11 13:01 UTC (permalink / raw)
  To: Gao Xiang; +Cc: kbuild-all, Xiang Gao, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git erofs/advancedpcl
head:   2c199ac6fc3c0d5499babde5b7586d99e4bc7aae
commit: 2c199ac6fc3c0d5499babde5b7586d99e4bc7aae [16/16] erofs: introduce multi-reference pclusters
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220711/202207112048.J46LPGXw-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.3.0
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/xiang/linux.git/commit/?id=2c199ac6fc3c0d5499babde5b7586d99e4bc7aae
        git remote add xiang https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git
        git fetch --no-tags xiang erofs/advancedpcl
        git checkout 2c199ac6fc3c0d5499babde5b7586d99e4bc7aae
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash fs/erofs/

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

All errors (new ones prefixed by >>):

   fs/erofs/zdata.c: In function 'z_erofs_fill_duplicated_copy':
>> fs/erofs/zdata.c:901:36: error: 'mappednr' undeclared (first use in this function)
     901 |                         if (src && mappednr != pgnr) {
         |                                    ^~~~~~~~
   fs/erofs/zdata.c:901:36: note: each undeclared identifier is reported only once for each function it appears in


vim +/mappednr +901 fs/erofs/zdata.c

   877	
   878	static void z_erofs_fill_duplicated_copy(struct z_erofs_decompress_backend *be)
   879	{
   880		unsigned char *src = NULL;
   881		struct list_head *p, *n;
   882	
   883		list_for_each_safe(p, n, &be->decompressed_secondary_bvecs) {
   884			struct z_erofs_bvec_item *bvi;
   885			unsigned int end, cur = 0;
   886			int off0;
   887			void *dst;
   888	
   889			bvi = container_of(p, struct z_erofs_bvec_item, list);
   890			dst = kmap_local_page(bvi->bvec.page);
   891	
   892			if (bvi->bvec.offset < 0)
   893				cur = -bvi->bvec.offset;
   894			off0 = bvi->bvec.offset + (bvi->bvec.offset & ~PAGE_MASK);
   895			end = min_t(unsigned int, be->pcl->length - off0, PAGE_SIZE);
   896			off0 -= be->pcl->pageofs_out;
   897			while (cur < end) {
   898				unsigned int pgnr, scur;
   899	
   900				pgnr = (off0 + cur + PAGE_SIZE - 1) >> PAGE_SHIFT;
 > 901				if (src && mappednr != pgnr) {
   902					kunmap_local(src);
   903					src = NULL;
   904				}
   905				scur = (pgnr << PAGE_SHIFT) - (off0 + cur);
   906	
   907				if (!src)
   908					src = kmap_local_page(
   909							be->decompressed_pages[pgnr]);
   910				memcpy(dst + cur, src + scur, end - max(cur, scur));
   911			}
   912			kunmap_local(dst);
   913			z_erofs_onlinepage_endio(bvi->bvec.page);
   914		}
   915	
   916		if (src)
   917			kunmap_local(src);
   918	}
   919	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-11 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11 13:01 [xiang:erofs/advancedpcl 16/16] fs/erofs/zdata.c:901:36: error: 'mappednr' undeclared kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox