]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: ldpaa_eth: transform dpni_statistics from a struct to a union
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 23 May 2023 13:47:44 +0000 (16:47 +0300)
committerPeng Fan <peng.fan@nxp.com>
Wed, 14 Jun 2023 10:40:16 +0000 (18:40 +0800)
commit13ca5c2f56a172a3df1d5b84a084ed437ea26cde
tree430e4914fa8e32ca2ee7a49c2496d9d4fb64048b
parent3e697627400fea74f2d4c5e63dac31eb557e9a83
net: ldpaa_eth: transform dpni_statistics from a struct to a union

In order to simplify code, dpni_statistics can be written as a union.
Using the raw accessors we can just loop through all the statistics from
a page without trying to access each an every one independently.
Make this change to a union.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/net/fsl-mc/dpni.c
drivers/net/ldpaa_eth/ldpaa_eth.c
include/fsl-mc/fsl_dpni.h