From: kernel test robot <lkp@xxxxxxxxx> drivers/phy/microchip/sparx5_serdes.c:2440:54-57: ERROR: Missing resource_size with iores Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Fixes: 2ff8a1eeb5aa ("phy: Add Sparx5 ethernet serdes PHY driver") CC: Steen Hegelund <steen.hegelund@xxxxxxxxxxxxx> Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: kernel test robot <lkp@xxxxxxxxx> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ba5b053ab3ac674b91a6669086139819359a5e6e commit: 2ff8a1eeb5aa8bb471f3756a695b8b69841eb61f [4647/5413] phy: Add Sparx5 ethernet serdes PHY driver sparx5_serdes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/phy/microchip/sparx5_serdes.c +++ b/drivers/phy/microchip/sparx5_serdes.c @@ -2437,7 +2437,7 @@ static int sparx5_serdes_probe(struct pl priv->coreclock = clock; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iomem = devm_ioremap(priv->dev, iores->start, iores->end - iores->start + 1); + iomem = devm_ioremap(priv->dev, iores->start, resource_size(iores)); if (IS_ERR(iomem)) { dev_err(priv->dev, "Unable to get serdes registers: %s\n", iores->name);