From: kernel test robot <lkp@intel.com>
To: Steen Hegelund <steen.hegelund@microchip.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Vinod Koul <vkoul@kernel.org>,
Bjarni Jonasson <bjarni.jonasson@microchip.com>,
Andrew Lunn <andrew@lunn.ch>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
UNGLinuxDriver@microchip.com, linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] phy: fix resource_size.cocci warnings
Date: Fri, 19 Mar 2021 07:28:44 +0800 [thread overview]
Message-ID: <20210318232844.GA65886@63b0c5462fda> (raw)
In-Reply-To: <202103190711.pUzuZRzG-lkp@intel.com>
From: kernel test robot <lkp@intel.com>
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>
---
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);
next prev parent reply other threads:[~2021-03-18 23:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 23:28 [linux-next:master 4647/5413] drivers/phy/microchip/sparx5_serdes.c:2440:54-57: ERROR: Missing resource_size with iores kernel test robot
2021-03-18 23:28 ` kernel test robot [this message]
2021-04-06 5:09 ` [PATCH] phy: fix resource_size.cocci warnings Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318232844.GA65886@63b0c5462fda \
--to=lkp@intel.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=bjarni.jonasson@microchip.com \
--cc=kbuild-all@lists.01.org \
--cc=kishon@ti.com \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linux-phy@lists.infradead.org \
--cc=steen.hegelund@microchip.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).