net: loopback driver cleanup
loopback driver uses dev->ml_priv to store its percpu stats pointer. It uses ugly casts "(void __percpu __force *)" to shut up sparse complains. Define an union to better document we use ml_priv in loopback driver and define a lstats field with appropriate types. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
83180af0b0
commit
a7855c78a2
@@ -1050,8 +1050,10 @@ struct net_device {
|
||||
#endif
|
||||
|
||||
/* mid-layer private */
|
||||
void *ml_priv;
|
||||
|
||||
union {
|
||||
void *ml_priv;
|
||||
struct pcpu_lstats __percpu *lstats; /* loopback stats */
|
||||
};
|
||||
/* GARP */
|
||||
struct garp_port *garp_port;
|
||||
|
||||
|
Reference in New Issue
Block a user