* [linux-arm:cex7 92/97] drivers/net/ethernet/freescale/xgmac_mdio.c:262:25: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2020-02-06 14:50 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-02-06 14:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4367 bytes --]
tree: git://git.armlinux.org.uk/~rmk/linux-arm cex7
head: 2f8726526ed0fd189f8a945c06f8b9850777a5ca
commit: 3c4c60c5729d166b5d864902e3f225713beb3b5d [92/97] net: xgmac_mdio: allow ethernet drivers to create mdio buses
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-154-g1dc00f87-dirty
git checkout 3c4c60c5729d166b5d864902e3f225713beb3b5d
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/freescale/xgmac_mdio.c:262:25: sparse: sparse: incorrect type in assignment (different address spaces)
>> drivers/net/ethernet/freescale/xgmac_mdio.c:262:25: sparse: expected struct tgec_mdio_controller [noderef] <asn:2> *mdio_base
>> drivers/net/ethernet/freescale/xgmac_mdio.c:262:25: sparse: got void *base
drivers/net/ethernet/freescale/xgmac_mdio.c:287:14: sparse: sparse: incorrect type in assignment (different address spaces)
>> drivers/net/ethernet/freescale/xgmac_mdio.c:287:14: sparse: expected void *base
>> drivers/net/ethernet/freescale/xgmac_mdio.c:287:14: sparse: got void [noderef] <asn:2> *
drivers/net/ethernet/freescale/xgmac_mdio.c:315:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/freescale/xgmac_mdio.c:315:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/net/ethernet/freescale/xgmac_mdio.c:315:17: sparse: got void *base
drivers/net/ethernet/freescale/xgmac_mdio.c:325:20: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/freescale/xgmac_mdio.c:325:20: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/net/ethernet/freescale/xgmac_mdio.c:325:20: sparse: got void *priv
vim +262 drivers/net/ethernet/freescale/xgmac_mdio.c
243
244 struct mii_bus *xgmac_mdio_bus_create(struct device *parent,
245 unsigned long long id,
246 void *base, bool is_little_endian)
247 {
248 struct mdio_fsl_priv *priv;
249 struct mii_bus *bus;
250
251 bus = mdiobus_alloc_size(sizeof(struct mdio_fsl_priv));
252 if (!bus)
253 return NULL;
254
255 bus->name = "Freescale XGMAC MDIO Bus";
256 bus->read = xgmac_mdio_read;
257 bus->write = xgmac_mdio_write;
258 bus->parent = parent;
259 snprintf(bus->id, MII_BUS_ID_SIZE, "%llx", id);
260
261 priv = bus->priv;
> 262 priv->mdio_base = base;
263 priv->is_little_endian = is_little_endian;
264
265 return bus;
266 }
267 EXPORT_SYMBOL_GPL(xgmac_mdio_bus_create);
268
269 static int xgmac_mdio_probe(struct platform_device *pdev)
270 {
271 struct device_node *np = pdev->dev.of_node;
272 struct mdio_fsl_priv *priv;
273 bool is_little_endian;
274 struct mii_bus *bus;
275 struct resource res;
276 void *base;
277 int ret;
278
279 ret = of_address_to_resource(np, 0, &res);
280 if (ret) {
281 dev_err(&pdev->dev, "could not obtain address\n");
282 return ret;
283 }
284
285 is_little_endian = of_property_read_bool(np, "little-endian");
286
> 287 base = of_iomap(np, 0);
288 if (!base)
289 return -ENOMEM;
290
291 bus = xgmac_mdio_bus_create(&pdev->dev, res.start, base,
292 is_little_endian);
293 if (!bus) {
294 ret = -ENOMEM;
295 goto err_create;
296 }
297
298 priv = bus->priv;
299 priv->has_a011043 = of_property_read_bool(pdev->dev.of_node,
300 "fsl,erratum-a011043");
301
302 ret = of_mdiobus_register(bus, np);
303 if (ret) {
304 dev_err(&pdev->dev, "cannot register MDIO bus\n");
305 goto err_registration;
306 }
307
308 platform_set_drvdata(pdev, bus);
309
310 return 0;
311
312 err_registration:
313 mdiobus_free(bus);
314 err_create:
315 iounmap(base);
316
317 return ret;
318 }
319
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-06 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-06 14:50 [linux-arm:cex7 92/97] drivers/net/ethernet/freescale/xgmac_mdio.c:262:25: sparse: sparse: incorrect type in assignment (different address spaces) kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.