lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210241417.3OSCbFna-lkp@intel.com>
Date:   Mon, 24 Oct 2022 14:35:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [arm-integrator:virt-to-pfn-v6.0-rc1 10/24]
 drivers/video/fbdev/mx3fb.c:821:29: sparse: sparse: incorrect type in
 argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git virt-to-pfn-v6.0-rc1
head:   4d7acf8f4433bc283b286b226222d04e3e0de2e1
commit: 62480a757a8c250d2b3c49386a0e9c1420169c83 [10/24] ARM: mm: Make virt_to_pfn() a static inline
config: arm-randconfig-s043-20221024
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=62480a757a8c250d2b3c49386a0e9c1420169c83
        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 62480a757a8c250d2b3c49386a0e9c1420169c83
        # 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 drivers/video/fbdev/

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

sparse warnings: (new ones prefixed by >>)
   drivers/video/fbdev/mx3fb.c:1337:26: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char [noderef] __iomem *screen_base @@     got void * @@
   drivers/video/fbdev/mx3fb.c:1337:26: sparse:     expected char [noderef] __iomem *screen_base
   drivers/video/fbdev/mx3fb.c:1337:26: sparse:     got void *
   drivers/video/fbdev/mx3fb.c:1360:9: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/video/fbdev/mx3fb.c:1378:56: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *cpu_addr @@     got char [noderef] __iomem *screen_base @@
   drivers/video/fbdev/mx3fb.c:1378:56: sparse:     expected void *cpu_addr
   drivers/video/fbdev/mx3fb.c:1378:56: sparse:     got char [noderef] __iomem *screen_base
>> drivers/video/fbdev/mx3fb.c:821:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *p @@     got char [noderef] __iomem *screen_base @@
   drivers/video/fbdev/mx3fb.c:821:29: sparse:     expected void const *p
   drivers/video/fbdev/mx3fb.c:821:29: sparse:     got char [noderef] __iomem *screen_base
   drivers/video/fbdev/mx3fb.c:1093:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/video/fbdev/mx3fb.c:1197:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *p @@     got char [noderef] __iomem * @@
   drivers/video/fbdev/mx3fb.c:1197:21: sparse:     expected void const *p
   drivers/video/fbdev/mx3fb.c:1197:21: sparse:     got char [noderef] __iomem *

vim +821 drivers/video/fbdev/mx3fb.c

41a490ec019fd1 drivers/video/mx3fb.c       Liu Ying              2012-06-11  790  
20de03dae54e10 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-08-06  791  static int __set_par(struct fb_info *fbi, bool lock)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  792  {
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  793  	u32 mem_len, cur_xoffset, cur_yoffset;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  794  	struct ipu_di_signal_cfg sig_cfg;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  795  	enum ipu_panel mode = IPU_PANEL_TFT;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  796  	struct mx3fb_info *mx3_fbi = fbi->par;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  797  	struct mx3fb_data *mx3fb = mx3_fbi->mx3fb;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  798  	struct idmac_channel *ichan = mx3_fbi->idmac_channel;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  799  	struct idmac_video_param *video = &ichan->params.video;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  800  	struct scatterlist *sg = mx3_fbi->sg;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  801  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  802  	/* Total cleanup */
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  803  	if (mx3_fbi->txd)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  804  		sdc_disable_channel(mx3_fbi);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  805  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  806  	mx3fb_set_fix(fbi);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  807  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  808  	mem_len = fbi->var.yres_virtual * fbi->fix.line_length;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  809  	if (mem_len > fbi->fix.smem_len) {
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  810  		if (fbi->fix.smem_start)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  811  			mx3fb_unmap_video_memory(fbi);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  812  
20de03dae54e10 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-08-06  813  		if (mx3fb_map_video_memory(fbi, mem_len, lock) < 0)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  814  			return -ENOMEM;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  815  	}
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  816  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  817  	sg_init_table(&sg[0], 1);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  818  	sg_init_table(&sg[1], 1);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  819  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  820  	sg_dma_address(&sg[0]) = fbi->fix.smem_start;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21 @821  	sg_set_page(&sg[0], virt_to_page(fbi->screen_base),
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  822  		    fbi->fix.smem_len,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  823  		    offset_in_page(fbi->screen_base));
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  824  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  825  	if (mx3_fbi->ipu_ch == IDMAC_SDC_0) {
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  826  		memset(&sig_cfg, 0, sizeof(sig_cfg));
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  827  		if (fbi->var.sync & FB_SYNC_HOR_HIGH_ACT)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  828  			sig_cfg.Hsync_pol = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  829  		if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  830  			sig_cfg.Vsync_pol = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  831  		if (fbi->var.sync & FB_SYNC_CLK_INVERT)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  832  			sig_cfg.clk_pol = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  833  		if (fbi->var.sync & FB_SYNC_DATA_INVERT)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  834  			sig_cfg.data_pol = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  835  		if (fbi->var.sync & FB_SYNC_OE_ACT_HIGH)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  836  			sig_cfg.enable_pol = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  837  		if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  838  			sig_cfg.clkidle_en = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  839  		if (fbi->var.sync & FB_SYNC_CLK_SEL_EN)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  840  			sig_cfg.clksel_en = true;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  841  		if (fbi->var.sync & FB_SYNC_SHARP_MODE)
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  842  			mode = IPU_PANEL_SHARP_TFT;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  843  
b86acbefa38145 drivers/video/fbdev/mx3fb.c Oleg Drokin           2016-08-26  844  		dev_dbg(fbi->device, "pixclock = %u Hz\n",
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  845  			(u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  846  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  847  		if (sdc_init_panel(mx3fb, mode,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  848  				   (PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  849  				   fbi->var.xres, fbi->var.yres,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  850  				   fbi->var.left_margin,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  851  				   fbi->var.hsync_len,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  852  				   fbi->var.right_margin +
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  853  				   fbi->var.hsync_len,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  854  				   fbi->var.upper_margin,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  855  				   fbi->var.vsync_len,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  856  				   fbi->var.lower_margin +
3f6c93ec9254b3 drivers/video/fbdev/mx3fb.c Arnd Bergmann         2020-04-08  857  				   fbi->var.vsync_len, &sig_cfg) != 0) {
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  858  			dev_err(fbi->device,
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  859  				"mx3fb: Error initializing panel.\n");
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  860  			return -EINVAL;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  861  		}
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  862  	}
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  863  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  864  	sdc_set_window_pos(mx3fb, mx3_fbi->ipu_ch, 0, 0);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  865  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  866  	mx3_fbi->cur_ipu_buf	= 0;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  867  
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  868  	video->out_pixel_fmt	= bpp_to_pixfmt(fbi->var.bits_per_pixel);
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  869  	video->out_width	= fbi->var.xres;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  870  	video->out_height	= fbi->var.yres;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  871  	video->out_stride	= fbi->var.xres_virtual;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  872  
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  873  	if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  874  		sdc_enable_channel(mx3_fbi);
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  875  		/*
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  876  		 * sg[0] points to fb smem_start address
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  877  		 * and is actually active in controller.
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  878  		 */
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  879  		mx3_fbi->cur_var.xoffset = 0;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  880  		mx3_fbi->cur_var.yoffset = 0;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  881  	}
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  882  
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  883  	/*
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  884  	 * Preserve xoffset and yoffest in case they are
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  885  	 * inactive in controller as fb is blanked.
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  886  	 */
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  887  	cur_xoffset = mx3_fbi->cur_var.xoffset;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  888  	cur_yoffset = mx3_fbi->cur_var.yoffset;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  889  	mx3_fbi->cur_var = fbi->var;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  890  	mx3_fbi->cur_var.xoffset = cur_xoffset;
6cd77e00c00c5d drivers/video/mx3fb.c       Liu Ying              2012-06-11  891  	mx3_fbi->cur_var.yoffset = cur_yoffset;
86528da229a448 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-01-21  892  
20de03dae54e10 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-08-06  893  	return 0;
20de03dae54e10 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-08-06  894  }
20de03dae54e10 drivers/video/mx3fb.c       Guennadi Liakhovetski 2009-08-06  895  

:::::: The code at line 821 was first introduced by commit
:::::: 86528da229a448577a8401a17c295883640d336c i.MX31: framebuffer driver

:::::: TO: Guennadi Liakhovetski <lg@...x.de>
:::::: CC: Dan Williams <dan.j.williams@...el.com>

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

View attachment "config" of type "text/plain" (225164 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ