Re: [PATCH 1/2] net/fsl_pq_mdio: check TBI address for consistency with mapped range

From: kbuild test robot
Date: Fri Oct 09 2015 - 13:40:11 EST


Hi Gerlando,

[auto build test WARNING on net/master -- if it's inappropriate base, please ignore]

config: powerpc-tqm8541_defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc

All warnings (new ones prefixed by >>):

drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
>> drivers/net/ethernet/freescale/fsl_pq_mdio.c:454:14: warning: comparison of distinct pointer types lacks a cast
if (tbipa > priv->map + resource_size(&res))
^

vim +454 drivers/net/ethernet/freescale/fsl_pq_mdio.c

438 if (!prop) {
439 dev_err(&pdev->dev,
440 "missing 'reg' property in node %s\n",
441 tbi->full_name);
442 err = -EBUSY;
443 goto error;
444 }
445
446 tbipa = data->get_tbipa(priv->map);
447
448 /*
449 * Add consistency check to make sure TBI is contained
450 * within the mapped range (not because we would get a
451 * segfault, rather to catch bugs in computing TBI
452 * address). Print error message but continue anyway.
453 */
> 454 if (tbipa > priv->map + resource_size(&res))
455 dev_err(&pdev->dev, "invalid register map (should be at least 0x%04x to contain TBI address)\n",
456 ((void *)tbipa - priv->map) + 4);
457
458 iowrite32be(be32_to_cpup(prop), tbipa);
459 }
460 }
461
462 if (data->ucc_configure)

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data