diff options
author | Cihangir Akturk <cakturk@gmail.com> | 2017-08-02 11:18:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 15:18:25 -0700 |
commit | a2730bc73542e60393e0f7d92e061c9e18c2056b (patch) | |
tree | 2f1ac86ecf5fdce1903ef6db4d528c2ad401dbcd | |
parent | 8652892ed44914edfb488c280ccf79301fd89117 (diff) |
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>
-rw-r--r-- | drivers/staging/fsl-mc/bus/dprc-driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 4cdd190a338b..485abad0f32f 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -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, |