mfd: altera-sysmgr: Use resource_size function on resource object
PATCH 1/1 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 <[email protected]>
--- drivers/mfd/altera-sysmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/altera-sysmgr.c +1 -1
@@ -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); }
Signature · 1 line
2.6.2
Lee Jones
AppliedQuoted 8 lines · Zou Wei
./drivers/mfd/altera-sysmgr.c:155:36-39: WARNING: Suspicious code.
resource_sizeis maybe missing with resGenerated by:
scripts/coccinelle/api/resource_size.cocciSigned-off-by Zou Wei <[email protected]>--- drivers/mfd/altera-sysmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog