* [PATCH net-next] net: mscc: ocelot: fix __ocelot_rmw_ix prototype
@ 2019-11-05 22:01 Vladimir Oltean
2019-11-06 23:34 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2019-11-05 22:01 UTC (permalink / raw)
To: jakub.kicinski, davem; +Cc: alexandre.belloni, netdev, Vladimir Oltean
The "read-modify-write register index" function is declared with a
confusing prototype: the "mask" and "reg" arguments are swapped.
Fortunately, this does not affect callers so far. Both arguments are
u32, and the wrapper macros (ocelot_rmw_ix etc) have the arguments in
the correct order (the one from ocelot_io.c).
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
drivers/net/ethernet/mscc/ocelot.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h
index 8dbe84add3cf..ea1ff68f0ce4 100644
--- a/drivers/net/ethernet/mscc/ocelot.h
+++ b/drivers/net/ethernet/mscc/ocelot.h
@@ -525,7 +525,7 @@ void __ocelot_write_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 offset);
#define ocelot_write_rix(ocelot, val, reg, ri) __ocelot_write_ix(ocelot, val, reg, reg##_RSZ * (ri))
#define ocelot_write(ocelot, val, reg) __ocelot_write_ix(ocelot, val, reg, 0)
-void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 reg, u32 mask,
+void __ocelot_rmw_ix(struct ocelot *ocelot, u32 val, u32 mask, u32 reg,
u32 offset);
#define ocelot_rmw_ix(ocelot, val, m, reg, gi, ri) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi) + reg##_RSZ * (ri))
#define ocelot_rmw_gix(ocelot, val, m, reg, gi) __ocelot_rmw_ix(ocelot, val, m, reg, reg##_GSZ * (gi))
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: mscc: ocelot: fix __ocelot_rmw_ix prototype
2019-11-05 22:01 [PATCH net-next] net: mscc: ocelot: fix __ocelot_rmw_ix prototype Vladimir Oltean
@ 2019-11-06 23:34 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-06 23:34 UTC (permalink / raw)
To: olteanv; +Cc: jakub.kicinski, alexandre.belloni, netdev
From: Vladimir Oltean <olteanv@gmail.com>
Date: Wed, 6 Nov 2019 00:01:40 +0200
> The "read-modify-write register index" function is declared with a
> confusing prototype: the "mask" and "reg" arguments are swapped.
>
> Fortunately, this does not affect callers so far. Both arguments are
> u32, and the wrapper macros (ocelot_rmw_ix etc) have the arguments in
> the correct order (the one from ocelot_io.c).
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
I ended up applying this to 'net' but will not queue it up for -stable.
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 22:01 [PATCH net-next] net: mscc: ocelot: fix __ocelot_rmw_ix prototype Vladimir Oltean
2019-11-06 23:34 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).