diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-01-13 21:09:40 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 08:39:11 -0500 |
commit | 26df54bffd90977fbc6fe8284f2beaed19fea44f (patch) | |
tree | 008deacb21a6ef3769213e142255d31dce2a5ddd | |
parent | f03aa2d89ad600a1ed21a223f196776f217cfe00 (diff) |
[PATCH] drivers/net/s2io.c: make code static
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/net/s2io.c | 22 | ||||
-rw-r--r-- | drivers/net/s2io.h | 17 |
2 files changed, 18 insertions, 21 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 89c46787676c..41c75616e913 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -72,8 +72,8 @@ | |||
72 | static char s2io_driver_name[] = "Neterion"; | 72 | static char s2io_driver_name[] = "Neterion"; |
73 | static char s2io_driver_version[] = DRV_VERSION; | 73 | static char s2io_driver_version[] = DRV_VERSION; |
74 | 74 | ||
75 | int rxd_size[4] = {32,48,48,64}; | 75 | static int rxd_size[4] = {32,48,48,64}; |
76 | int rxd_count[4] = {127,85,85,63}; | 76 | static int rxd_count[4] = {127,85,85,63}; |
77 | 77 | ||
78 | static inline int RXD_IS_UP2DT(RxD_t *rxdp) | 78 | static inline int RXD_IS_UP2DT(RxD_t *rxdp) |
79 | { | 79 | { |
@@ -2127,7 +2127,7 @@ static void stop_nic(struct s2io_nic *nic) | |||
2127 | } | 2127 | } |
2128 | } | 2128 | } |
2129 | 2129 | ||
2130 | int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) | 2130 | static int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) |
2131 | { | 2131 | { |
2132 | struct net_device *dev = nic->dev; | 2132 | struct net_device *dev = nic->dev; |
2133 | struct sk_buff *frag_list; | 2133 | struct sk_buff *frag_list; |
@@ -2852,7 +2852,7 @@ static int wait_for_cmd_complete(nic_t * sp) | |||
2852 | * void. | 2852 | * void. |
2853 | */ | 2853 | */ |
2854 | 2854 | ||
2855 | void s2io_reset(nic_t * sp) | 2855 | static void s2io_reset(nic_t * sp) |
2856 | { | 2856 | { |
2857 | XENA_dev_config_t __iomem *bar0 = sp->bar0; | 2857 | XENA_dev_config_t __iomem *bar0 = sp->bar0; |
2858 | u64 val64; | 2858 | u64 val64; |
@@ -2940,7 +2940,7 @@ void s2io_reset(nic_t * sp) | |||
2940 | * SUCCESS on success and FAILURE on failure. | 2940 | * SUCCESS on success and FAILURE on failure. |
2941 | */ | 2941 | */ |
2942 | 2942 | ||
2943 | int s2io_set_swapper(nic_t * sp) | 2943 | static int s2io_set_swapper(nic_t * sp) |
2944 | { | 2944 | { |
2945 | struct net_device *dev = sp->dev; | 2945 | struct net_device *dev = sp->dev; |
2946 | XENA_dev_config_t __iomem *bar0 = sp->bar0; | 2946 | XENA_dev_config_t __iomem *bar0 = sp->bar0; |
@@ -3089,7 +3089,7 @@ static int wait_for_msix_trans(nic_t *nic, int i) | |||
3089 | return ret; | 3089 | return ret; |
3090 | } | 3090 | } |
3091 | 3091 | ||
3092 | void restore_xmsi_data(nic_t *nic) | 3092 | static void restore_xmsi_data(nic_t *nic) |
3093 | { | 3093 | { |
3094 | XENA_dev_config_t __iomem *bar0 = nic->bar0; | 3094 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3095 | u64 val64; | 3095 | u64 val64; |
@@ -3180,7 +3180,7 @@ int s2io_enable_msi(nic_t *nic) | |||
3180 | return 0; | 3180 | return 0; |
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | int s2io_enable_msi_x(nic_t *nic) | 3183 | static int s2io_enable_msi_x(nic_t *nic) |
3184 | { | 3184 | { |
3185 | XENA_dev_config_t __iomem *bar0 = nic->bar0; | 3185 | XENA_dev_config_t __iomem *bar0 = nic->bar0; |
3186 | u64 tx_mat, rx_mat; | 3186 | u64 tx_mat, rx_mat; |
@@ -4128,7 +4128,7 @@ static void s2io_set_multicast(struct net_device *dev) | |||
4128 | * as defined in errno.h file on failure. | 4128 | * as defined in errno.h file on failure. |
4129 | */ | 4129 | */ |
4130 | 4130 | ||
4131 | int s2io_set_mac_addr(struct net_device *dev, u8 * addr) | 4131 | static int s2io_set_mac_addr(struct net_device *dev, u8 * addr) |
4132 | { | 4132 | { |
4133 | nic_t *sp = dev->priv; | 4133 | nic_t *sp = dev->priv; |
4134 | XENA_dev_config_t __iomem *bar0 = sp->bar0; | 4134 | XENA_dev_config_t __iomem *bar0 = sp->bar0; |
@@ -5713,7 +5713,7 @@ static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp) | |||
5713 | * void. | 5713 | * void. |
5714 | */ | 5714 | */ |
5715 | 5715 | ||
5716 | void s2io_link(nic_t * sp, int link) | 5716 | static void s2io_link(nic_t * sp, int link) |
5717 | { | 5717 | { |
5718 | struct net_device *dev = (struct net_device *) sp->dev; | 5718 | struct net_device *dev = (struct net_device *) sp->dev; |
5719 | 5719 | ||
@@ -5738,7 +5738,7 @@ void s2io_link(nic_t * sp, int link) | |||
5738 | * returns the revision ID of the device. | 5738 | * returns the revision ID of the device. |
5739 | */ | 5739 | */ |
5740 | 5740 | ||
5741 | int get_xena_rev_id(struct pci_dev *pdev) | 5741 | static int get_xena_rev_id(struct pci_dev *pdev) |
5742 | { | 5742 | { |
5743 | u8 id = 0; | 5743 | u8 id = 0; |
5744 | int ret; | 5744 | int ret; |
@@ -6343,7 +6343,7 @@ int __init s2io_starter(void) | |||
6343 | * Description: This function is the cleanup routine for the driver. It unregist * ers the driver. | 6343 | * Description: This function is the cleanup routine for the driver. It unregist * ers the driver. |
6344 | */ | 6344 | */ |
6345 | 6345 | ||
6346 | void s2io_closer(void) | 6346 | static void s2io_closer(void) |
6347 | { | 6347 | { |
6348 | pci_unregister_driver(&s2io_driver); | 6348 | pci_unregister_driver(&s2io_driver); |
6349 | DBG_PRINT(INIT_DBG, "cleanup done\n"); | 6349 | DBG_PRINT(INIT_DBG, "cleanup done\n"); |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 852a6a899d07..68ae33651947 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -64,7 +64,7 @@ typedef enum xena_max_outstanding_splits { | |||
64 | #define INTR_DBG 4 | 64 | #define INTR_DBG 4 |
65 | 65 | ||
66 | /* Global variable that defines the present debug level of the driver. */ | 66 | /* Global variable that defines the present debug level of the driver. */ |
67 | int debug_level = ERR_DBG; /* Default level. */ | 67 | static int debug_level = ERR_DBG; |
68 | 68 | ||
69 | /* DEBUG message print. */ | 69 | /* DEBUG message print. */ |
70 | #define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) | 70 | #define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) |
@@ -268,7 +268,7 @@ typedef struct stat_block { | |||
268 | #define MAX_RX_RINGS 8 | 268 | #define MAX_RX_RINGS 8 |
269 | 269 | ||
270 | /* FIFO mappings for all possible number of fifos configured */ | 270 | /* FIFO mappings for all possible number of fifos configured */ |
271 | int fifo_map[][MAX_TX_FIFOS] = { | 271 | static int fifo_map[][MAX_TX_FIFOS] = { |
272 | {0, 0, 0, 0, 0, 0, 0, 0}, | 272 | {0, 0, 0, 0, 0, 0, 0, 0}, |
273 | {0, 0, 0, 0, 1, 1, 1, 1}, | 273 | {0, 0, 0, 0, 1, 1, 1, 1}, |
274 | {0, 0, 0, 1, 1, 1, 2, 2}, | 274 | {0, 0, 0, 1, 1, 1, 2, 2}, |
@@ -911,18 +911,16 @@ static void tx_intr_handler(fifo_info_t *fifo_data); | |||
911 | static void alarm_intr_handler(struct s2io_nic *sp); | 911 | static void alarm_intr_handler(struct s2io_nic *sp); |
912 | 912 | ||
913 | static int s2io_starter(void); | 913 | static int s2io_starter(void); |
914 | void s2io_closer(void); | ||
915 | static void s2io_tx_watchdog(struct net_device *dev); | 914 | static void s2io_tx_watchdog(struct net_device *dev); |
916 | static void s2io_tasklet(unsigned long dev_addr); | 915 | static void s2io_tasklet(unsigned long dev_addr); |
917 | static void s2io_set_multicast(struct net_device *dev); | 916 | static void s2io_set_multicast(struct net_device *dev); |
918 | static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); | 917 | static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp); |
919 | void s2io_link(nic_t * sp, int link); | 918 | static void s2io_link(nic_t * sp, int link); |
920 | void s2io_reset(nic_t * sp); | ||
921 | #if defined(CONFIG_S2IO_NAPI) | 919 | #if defined(CONFIG_S2IO_NAPI) |
922 | static int s2io_poll(struct net_device *dev, int *budget); | 920 | static int s2io_poll(struct net_device *dev, int *budget); |
923 | #endif | 921 | #endif |
924 | static void s2io_init_pci(nic_t * sp); | 922 | static void s2io_init_pci(nic_t * sp); |
925 | int s2io_set_mac_addr(struct net_device *dev, u8 * addr); | 923 | static int s2io_set_mac_addr(struct net_device *dev, u8 * addr); |
926 | static void s2io_alarm_handle(unsigned long data); | 924 | static void s2io_alarm_handle(unsigned long data); |
927 | static int s2io_enable_msi(nic_t *nic); | 925 | static int s2io_enable_msi(nic_t *nic); |
928 | static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs); | 926 | static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs); |
@@ -930,14 +928,13 @@ static irqreturn_t | |||
930 | s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs); | 928 | s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs); |
931 | static irqreturn_t | 929 | static irqreturn_t |
932 | s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs); | 930 | s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs); |
933 | int s2io_enable_msi_x(nic_t *nic); | ||
934 | static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); | 931 | static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); |
935 | static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); | 932 | static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag); |
936 | static struct ethtool_ops netdev_ethtool_ops; | 933 | static struct ethtool_ops netdev_ethtool_ops; |
937 | static void s2io_set_link(unsigned long data); | 934 | static void s2io_set_link(unsigned long data); |
938 | int s2io_set_swapper(nic_t * sp); | 935 | static int s2io_set_swapper(nic_t * sp); |
939 | static void s2io_card_down(nic_t *nic); | 936 | static void s2io_card_down(nic_t *nic); |
940 | static int s2io_card_up(nic_t *nic); | 937 | static int s2io_card_up(nic_t *nic); |
941 | int get_xena_rev_id(struct pci_dev *pdev); | 938 | static int get_xena_rev_id(struct pci_dev *pdev); |
942 | void restore_xmsi_data(nic_t *nic); | 939 | static void restore_xmsi_data(nic_t *nic); |
943 | #endif /* _S2IO_H */ | 940 | #endif /* _S2IO_H */ |