summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-03-19 02:28:44 +0300
committerVinod Koul <vkoul@kernel.org>2021-04-06 08:09:20 +0300
commitcbc336c09b6d6dfb24d20c955599123308fa2fe2 (patch)
treefd9bb15d1576659f8b140a1baaec80fa459a5a27 /drivers
parent8595ffb52fa3a1dd8620f0029a0e22ee37efd17f (diff)
downloadlinux-cbc336c09b6d6dfb24d20c955599123308fa2fe2.tar.xz
phy: fix resource_size.cocci warnings
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@microchip.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210318232844.GA65886@63b0c5462fda Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/phy/microchip/sparx5_serdes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/microchip/sparx5_serdes.c b/drivers/phy/microchip/sparx5_serdes.c
index 338a4220b45f..c8a7d0927ced 100644
--- a/drivers/phy/microchip/sparx5_serdes.c
+++ b/drivers/phy/microchip/sparx5_serdes.c
@@ -2470,7 +2470,7 @@ static int sparx5_serdes_probe(struct platform_device *pdev)
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);