* [linux-next:master 4647/5413] drivers/phy/microchip/sparx5_serdes.c:2440:54-57: ERROR: Missing resource_size with iores
@ 2021-03-18 23:28 kernel test robot
2021-03-18 23:28 ` [PATCH] phy: fix resource_size.cocci warnings kernel test robot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-18 23:28 UTC (permalink / raw)
To: Steen Hegelund
Cc: kbuild-all, Linux Memory Management List, Vinod Koul,
Bjarni Jonasson, Andrew Lunn, Alexandre Belloni
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
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
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cocci warnings: (new ones prefixed by >>)
>> drivers/phy/microchip/sparx5_serdes.c:2440:54-57: ERROR: Missing resource_size with iores
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65477 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] phy: fix resource_size.cocci warnings
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
2021-04-06 5:09 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-18 23:28 UTC (permalink / raw)
To: Steen Hegelund
Cc: kbuild-all, Linux Memory Management List, Vinod Koul,
Bjarni Jonasson, Andrew Lunn, Alexandre Belloni,
Kishon Vijay Abraham I, Lars Povlsen, UNGLinuxDriver, linux-phy,
linux-arm-kernel
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: fix resource_size.cocci warnings
2021-03-18 23:28 ` [PATCH] phy: fix resource_size.cocci warnings kernel test robot
@ 2021-04-06 5:09 ` Vinod Koul
0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2021-04-06 5:09 UTC (permalink / raw)
To: kernel test robot
Cc: Steen Hegelund, kbuild-all, Linux Memory Management List,
Bjarni Jonasson, Andrew Lunn, Alexandre Belloni,
Kishon Vijay Abraham I, Lars Povlsen, UNGLinuxDriver, linux-phy,
linux-arm-kernel
On 19-03-21, 07:28, kernel test robot wrote:
> 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
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-06 5:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] phy: fix resource_size.cocci warnings kernel test robot
2021-04-06 5:09 ` Vinod Koul
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).