Skip to content

Commit

Permalink
net: fjes: Use resource_size
Browse files Browse the repository at this point in the history
Use the function resource_size instead of explicit computation.

Problem found using Coccinelle.

Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vaishali Thakkar authored and David S. Miller committed Apr 11, 2016
1 parent 3484f44 commit e0897ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/fjes/fjes_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ static int fjes_probe(struct platform_device *plat_dev)

res = platform_get_resource(plat_dev, IORESOURCE_MEM, 0);
hw->hw_res.start = res->start;
hw->hw_res.size = res->end - res->start + 1;
hw->hw_res.size = resource_size(res);
hw->hw_res.irq = platform_get_irq(plat_dev, 0);
err = fjes_hw_init(&adapter->hw);
if (err)
Expand Down

0 comments on commit e0897ae

Please sign in to comment.