Commit 5be271ff authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

staging: fsl-mc: fix resource_size.cocci warnings

 Use resource_size function on resource object
 instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Fixes: a037b7ec2eb7 ("staging: fsl-mc: allow the driver compile multi-arch")
CC: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03274850
......@@ -242,8 +242,7 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
goto error_cleanup_resource;
mc_portal_phys_addr = dpmcp_dev->regions[0].start;
mc_portal_size = dpmcp_dev->regions[0].end -
dpmcp_dev->regions[0].start + 1;
mc_portal_size = resource_size(dpmcp_dev->regions);
if (WARN_ON(mc_portal_size != mc_bus_dev->mc_io->portal_size))
goto error_cleanup_resource;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment