gianfar: code cleanups
Subsystems (2)
PATCH 1/1 gianfar: code cleanups
This patch:
# moves if_vlan.h include from gianfar.c to gianfar.h # improves readability of some gianfar nfc code
Signed-off-by Sebastian Poehn <[email protected]>
---
drivers/net/gianfar.c | 1 - drivers/net/gianfar.h | 2 + drivers/net/gianfar_ethtool.c | 51 +++++++++++++++++++++------------------- 3 files changed, 29 insertions(+), 25 deletions(-)
drivers/net/gianfar.c +0 -1
@@ -76,7 +76,6 @@#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/skbuff.h> -#include <linux/if_vlan.h> #include <linux/spinlock.h> #include <linux/mm.h> #include <linux/of_mdio.h>
drivers/net/gianfar.h +2 -0
@@ -38,6 +38,7 @@#include <linux/mm.h> #include <linux/mii.h> #include <linux/phy.h> +#include <linux/if_vlan.h> #include <asm/io.h> #include <asm/irq.h>
@@ -409,6 +410,7 @@ extern const char gfar_driver_version[];#define RQFCR_HASHTBL_2 0x00060000#define RQFCR_HASHTBL_3 0x00080000#define RQFCR_HASH 0x00010000 +#define RQFCR_QUEUE 0x0000FC00#define RQFCR_CLE 0x00000200#define RQFCR_RJE 0x00000100#define RQFCR_AND 0x00000080
drivers/net/gianfar_ethtool.c +27 -24
89 lines not on this page · raw message
David Miller
maintainerFrom: "Sebastian Pöhn" <[email protected]>
Date: Fri, 01 Jul 2011 11:00:43 +0200
Quoted 1 line
# moves if_vlan.h include from gianfar.c to gianfar.h
Please don't do this, keep the explicit includes as close to the actual dependencies as possible. With your change all of the other source files will load in and parse if_vlan.h even though they have no need for it.