mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
staging: fsl-mc: fix resource_size.cocci warnings
Use resource_size() function on resource objects instead of explicit computation. This patch fixes the following coccinelle warning: drivers/staging/fsl-mc/bus/dprc-driver.c:620:35-38: ERROR: Missing resource_size with mc_dev -> regions Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8652892ed4
commit
a2730bc735
1 changed files with 1 additions and 2 deletions
|
@ -617,8 +617,7 @@ static int dprc_probe(struct fsl_mc_device *mc_dev)
|
|||
if (WARN_ON(mc_dev->obj_desc.region_count == 0))
|
||||
return -EINVAL;
|
||||
|
||||
region_size = mc_dev->regions[0].end -
|
||||
mc_dev->regions[0].start + 1;
|
||||
region_size = resource_size(mc_dev->regions);
|
||||
|
||||
error = fsl_create_mc_io(&mc_dev->dev,
|
||||
mc_dev->regions[0].start,
|
||||
|
|
Loading…
Reference in a new issue