Re: [PATCH net-next v2 4/8] net: rpmsg-eth: Add basic rpmsg skeleton

kernel test robot
2025-09-03T16:16:32Z

Hi MD,

kernel test robot noticed the following build errors:

[auto build test ERROR on 2fd4161d0d2547650d9559d57fc67b4e0a26a9e3]

url: https://github.com/intel-lab-lkp/linux/commits/MD-Danish-Anwar/dt-bindings-net-ti-rpmsg-eth-Add-DT-binding-for-RPMSG-ETH/20250902-171411
base: 2fd4161d0d2547650d9559d57fc67b4e0a26a9e3
patch link: https://lore.kernel.org/r/20250902090746.3221225-5-danishanwar%40ti.com
patch subject: [PATCH net-next v2 4/8] net: rpmsg-eth: Add basic rpmsg skeleton
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20250903/202509032343.1y6JMbSq-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250903/202509032343.1y6JMbSq-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509032343.1y6JMbSq-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

drivers/net/ethernet/rpmsg_eth.c: In function 'rpmsg_eth_get_shm_info':
>> drivers/net/ethernet/rpmsg_eth.c:88:29: error: implicit declaration of function 'devm_ioremap' [-Werror=implicit-function-declaration]
88 | common->port->shm = devm_ioremap(common->dev, rmem->base, rmem->size);
| ^~~~~~~~~~~~
>> drivers/net/ethernet/rpmsg_eth.c:88:27: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
88 | common->port->shm = devm_ioremap(common->dev, rmem->base, rmem->size);
| ^
cc1: some warnings being treated as errors

vim +/devm_ioremap +88 drivers/net/ethernet/rpmsg_eth.c

34
35 /**
36 * rpmsg_eth_get_shm_info - Retrieve shared memory region for RPMsg Ethernet
37 * @common: Pointer to rpmsg_eth_common structure
38 *
39 * This function locates and maps the reserved memory region for the RPMsg
40 * Ethernet device by traversing the device tree hierarchy. It first identifies
41 * the associated remote processor (rproc), then locates the "rpmsg-eth" child
42 * node within the rproc's device tree node, and finally retrieves the
43 * "memory-region" phandle that points to the reserved memory region.
44 * Once found, the shared memory region is mapped into the
45 * kernel's virtual address space using devm_ioremap()
46 *
47 * Return: 0 on success, negative error code on failure.
48 */
49 static int rpmsg_eth_get_shm_info(struct rpmsg_eth_common *common)
50 {
51 struct device_node *np, *rpmsg_eth_node, *rmem_np;
52 struct reserved_mem *rmem;
53 struct rproc *rproc;
54
55 /* Get the remote processor associated with this device */
56 rproc = rproc_get_by_child(&common->rpdev->dev);
57 if (!rproc) {
58 dev_err(common->dev, "rpmsg eth device not child of rproc\n");
59 return -EINVAL;
60 }
61
62 /* Get the device node from rproc or its parent */
63 np = rproc->dev.of_node ?: (rproc->dev.parent ? rproc->dev.parent->of_node : NULL);
64 if (!np) {
65 dev_err(common->dev, "Cannot find rproc device node\n");
66 return -ENODEV;
67 }
68
69 /* Get the rpmsg-eth child node */
70 rpmsg_eth_node = of_get_child_by_name(np, "rpmsg-eth");
71 if (!rpmsg_eth_node) {
72 dev_err(common->dev, "Couldn't get rpmsg-eth node from np\n");
73 return -ENODEV;
74 }
75
76 /* Parse the memory-region phandle */
77 rmem_np = of_parse_phandle(rpmsg_eth_node, "memory-region", 0);
78 of_node_put(rpmsg_eth_node);
79 if (!rmem_np)
80 return -EINVAL;
81
82 /* Lookup the reserved memory region */
83 rmem = of_reserved_mem_lookup(rmem_np);
84 of_node_put(rmem_np);
85 if (!rmem)
86 return -EINVAL;
87
> 88 common->port->shm = devm_ioremap(common->dev, rmem->base, rmem->size);
89 if (IS_ERR(common->port->shm))
90 return PTR_ERR(common->port->shm);
91
92 common->port->buf_size = rmem->size;
93
94 return 0;
95 }
96

--
0-DAY CI Kernel Test Service