mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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:
parent
83180af0b0
commit
a7855c78a2
2 changed files with 9 additions and 17 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue