net: sun8i_emac: Wrap and simplify cache maintenance operations
authorAndre Przywara <andre.przywara@arm.com>
Mon, 6 Jul 2020 00:40:40 +0000 (01:40 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 21 Oct 2020 18:14:27 +0000 (23:44 +0530)
commit8c274ec0924e81f60f154a17465f48dccbae3639
tree36b36ce242d4c0bdfab84ac997790950817dbfe8
parenteaeadb50ea4d65e6fdbde7224b089dca6a41ff1e
net: sun8i_emac: Wrap and simplify cache maintenance operations

To meet the current alignment requirements for our cache maintenance
functions, we were explicitly aligning the *arguments* to those calls.
This is not only ugly to read, but also wrong, as we need to make sure
we are not accidentally stepping on other data.

Provide wrapper functions for the common case of cleaning or
invalidating a descriptor, to make the cache maintenance calls more
readable. This fixes a good deal of the problematic calls.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Amit Singh Tomar <amittomer25@gmail.com> # Pine64+
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/net/sun8i_emac.c