[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008060506.TB8GjAsu%lkp@intel.com>
Date: Thu, 6 Aug 2020 05:37:09 +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/input/touchscreen/raspberrypi-ts.c:117:45: sparse: sparse:
incorrect type in argument 3 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ecfd7940b8641da6e41ca94eba36876dc2ba827b
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 7 weeks ago
config: x86_64-randconfig-s022-20200806 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-117-g8c7aee71-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/input/touchscreen/raspberrypi-ts.c:117:45: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *cpu_addr @@ got void [noderef] __iomem *fw_regs_va @@
drivers/input/touchscreen/raspberrypi-ts.c:117:45: sparse: expected void *cpu_addr
>> drivers/input/touchscreen/raspberrypi-ts.c:117:45: sparse: got void [noderef] __iomem *fw_regs_va
>> drivers/input/touchscreen/raspberrypi-ts.c:147:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *fw_regs_va @@ got void * @@
>> drivers/input/touchscreen/raspberrypi-ts.c:147:24: sparse: expected void [noderef] __iomem *fw_regs_va
drivers/input/touchscreen/raspberrypi-ts.c:147:24: sparse: got void *
--
drivers/mtd/nand/raw/hisi504_nand.c:362:26: sparse: sparse: cast removes address space '__iomem' of expression
drivers/mtd/nand/raw/hisi504_nand.c:367:26: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/mtd/nand/raw/hisi504_nand.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *mmio @@
drivers/mtd/nand/raw/hisi504_nand.c:465:28: sparse: expected void *p
drivers/mtd/nand/raw/hisi504_nand.c:465:28: sparse: got void [noderef] __iomem *mmio
drivers/mtd/nand/raw/hisi504_nand.c:477:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *mmio @@
drivers/mtd/nand/raw/hisi504_nand.c:477:28: sparse: expected void *p
drivers/mtd/nand/raw/hisi504_nand.c:477:28: sparse: got void [noderef] __iomem *mmio
drivers/mtd/nand/raw/hisi504_nand.c:603:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] __iomem *mmio @@
drivers/mtd/nand/raw/hisi504_nand.c:603:20: sparse: expected void *p
drivers/mtd/nand/raw/hisi504_nand.c:603:20: sparse: got void [noderef] __iomem *mmio
--
>> drivers/net/ethernet/marvell/octeontx2/af/rvu.c:735:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct rvu_fwdata *fwdata @@ got void [noderef] __iomem * @@
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:735:21: sparse: expected struct rvu_fwdata *fwdata
>> drivers/net/ethernet/marvell/octeontx2/af/rvu.c:735:21: sparse: got void [noderef] __iomem *
>> drivers/net/ethernet/marvell/octeontx2/af/rvu.c:741:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got struct rvu_fwdata *fwdata @@
>> drivers/net/ethernet/marvell/octeontx2/af/rvu.c:741:28: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:741:28: sparse: got struct rvu_fwdata *fwdata
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:754:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got struct rvu_fwdata *fwdata @@
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:754:28: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:754:28: sparse: got struct rvu_fwdata *fwdata
--
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c:840:21: sparse: sparse: cast removes address space '__iomem' of expression
vim +117 drivers/input/touchscreen/raspberrypi-ts.c
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 111
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 112 static void rpi_ts_dma_cleanup(void *data)
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 113 {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 114 struct rpi_ts *ts = data;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 115 struct device *dev = &ts->pdev->dev;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 116
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 @117 dma_free_coherent(dev, PAGE_SIZE, ts->fw_regs_va, ts->fw_regs_phys);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 118 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 119
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 120 static int rpi_ts_probe(struct platform_device *pdev)
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 121 {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 122 struct device *dev = &pdev->dev;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 123 struct device_node *np = dev->of_node;
bd88ce25335d23 Dmitry Torokhov 2019-10-29 124 struct input_dev *input;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 125 struct device_node *fw_node;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 126 struct rpi_firmware *fw;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 127 struct rpi_ts *ts;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 128 u32 touchbuf;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 129 int error;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 130
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 131 fw_node = of_get_parent(np);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 132 if (!fw_node) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 133 dev_err(dev, "Missing firmware node\n");
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 134 return -ENOENT;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 135 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 136
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 137 fw = rpi_firmware_get(fw_node);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 138 of_node_put(fw_node);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 139 if (!fw)
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 140 return -EPROBE_DEFER;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 141
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 142 ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 143 if (!ts)
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 144 return -ENOMEM;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 145 ts->pdev = pdev;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 146
750afb08ca7131 Luis Chamberlain 2019-01-04 @147 ts->fw_regs_va = dma_alloc_coherent(dev, PAGE_SIZE, &ts->fw_regs_phys,
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 148 GFP_KERNEL);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 149 if (!ts->fw_regs_va) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 150 dev_err(dev, "failed to dma_alloc_coherent\n");
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 151 return -ENOMEM;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 152 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 153
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 154 error = devm_add_action_or_reset(dev, rpi_ts_dma_cleanup, ts);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 155 if (error) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 156 dev_err(dev, "failed to devm_add_action_or_reset, %d\n", error);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 157 return error;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 158 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 159
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 160 touchbuf = (u32)ts->fw_regs_phys;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 161 error = rpi_firmware_property(fw, RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF,
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 162 &touchbuf, sizeof(touchbuf));
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 163
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 164 if (error || touchbuf != 0) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 165 dev_warn(dev, "Failed to set touchbuf, %d\n", error);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 166 return error;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 167 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 168
bd88ce25335d23 Dmitry Torokhov 2019-10-29 169 input = devm_input_allocate_device(dev);
bd88ce25335d23 Dmitry Torokhov 2019-10-29 170 if (!input) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 171 dev_err(dev, "Failed to allocate input device\n");
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 172 return -ENOMEM;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 173 }
bd88ce25335d23 Dmitry Torokhov 2019-10-29 174
bd88ce25335d23 Dmitry Torokhov 2019-10-29 175 ts->input = input;
bd88ce25335d23 Dmitry Torokhov 2019-10-29 176 input_set_drvdata(input, ts);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 177
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 178 input->name = "raspberrypi-ts";
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 179 input->id.bustype = BUS_HOST;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 180
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 181 input_set_abs_params(input, ABS_MT_POSITION_X, 0,
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 182 RPI_TS_DEFAULT_WIDTH, 0, 0);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 183 input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 184 RPI_TS_DEFAULT_HEIGHT, 0, 0);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 185 touchscreen_parse_properties(input, true, &ts->prop);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 186
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 187 error = input_mt_init_slots(input, RPI_TS_MAX_SUPPORTED_POINTS,
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 188 INPUT_MT_DIRECT);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 189 if (error) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 190 dev_err(dev, "could not init mt slots, %d\n", error);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 191 return error;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 192 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 193
bd88ce25335d23 Dmitry Torokhov 2019-10-29 194 error = input_setup_polling(input, rpi_ts_poll);
bd88ce25335d23 Dmitry Torokhov 2019-10-29 195 if (error) {
bd88ce25335d23 Dmitry Torokhov 2019-10-29 196 dev_err(dev, "could not set up polling mode, %d\n", error);
bd88ce25335d23 Dmitry Torokhov 2019-10-29 197 return error;
bd88ce25335d23 Dmitry Torokhov 2019-10-29 198 }
bd88ce25335d23 Dmitry Torokhov 2019-10-29 199
bd88ce25335d23 Dmitry Torokhov 2019-10-29 200 input_set_poll_interval(input, RPI_TS_POLL_INTERVAL);
bd88ce25335d23 Dmitry Torokhov 2019-10-29 201
bd88ce25335d23 Dmitry Torokhov 2019-10-29 202 error = input_register_device(input);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 203 if (error) {
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 204 dev_err(dev, "could not register input device, %d\n", error);
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 205 return error;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 206 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 207
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 208 return 0;
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 209 }
0b9f28fed3f70f Nicolas Saenz Julienne 2018-12-21 210
:::::: The code at line 117 was first introduced by commit
:::::: 0b9f28fed3f70ff9a0380fe308739dd72a30a6f6 Input: add official Raspberry Pi's touchscreen driver
:::::: TO: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
:::::: CC: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
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" (41462 bytes)
Powered by blists - more mailing lists