[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007020209.Owd6FFdQ%lkp@intel.com>
Date: Thu, 2 Jul 2020 02:21:23 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/video/fbdev/ffb.c:939:27: sparse: sparse: incorrect type in
assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c30b859a947535f2213277e827d7ac7dcff9c84
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 13 days ago
config: sparc64-randconfig-s032-20200701 (attached as .config)
compiler: sparc64-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 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/video/fbdev/ffb.c:939:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got char * @@
>> drivers/video/fbdev/ffb.c:939:27: sparse: expected char [noderef] __iomem *screen_base
drivers/video/fbdev/ffb.c:939:27: sparse: got char *
vim +939 drivers/video/fbdev/ffb.c
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 896
48c68c4f1b5424 drivers/video/ffb.c Greg Kroah-Hartman 2012-12-21 897 static int ffb_probe(struct platform_device *op)
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 898 {
61c7a080a5a061 drivers/video/ffb.c Grant Likely 2010-04-13 899 struct device_node *dp = op->dev.of_node;
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 900 struct ffb_fbc __iomem *fbc;
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 901 struct ffb_dac __iomem *dac;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 902 struct fb_info *info;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 903 struct ffb_par *par;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 904 u32 dac_pnum, dac_rev, dac_mrev;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 905 int err;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 906
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 907 info = framebuffer_alloc(sizeof(struct ffb_par), &op->dev);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 908
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 909 err = -ENOMEM;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 910 if (!info)
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 911 goto out_err;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 912
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 913 par = info->par;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 914
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 915 spin_lock_init(&par->lock);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 916 par->fbc = of_ioremap(&op->resource[2], 0,
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 917 sizeof(struct ffb_fbc), "ffb fbc");
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 918 if (!par->fbc)
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 919 goto out_release_fb;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 920
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 921 par->dac = of_ioremap(&op->resource[1], 0,
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 922 sizeof(struct ffb_dac), "ffb dac");
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 923 if (!par->dac)
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 924 goto out_unmap_fbc;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 925
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 926 par->rop_cache = FFB_ROP_NEW;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 927 par->physbase = op->resource[0].start;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 928
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 929 /* Don't mention copyarea, so SCROLL_REDRAW is always
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 930 * used. It is the fastest on this chip.
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 931 */
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 932 info->flags = (FBINFO_DEFAULT |
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 933 /* FBINFO_HWACCEL_COPYAREA | */
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 934 FBINFO_HWACCEL_FILLRECT |
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 935 FBINFO_HWACCEL_IMAGEBLIT);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 936
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 937 info->fbops = &ffb_ops;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 938
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 @939 info->screen_base = (char *) par->physbase + FFB_DFB24_POFF;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 940 info->pseudo_palette = par->pseudo_palette;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 941
6cd5a86b56ec8f drivers/video/ffb.c Robert Reif 2008-05-08 942 sbusfb_fill_var(&info->var, dp, 32);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 943 par->fbsize = PAGE_ALIGN(info->var.xres * info->var.yres * 4);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 944 ffb_fixup_var_rgb(&info->var);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 945
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 946 info->var.accel_flags = FB_ACCELF_TEXT;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 947
a6f13af4d115a1 drivers/video/fbdev/ffb.c Rob Herring 2019-02-08 948 if (of_node_name_eq(dp, "SUNW,afb"))
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 949 par->flags |= FFB_FLAG_AFB;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 950
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 951 par->board_type = of_getintprop_default(dp, "board_type", 0);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 952
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 953 fbc = par->fbc;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 954 if ((upa_readl(&fbc->ucsr) & FFB_UCSR_ALL_ERRORS) != 0)
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 955 upa_writel(FFB_UCSR_ALL_ERRORS, &fbc->ucsr);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 956
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 957 dac = par->dac;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 958 upa_writel(FFB_DAC_DID, &dac->type);
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 959 dac_pnum = upa_readl(&dac->value);
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 960 dac_rev = (dac_pnum & FFB_DAC_DID_REV) >> FFB_DAC_DID_REV_SHIFT;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 961 dac_pnum = (dac_pnum & FFB_DAC_DID_PNUM) >> FFB_DAC_DID_PNUM_SHIFT;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 962
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 963 upa_writel(FFB_DAC_UCTRL, &dac->type);
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 964 dac_mrev = upa_readl(&dac->value);
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 965 dac_mrev = (dac_mrev & FFB_DAC_UCTRL_MANREV) >>
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 966 FFB_DAC_UCTRL_MANREV_SHIFT;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 967
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 968 /* Elite3D has different DAC revision numbering, and no DAC revisions
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 969 * have the reversed meaning of cursor enable. Otherwise, Pacifica 1
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 970 * ramdacs with manufacturing revision less than 3 have inverted
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 971 * cursor logic. We identify Pacifica 1 as not Pacifica 2, the
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 972 * latter having a part number value of 0x236e.
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 973 */
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 974 if ((par->flags & FFB_FLAG_AFB) || dac_pnum == 0x236e) {
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 975 par->flags &= ~FFB_FLAG_INVCURSOR;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 976 } else {
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 977 if (dac_mrev < 3)
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 978 par->flags |= FFB_FLAG_INVCURSOR;
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 979 }
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 980
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 981 ffb_switch_from_graph(par);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 982
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 983 /* Unblank it just to be sure. When there are multiple
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 984 * FFB/AFB cards in the system, or it is not the OBP
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 985 * chosen console, it will have video outputs off in
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 986 * the DAC.
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 987 */
59f7137a1369c2 drivers/video/ffb.c Robert Reif 2008-05-03 988 ffb_blank(FB_BLANK_UNBLANK, info);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 989
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 990 if (fb_alloc_cmap(&info->cmap, 256, 0))
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 991 goto out_unmap_dac;
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 992
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 993 ffb_init_fix(info);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 994
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 995 err = register_framebuffer(info);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 996 if (err < 0)
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 997 goto out_dealloc_cmap;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 998
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 999 dev_set_drvdata(&op->dev, info);
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 1000
6d7e653300e30f drivers/video/fbdev/ffb.c Rob Herring 2017-08-07 1001 printk(KERN_INFO "%pOF: %s at %016lx, type %d, "
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 1002 "DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
6d7e653300e30f drivers/video/fbdev/ffb.c Rob Herring 2017-08-07 1003 dp,
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1004 ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1005 par->physbase, par->board_type,
37db9a348ad425 drivers/video/ffb.c David S. Miller 2007-03-26 1006 dac_pnum, dac_rev, dac_mrev);
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 1007
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 1008 return 0;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 1009
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1010 out_dealloc_cmap:
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1011 fb_dealloc_cmap(&info->cmap);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1012
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1013 out_unmap_dac:
7b0e278519eba8 drivers/video/ffb.c Axel Lin 2011-02-08 1014 of_iounmap(&op->resource[1], par->dac, sizeof(struct ffb_dac));
50312ce9dd794e drivers/video/ffb.c David S. Miller 2006-06-29 1015
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1016 out_unmap_fbc:
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1017 of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc));
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1018
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1019 out_release_fb:
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1020 framebuffer_release(info);
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1021
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1022 out_err:
c7f439b99efbea drivers/video/ffb.c David S. Miller 2007-07-27 1023 return err;
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 1024 }
^1da177e4c3f41 drivers/video/ffb.c Linus Torvalds 2005-04-16 1025
:::::: The code at line 939 was first introduced by commit
:::::: c7f439b99efbea74c70a5531f92566db5a6731f2 [VIDEO]: Fix OOPS in all SBUS framebuffer drivers.
:::::: TO: David S. Miller <davem@...set.davemloft.net>
:::::: CC: David S. Miller <davem@...set.davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32833 bytes)
Powered by blists - more mailing lists