power: resource_size() instead of computation
PATCH 1/1 power: resource_size() instead of computation
Patch found using coccinelle.
Signed-off-by Andrei Epure <[email protected]>
--- drivers/power/goldfish_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/goldfish_battery.c +1 -1
@@ -178,7 +178,7 @@ static int goldfish_battery_probe(struct platform_device *pdev)return -ENODEV ; } - data->reg_base =devm_ioremap (&pdev->dev, r->start, r->end - r->start +1 ); + data->reg_base =devm_ioremap (&pdev->dev, r->start,resource_size (r));if (data->reg_base ==NULL ) {dev_err (&pdev->dev,"unable to remap MMIO\n" );return -ENOMEM ;
Signature · 1 line
1.7.9.5
Quoted 4 lines · Andrei Epure
Patch found using coccinelle.
Signed-off-by Andrei Epure <[email protected]>---
Silviu-Mihai Popescu sent a similar patch ealier, but I added your Signed-off-by to the commit.
Quoted 18 lines
drivers/power/goldfish_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/goldfish_battery.c +1
-1@@ -178,7 +178,7 @@ static int goldfish_battery_probe(struct platform_device *pdev)return -ENODEV ; } - data->reg_base =devm_ioremap (&pdev->dev, r->start, r->end - r->start +1 ); + data->reg_base =devm_ioremap (&pdev->dev, r->start,resource_size (r));if (data->reg_base ==NULL ) {dev_err (&pdev->dev,"unable to remap MMIO\n" );return -ENOMEM ;Signature · 1 line
1.7.9.5