]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4032c9481dd2e9296085a8aea729a72a799ee84c
tree986f4040642244f961c9adbd7b99b3d58caf7504
parentc0848cdb7d56d808b08897e6eb0ef9e207f260e3
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