diff options
author | Zou Wei <zou_wei@huawei.com> | 2020-11-14 10:24:20 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-11-27 08:40:35 +0100 |
commit | d12edf9661a408d04efc9c0a4ff9a15413195d8a (patch) | |
tree | 5adbf492807333e255d22aec3c3bb918e5ce4915 /drivers/mfd | |
parent | mfd: cpcap: Fix interrupt regression with regmap clear_ack (diff) | |
download | linux-d12edf9661a408d04efc9c0a4ff9a15413195d8a.tar.xz linux-d12edf9661a408d04efc9c0a4ff9a15413195d8a.zip |
mfd: altera-sysmgr: Use resource_size function on resource object
drivers/mfd/altera-sysmgr.c:155:36-39: WARNING: Suspicious code. resource_size is maybe missing with res
Generated by: scripts/coccinelle/api/resource_size.cocci
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/altera-sysmgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c index 41076d121dd5..193a96c8b1ea 100644 --- a/drivers/mfd/altera-sysmgr.c +++ b/drivers/mfd/altera-sysmgr.c @@ -152,7 +152,7 @@ static int sysmgr_probe(struct platform_device *pdev) if (!base) return -ENOMEM; - sysmgr_config.max_register = res->end - res->start - 3; + sysmgr_config.max_register = resource_size(res) - 3; regmap = devm_regmap_init_mmio(dev, base, &sysmgr_config); } |