[stefandoesinger-zx297520:dlink 61/130] drivers/rpmsg/zx29_smd.c:239:59: warning: cast from pointer to integer of different size
kernel test robot <[email protected]> Tue, 28 Jul 2026 15:32:34 +0800
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://gitlab.com/stefandoesinger/zx297520-kernel dlink head: 3d8eb1c72ad9937912307a2d4f3de812b572b9b3 commit: 6904c8e1cb964bc77f9786b792cd229478848e40 [61/130] more mbox stuff stuff config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260728/[email protected]/config) compiler: alpha-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): In file included from include/linux/device.h:15, from include/linux/platform_device.h:13, from drivers/rpmsg/zx29_smd.c:8: drivers/rpmsg/zx29_smd.c: In function 'zx29_smd_probe': >> drivers/rpmsg/zx29_smd.c:239:59: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 239 | dev_info(&pdev->dev, "zx29_smd->data_r 0x%08x\n", (unsigned int)zx29_smd->data_r); | ^ include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/rpmsg/zx29_smd.c:239:9: note: in expansion of macro 'dev_info' 239 | dev_info(&pdev->dev, "zx29_smd->data_r 0x%08x\n", (unsigned int)zx29_smd->data_r); | ^~~~~~~~ drivers/rpmsg/zx29_smd.c:262:59: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 262 | dev_info(&pdev->dev, "zx29_smd->data_s 0x%08x\n", (unsigned int)zx29_smd->data_s); | ^ include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap' 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/rpmsg/zx29_smd.c:262:9: note: in expansion of macro 'dev_info' 262 | dev_info(&pdev->dev, "zx29_smd->data_s 0x%08x\n", (unsigned int)zx29_smd->data_s); | ^~~~~~~~ drivers/rpmsg/zx29_smd.c: At top level: drivers/rpmsg/zx29_smd.c:146:13: warning: 'zx29_smd_release_device' defined but not used [-Wunused-function] 146 | static void zx29_smd_release_device(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~ vim +239 drivers/rpmsg/zx29_smd.c 203 204 static int zx29_smd_probe(struct platform_device *pdev) 205 { 206 struct device *dev = &pdev->dev; 207 struct zx29_smd *zx29_smd; 208 struct device_node *sram; 209 struct resource res; 210 u32 channel; 211 int ret; 212 213 ret = of_property_read_u32(pdev->dev.of_node, "zte,rpmsg-channel", &channel); 214 if (ret) { 215 dev_err(&pdev->dev, "Invalid rpmsg channel entry\n"); 216 return ret; 217 } 218 219 zx29_smd = devm_kzalloc(dev, sizeof(*zx29_smd), GFP_KERNEL); 220 if (!zx29_smd) 221 return -ENOMEM; 222 zx29_smd->pdev = pdev; 223 dev_info(&pdev->dev, "Hello rpmsg\n"); 224 225 sram = of_parse_phandle(pdev->dev.of_node, "sram", 0); 226 if (!sram) { 227 dev_info(dev, "no sram\n"); 228 return -EINVAL; 229 } 230 of_address_to_resource(sram, 0, &res); 231 zx29_smd->recv = devm_memremap(dev, res.start + channel * sizeof(struct zx29_channel_hdr), 232 sizeof(struct zx29_channel_hdr), MEMREMAP_WB); 233 234 if (!(zx29_smd->recv->flags & 1)) { 235 dev_info(&pdev->dev, "Receive channel not created by remote end\n"); 236 return -ENODEV; 237 } 238 zx29_smd->data_r = devm_memremap(dev, zx29_smd->recv->base, zx29_smd->recv->size, MEMREMAP_WB); > 239 dev_info(&pdev->dev, "zx29_smd->data_r 0x%08x\n", (unsigned int)zx29_smd->data_r); 240 241 zx29_smd->rpdev.ops = &zx29_smd_device_ops; 242 zx29_smd->rpdev.src = channel; 243 zx29_smd->rpdev.dst = channel; 244 zx29_smd->rpdev.announce = true; 245 strscpy(zx29_smd->rpdev.id.name, "rpmsg-tty", RPMSG_NAME_SIZE); 246 zx29_smd->rpdev.dev.parent = &pdev->dev; 247 248 sram = of_parse_phandle(pdev->dev.of_node, "sram", 1); 249 if (!sram) 250 return -EINVAL; 251 of_address_to_resource(sram, 0, &res); 252 zx29_smd->send = devm_memremap(dev, res.start + channel * sizeof(struct zx29_channel_hdr), 253 sizeof(struct zx29_channel_hdr), MEMREMAP_WB); 254 255 /* FIXME: Create channel infrastructure. */ 256 zx29_smd->send->base = 0x82000000; 257 zx29_smd->send->recv_pos = zx29_smd->send->send_pos = 0; 258 zx29_smd->send->size = 0x20; 259 zx29_smd->send->flags = 1; 260 zx29_smd->send->end = 0; 261 zx29_smd->data_s = devm_memremap(dev, zx29_smd->send->base, zx29_smd->send->size, MEMREMAP_WB); 262 dev_info(&pdev->dev, "zx29_smd->data_s 0x%08x\n", (unsigned int)zx29_smd->data_s); 263 264 zx29_smd->mbox_client.dev = &pdev->dev; 265 zx29_smd->mbox_client.rx_callback = zx29_smd_rx_callback; 266 zx29_smd->mbox_client.tx_block = true; 267 zx29_smd->mbox_client.tx_tout = 500; 268 zx29_smd->mbox_client.tx_done = txdone; 269 zx29_smd->mbox_client.knows_txdone = false; 270 271 return rpmsg_register_device(&zx29_smd->rpdev); 272 } 273 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki