Skip to content
Commit c229370a authored by Ingo Molnar's avatar Ingo Molnar Committed by Will Deacon
Browse files

kvm tools: Use standardized style for the virtio/net.c driver



I had a quick look at virtio/net.c and it still had quite many style
inefficiencies - all of which are patterns which i pointed out before:

 - use short names for devices within the driver, so not 'net_device' but
   'ndev' - everyone hacking net.c knows that this is the network driver so
   'ndev' is a self-explanatory (and very short) term of art ...

 - use 'pci_header' instead of the ambiguous and misleading
   'virtio_net_pci_device' naming.

 - do not repeat 'net' in struct net_device fields! So rename ndev->net_config
   to ndev->config.

 - In the kernel we generally use _lock names for mutexes. This is conceptually
   more generic. So rename the net device mutexes accordingly.

 - group #include lines in a topical way instead of a random mess

 - fix vertical alignment mismatches

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent b0b42ba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment