drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: expected void
From: kernel test robot
Date: Mon Jun 29 2020 - 15:16:59 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 8 months ago
config: s390-randconfig-s031-20200629 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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.2-3-gfa153962-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C= CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got char [noderef] <asn:2> *screen_base @@
>> drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: expected void *p
drivers/video/fbdev/kyro/fbdev.c:725:23: sparse: got char [noderef] <asn:2> *screen_base
vim +725 drivers/video/fbdev/kyro/fbdev.c
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 661
48c68c4f1b5424 drivers/video/kyro/fbdev.c Greg Kroah-Hartman 2012-12-21 662 static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 663 {
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 664 struct fb_info *info;
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 665 struct kyrofb_info *currentpar;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 666 unsigned long size;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 667 int err;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 668
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 669 if ((err = pci_enable_device(pdev))) {
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 670 printk(KERN_WARNING "kyrofb: Can't enable pdev: %d\n", err);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 671 return err;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 672 }
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 673
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 674 info = framebuffer_alloc(sizeof(struct kyrofb_info), &pdev->dev);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 675 if (!info)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 676 return -ENOMEM;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 677
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 678 currentpar = info->par;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 679
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 680 kyro_fix.smem_start = pci_resource_start(pdev, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 681 kyro_fix.smem_len = pci_resource_len(pdev, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 682 kyro_fix.mmio_start = pci_resource_start(pdev, 1);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 683 kyro_fix.mmio_len = pci_resource_len(pdev, 1);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 684
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 685 currentpar->regbase = deviceInfo.pSTGReg =
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 686 ioremap_nocache(kyro_fix.mmio_start, kyro_fix.mmio_len);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 687 if (!currentpar->regbase)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 688 goto out_free_fb;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 689
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 690 info->screen_base = pci_ioremap_wc_bar(pdev, 0);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 691 if (!info->screen_base)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 692 goto out_unmap_regs;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 693
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 694 if (!nomtrr)
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 695 currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 696 kyro_fix.smem_len);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 697
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 698 kyro_fix.ypanstep = nopan ? 0 : 1;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 699 kyro_fix.ywrapstep = nowrap ? 0 : 1;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 700
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 701 info->fbops = &kyrofb_ops;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 702 info->fix = kyro_fix;
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 703 info->pseudo_palette = currentpar->palette;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 704 info->flags = FBINFO_DEFAULT;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 705
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 706 SetCoreClockPLL(deviceInfo.pSTGReg, pdev);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 707
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 708 deviceInfo.ulNextFreeVidMem = 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 709 deviceInfo.ulOverlayOffset = 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 710
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 711 /* This should give a reasonable default video mode */
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 712 if (!fb_find_mode(&info->var, info, mode_option, kyro_modedb,
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 713 NUM_TOTAL_MODES, &kyro_modedb[VMODE_1024_768_75], 32))
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 714 info->var = kyro_var;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 715
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 716 fb_alloc_cmap(&info->cmap, 256, 0);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 717
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 718 kyrofb_set_par(info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 719 kyrofb_check_var(&info->var, info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 720
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 721 size = get_line_length(info->var.xres_virtual,
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 722 info->var.bits_per_pixel);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 723 size *= info->var.yres_virtual;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 724
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 @725 fb_memset(info->screen_base, 0, size);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 726
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 727 if (register_framebuffer(info) < 0)
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 728 goto out_unmap;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 729
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 730 fb_info(info, "%s frame buffer device, at %dx%d@%d using %ldk/%ldk of VRAM\n",
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 731 info->fix.id,
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 732 info->var.xres, info->var.yres, info->var.bits_per_pixel,
31b6780c15a4e3 drivers/video/kyro/fbdev.c Joe Perches 2013-09-19 733 size >> 10, (unsigned long)info->fix.smem_len >> 10);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 734
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 735 pci_set_drvdata(pdev, info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 736
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 737 return 0;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 738
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 739 out_unmap:
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 740 iounmap(info->screen_base);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 741 out_unmap_regs:
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 742 iounmap(currentpar->regbase);
9e517ac88b2443 drivers/video/fbdev/kyro/fbdev.c Luis R. Rodriguez 2015-08-24 743 out_free_fb:
a26968df0110bc drivers/video/kyro/fbdev.c Antonino A. Daplas 2006-01-09 744 framebuffer_release(info);
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 745
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 746 return -EINVAL;
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 747 }
^1da177e4c3f41 drivers/video/kyro/fbdev.c Linus Torvalds 2005-04-16 748
:::::: The code at line 725 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip