]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Use standardized style for the virtio/net.c driver
authorIngo Molnar <mingo@elte.hu>
Thu, 12 May 2011 08:09:29 +0000 (10:09 +0200)
committerPekka Enberg <penberg@kernel.org>
Thu, 12 May 2011 13:31:08 +0000 (16:31 +0300)
commitf5105efb41e9203601cd930ad12bb6eaf63f4900
treeb63af2d74b5c016a1e5c057709f46688f5f88960
parent3fa33a28adf31f1b9edd4080a71950ae534ae919
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: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio/net.c