lkml.org 
[lkml]   [2021]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[drm-drm-misc:drm-misc-next 1/7] drivers/gpu/drm/tiny/bochs.c:104:17: sparse: sparse: cast removes address space '__iomem' of expression
tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: d9cc564bf3aee6fcc1c717a19f9a207114510671
commit: 796c3e35ac16776ff479c2a7d9e3036bf5ffd73f [1/7] drm/bochs: Move to tiny/
config: riscv-randconfig-s031-20210705 (attached as .config)
compiler: riscv32-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.3-341-g8af24329-dirty
git remote add drm-drm-misc git://anongit.freedesktop.org/drm/drm-misc
git fetch --no-tags drm-drm-misc drm-misc-next
git checkout 796c3e35ac16776ff479c2a7d9e3036bf5ffd73f
# 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__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/tiny/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/tiny/bochs.c:104:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/tiny/bochs.c:104:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:104:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:104:17: sparse: got void *
drivers/gpu/drm/tiny/bochs.c:118:24: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/tiny/bochs.c:118:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:118:24: sparse: expected void const volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:118:24: sparse: got void *
drivers/gpu/drm/tiny/bochs.c:131:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/tiny/bochs.c:131:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:131:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:131:17: sparse: got void *
drivers/gpu/drm/tiny/bochs.c:132:23: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/tiny/bochs.c:132:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:132:23: sparse: expected void const volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:132:23: sparse: got void *
drivers/gpu/drm/tiny/bochs.c:144:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/tiny/bochs.c:144:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:144:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:144:17: sparse: got void *
drivers/gpu/drm/tiny/bochs.c:145:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/tiny/bochs.c:145:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/tiny/bochs.c:145:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/tiny/bochs.c:145:17: sparse: got void *

vim +/__iomem +104 drivers/gpu/drm/tiny/bochs.c

93
94 static void bochs_vga_writeb(struct bochs_device *bochs, u16 ioport, u8 val)
95 {
96 if (WARN_ON(ioport < 0x3c0 || ioport > 0x3df))
97 return;
98
99 if (bochs->mmio) {
100 int offset = ioport - 0x3c0 + 0x400;
101
102 writeb(val, bochs->mmio + offset);
103 } else {
> 104 outb(val, ioport);
105 }
106 }
107
108 static u8 bochs_vga_readb(struct bochs_device *bochs, u16 ioport)
109 {
110 if (WARN_ON(ioport < 0x3c0 || ioport > 0x3df))
111 return 0xff;
112
113 if (bochs->mmio) {
114 int offset = ioport - 0x3c0 + 0x400;
115
116 return readb(bochs->mmio + offset);
117 } else {
> 118 return inb(ioport);
119 }
120 }
121

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-05 17:33    [W:0.042 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site