fsl/fman: use resource_size
authorJulia Lawall <Julia.Lawall@inria.fr>
Wed, 1 Jan 2020 17:49:44 +0000 (18:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 00:31:03 +0000 (16:31 -0800)
commita02158d62faa19d3cad8caf481253998a6c47934
tree986f4040642244f961c9adbd7b99b3d58caf7504
parent6485f9ae3b96edeb2513528a6ad4fd77ee7bafc2
fsl/fman: use resource_size

Use resource_size rather than a verbose computation on
the end and start fields.

The semantic patch that makes these changes is as follows:
(http://coccinelle.lip6.fr/)

<smpl>
@@ struct resource ptr; @@
- (ptr.end + 1 - ptr.start)
+ resource_size(&ptr)

@@ struct resource *ptr; @@
- (ptr->end + 1 - ptr->start)
+ resource_size(ptr)
</smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/mac.c