[PATCH] Staging: et131x: Checkpatch cleanups
Denis Kirjanov <kirjanov@gmail.com
kirjanov at gmail.com
Sat Oct 17 09:18:34 UTC 2009
Checkpatch cleanups for et131x.
BTW some minor warnings still remain in et1310_rx.c
WARNING: suspect code indent for conditional statements (8, 8)
#925: FILE: et1310_rx.c:925:
+ if (ringIndex != 1 ||
[...]
+ {
total: 0 errors, 1 warnings, 1273 lines checked
and et131x_netdevice.c:
WARNING: externs should be avoided in .c files
#107: FILE: et131x_netdev.c:107:
+void et131x_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
WARNING: externs should be avoided in .c files
#108: FILE: et131x_netdev.c:108:
+void et131x_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
WARNING: externs should be avoided in .c files
#109: FILE: et131x_netdev.c:109:
+void et131x_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
total: 0 errors, 3 warnings, 730 lines checked
drivers/staging/et131x/et1310_phy.c | 9 ++++--
drivers/staging/et131x/et1310_rx.c | 49 ++++++++++++++++--------------
drivers/staging/et131x/et1310_tx.c | 32 +++++++++++---------
drivers/staging/et131x/et131x_initpci.c | 39 +++++++++++++++++-------
drivers/staging/et131x/et131x_isr.c | 9 ++---
drivers/staging/et131x/et131x_netdev.c | 46 ++++++++++++++--------------
6 files changed, 103 insertions(+), 81 deletions(-)
Signed-off-by: Denis Kirjanov <kirjanov at gmail.com>
---
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index dd199bd..c56ecd7 100644
--- a/drivers/staging/et131x/et1310_phy.c
+++ b/drivers/staging/et131x/et1310_phy.c
@@ -479,7 +479,8 @@ void et131x_Mii_check(struct et131x_adapter *etdev,
if (etdev->linkspeed == TRUEPHY_SPEED_10MBPS) {
/* NOTE - Is there a way to query this without
* TruePHY?
- * && TRU_QueryCoreType(etdev->hTruePhy, 0) == EMI_TRUEPHY_A13O) {
+ * && TRU_QueryCoreType(etdev->hTruePhy, 0)
+ * == EMI_TRUEPHY_A13O) {
*/
uint16_t Register18;
@@ -497,7 +498,8 @@ void et131x_Mii_check(struct et131x_adapter *etdev,
* in the LinkDetectionDPC).
*/
if (!(etdev->Flags & fMP_ADAPTER_LINK_DETECTION) ||
- (etdev->MediaState == NETIF_STATUS_MEDIA_DISCONNECT)) {
+ (etdev->MediaState ==
+ NETIF_STATUS_MEDIA_DISCONNECT)) {
spin_lock_irqsave(&etdev->Lock, flags);
etdev->MediaState =
NETIF_STATUS_MEDIA_DISCONNECT;
@@ -559,7 +561,8 @@ void et131x_Mii_check(struct et131x_adapter *etdev,
/*
* NOTE - Is there a way to query this without
* TruePHY?
- * && TRU_QueryCoreType(etdev->hTruePhy, 0)== EMI_TRUEPHY_A13O) {
+ * && TRU_QueryCoreType(etdev->hTruePhy, 0) ==
+ * EMI_TRUEPHY_A13O) {
*/
uint16_t Register18;
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 10e21db..f326d6f 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -93,7 +93,7 @@
#include "et1310_rx.h"
-void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd);
+static void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd);
/**
* et131x_rx_dma_memory_alloc
@@ -252,7 +252,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
&rx_ring->Fbr1MemPa[OuterLoop]);
if (!rx_ring->Fbr1MemVa[OuterLoop]) {
- dev_err(&adapter->pdev->dev,
+ dev_err(&adapter->pdev->dev,
"Could not alloc memory\n");
return -ENOMEM;
}
@@ -796,7 +796,8 @@ void et131x_rx_dma_disable(struct et131x_adapter *etdev)
csr.value = readl(&etdev->regs->rxdma.csr.value);
if (csr.bits.halt_status != 1)
dev_err(&etdev->pdev->dev,
- "RX Dma failed to enter halt state. CSR 0x%08x\n",
+ "RX Dma failed to enter halt state.
+ CSR 0x%08x\n",
csr.value);
}
}
@@ -838,7 +839,8 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev)
csr.value = readl(&etdev->regs->rxdma.csr.value);
if (csr.bits.halt_status != 0) {
dev_err(&etdev->pdev->dev,
- "RX Dma failed to exit halt state. CSR 0x%08x\n",
+ "RX Dma failed to exit halt state.
+ CSR 0x%08x\n",
csr.value);
}
}
@@ -909,9 +911,8 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
&etdev->regs->rxdma.psr_full_offset.value);
#ifndef USE_FBR0
- if (ringIndex != 1) {
+ if (ringIndex != 1)
return NULL;
- }
#endif
#ifdef USE_FBR0
@@ -988,8 +989,10 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
* promiscuous mode.
*/
if ((etdev->PacketFilter & ET131X_PACKET_TYPE_MULTICAST)
- && !(etdev->PacketFilter & ET131X_PACKET_TYPE_PROMISCUOUS)
- && !(etdev->PacketFilter & ET131X_PACKET_TYPE_ALL_MULTICAST)) {
+ && !(etdev->PacketFilter &
+ ET131X_PACKET_TYPE_PROMISCUOUS)
+ && !(etdev->PacketFilter &
+ ET131X_PACKET_TYPE_ALL_MULTICAST)) {
pBufVa = pRxLocal->Fbr[ringIndex]->
Va[bufferIndex];
@@ -1177,20 +1180,20 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)
static inline u32 bump_fbr(u32 *fbr, u32 limit)
{
- u32 v = *fbr;
- v++;
- /* This works for all cases where limit < 1024. The 1023 case
- works because 1023++ is 1024 which means the if condition is not
- taken but the carry of the bit into the wrap bit toggles the wrap
- value correctly */
- if ((v & ET_DMA10_MASK) > limit) {
- v &= ~ET_DMA10_MASK;
- v ^= ET_DMA10_WRAP;
- }
- /* For the 1023 case */
- v &= (ET_DMA10_MASK|ET_DMA10_WRAP);
- *fbr = v;
- return v;
+ u32 v = *fbr;
+ v++;
+ /* This works for all cases where limit < 1024. The 1023 case
+ works because 1023++ is 1024 which means the if condition is not
+ taken but the carry of the bit into the wrap bit toggles the wrap
+ value correctly */
+ if ((v & ET_DMA10_MASK) > limit) {
+ v &= ~ET_DMA10_MASK;
+ v ^= ET_DMA10_WRAP;
+ }
+ /* For the 1023 case */
+ v &= (ET_DMA10_MASK|ET_DMA10_WRAP);
+ *fbr = v;
+ return v;
}
/**
@@ -1198,7 +1201,7 @@ static inline u32 bump_fbr(u32 *fbr, u32 limit)
* @etdev: pointer to our adapter
* @pMpRfd: pointer to the RFD
*/
-void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd)
+static void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd)
{
struct _rx_ring_t *rx_local = &etdev->RxRing;
struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma;
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c
index 94f7752..70a7122 100644
--- a/drivers/staging/et131x/et1310_tx.c
+++ b/drivers/staging/et131x/et1310_tx.c
@@ -120,10 +120,11 @@ int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter)
TX_RING_t *tx_ring = &adapter->TxRing;
/* Allocate memory for the TCB's (Transmit Control Block) */
- adapter->TxRing.MpTcbMem = (MP_TCB *)kcalloc(NUM_TCB, sizeof(MP_TCB),
+ adapter->TxRing.MpTcbMem = kcalloc(NUM_TCB, sizeof(MP_TCB),
GFP_ATOMIC | GFP_DMA);
if (!adapter->TxRing.MpTcbMem) {
- dev_err(&adapter->pdev->dev, "Cannot alloc memory for TCBs\n");
+ dev_err(&adapter->pdev->dev,
+ "Cannot alloc memory for TCBs\n");
return -ENOMEM;
}
@@ -135,7 +136,8 @@ int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter)
(PTX_DESC_ENTRY_t) pci_alloc_consistent(adapter->pdev, desc_size,
&tx_ring->pTxDescRingPa);
if (!adapter->TxRing.pTxDescRingVa) {
- dev_err(&adapter->pdev->dev, "Cannot alloc memory for Tx Ring\n");
+ dev_err(&adapter->pdev->dev,
+ "Cannot alloc memory for Tx Ring\n");
return -ENOMEM;
}
@@ -415,9 +417,8 @@ static int et131x_send_packet(struct sk_buff *skb,
unsigned long flags;
/* All packets must have at least a MAC address and a protocol type */
- if (skb->len < ETH_HLEN) {
+ if (skb->len < ETH_HLEN)
return -EIO;
- }
/* Get a TCB for this packet */
spin_lock_irqsave(&etdev->TCBReadyQLock, flags);
@@ -500,9 +501,8 @@ static int nic_send_packet(struct et131x_adapter *etdev, PMP_TCB pMpTcb)
* number of fragments. If needed, we can call this function,
* although it is less efficient.
*/
- if (FragListCount > 23) {
+ if (FragListCount > 23)
return -EIO;
- }
memset(CurDesc, 0, sizeof(TX_DESC_ENTRY_t) * (FragListCount + 1));
@@ -641,10 +641,11 @@ static int nic_send_packet(struct et131x_adapter *etdev, PMP_TCB pMpTcb)
add_10bit(&etdev->TxRing.txDmaReadyToSend, thiscopy);
- if (INDEX10(etdev->TxRing.txDmaReadyToSend)== 0 ||
- INDEX10(etdev->TxRing.txDmaReadyToSend) == NUM_DESC_PER_RING_TX) {
- etdev->TxRing.txDmaReadyToSend &= ~ET_DMA10_MASK;
- etdev->TxRing.txDmaReadyToSend ^= ET_DMA10_WRAP;
+ if (INDEX10(etdev->TxRing.txDmaReadyToSend) == 0 ||
+ INDEX10(etdev->TxRing.txDmaReadyToSend) ==
+ NUM_DESC_PER_RING_TX) {
+ etdev->TxRing.txDmaReadyToSend &= ~ET_DMA10_MASK;
+ etdev->TxRing.txDmaReadyToSend ^= ET_DMA10_WRAP;
}
if (remainder) {
@@ -659,7 +660,8 @@ static int nic_send_packet(struct et131x_adapter *etdev, PMP_TCB pMpTcb)
if (etdev->TxRing.txDmaReadyToSend)
pMpTcb->WrIndex = NUM_DESC_PER_RING_TX - 1;
else
- pMpTcb->WrIndex= ET_DMA10_WRAP | (NUM_DESC_PER_RING_TX - 1);
+ pMpTcb->WrIndex = ET_DMA10_WRAP |
+ (NUM_DESC_PER_RING_TX - 1);
} else
pMpTcb->WrIndex = etdev->TxRing.txDmaReadyToSend - 1;
@@ -726,7 +728,7 @@ inline void et131x_free_send_packet(struct et131x_adapter *etdev,
do {
desc =
(TX_DESC_ENTRY_t *) (etdev->TxRing.pTxDescRingVa +
- INDEX10(pMpTcb->WrIndexStart));
+ INDEX10(pMpTcb->WrIndexStart));
pci_unmap_single(etdev->pdev,
desc->DataBufferPtrLow,
@@ -735,8 +737,8 @@ inline void et131x_free_send_packet(struct et131x_adapter *etdev,
add_10bit(&pMpTcb->WrIndexStart, 1);
if (INDEX10(pMpTcb->WrIndexStart) >=
NUM_DESC_PER_RING_TX) {
- pMpTcb->WrIndexStart &= ~ET_DMA10_MASK;
- pMpTcb->WrIndexStart ^= ET_DMA10_WRAP;
+ pMpTcb->WrIndexStart &= ~ET_DMA10_MASK;
+ pMpTcb->WrIndexStart ^= ET_DMA10_WRAP;
}
} while (desc != (etdev->TxRing.pTxDescRingVa +
INDEX10(pMpTcb->WrIndex)));
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index 9db2056..4c09a5c 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -129,7 +129,13 @@ MODULE_PARM_DESC(et131x_nmi_disable, "Disable NMI (0-2) [0]");
static u32 et131x_speed_set;
module_param(et131x_speed_set, uint, 0);
MODULE_PARM_DESC(et131x_speed_set,
- "Set Link speed and dublex manually (0-5) [0] \n 1 : 10Mb Half-Duplex \n 2 : 10Mb Full-Duplex \n 3 : 100Mb Half-Duplex \n 4 : 100Mb Full-Duplex \n 5 : 1000Mb Full-Duplex \n 0 : Auto Speed Auto Dublex");
+ "Set Link speed and dublex manually (0-5) [0] \n
+ 1 : 10Mb Half-Duplex \n
+ 2 : 10Mb Full-Duplex \n
+ 3 : 100Mb Half-Duplex \n
+ 4 : 100Mb Full-Duplex \n
+ 5 : 1000Mb Full-Duplex \n
+ 0 : Auto Speed Auto Dublex");
/**
* et131x_find_adapter - Find the adapter and get all the assigned resources
@@ -198,12 +204,13 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev)
* present and the revision id is 1, this fixes the
* corruption seen with 1310 B Silicon
*/
- for (nLoop = 0; nLoop < 3; nLoop++) {
+ for (nLoop = 0; nLoop < 3; nLoop++)
EepromWriteByte(adapter, nLoop, temp[nLoop]);
- }
}
- dev_err(&pdev->dev, "Fatal EEPROM Status Error - 0x%04x\n", eepromStat);
+ dev_err(&pdev->dev,
+ "Fatal EEPROM Status Error - 0x%04x\n",
+ eepromStat);
/* This error could mean that there was an error reading the
* eeprom or that the eeprom doesn't exist. We will treat
@@ -247,7 +254,8 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev)
AckNak[maxPayload]);
if (result != PCIBIOS_SUCCESSFUL) {
dev_err(&pdev->dev,
- "Could not write PCI config space for ACK/NAK\n");
+ "Could not write PCI config space
+ for ACK/NAK\n");
return -EIO;
}
@@ -255,7 +263,8 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev)
Replay[maxPayload]);
if (result != PCIBIOS_SUCCESSFUL) {
dev_err(&pdev->dev,
- "Could not write PCI config space for Replay Timer\n");
+ "Could not write PCI config space
+ for Replay Timer\n");
return -EIO;
}
}
@@ -299,7 +308,9 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev)
pdev, ET1310_PCI_MAC_ADDRESS + i,
adapter->PermanentAddress + i);
if (result != PCIBIOS_SUCCESSFUL) {
- dev_err(&pdev->dev, ";Could not read PCI config space for MAC address\n");
+ dev_err(&pdev->dev,
+ "Could not read PCI config space
+ for MAC address\n");
return -EIO;
}
}
@@ -398,7 +409,8 @@ void ConfigGlobalRegs(struct et131x_adapter *etdev)
/* For jumbo packets > 2k but < 8k, split 50-50. */
writel(0, ®s->rxq_start_addr);
writel(INTERNAL_MEM_RX_OFFSET, ®s->rxq_end_addr);
- writel(INTERNAL_MEM_RX_OFFSET + 1, ®s->txq_start_addr);
+ writel(INTERNAL_MEM_RX_OFFSET + 1,
+ ®s->txq_start_addr);
writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr);
} else {
/* 9216 is the only packet size greater than 8k that
@@ -409,7 +421,7 @@ void ConfigGlobalRegs(struct et131x_adapter *etdev)
writel(0x0000, ®s->rxq_start_addr);
writel(0x01b3, ®s->rxq_end_addr);
writel(0x01b4, ®s->txq_start_addr);
- writel(INTERNAL_MEM_SIZE - 1,®s->txq_end_addr);
+ writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr);
}
/* Initialize the loopback register. Disable all loopbacks. */
@@ -777,7 +789,8 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev,
pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
if (result != 0) {
dev_err(&pdev->dev,
- "Unable to obtain 64 bit DMA for consistent allocations\n");
+ "Unable to obtain 64 bit DMA for
+ consistent allocations\n");
goto err_release_res;
}
} else if (!pci_set_dma_mask(pdev, 0xffffffffULL)) {
@@ -798,7 +811,9 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev,
goto err_release_res;
}
- /* Setup the fundamental net_device and private adapter structure elements */
+ /* Setup the fundamental net_device and
+ * private adapter structure elements
+ */
SET_NETDEV_DEV(netdev, &pdev->dev);
/*
if (pci_using_dac) {
@@ -994,7 +1009,7 @@ static int et131x_init_module(void)
if (et131x_speed_set < PARM_SPEED_DUPLEX_MIN ||
et131x_speed_set > PARM_SPEED_DUPLEX_MAX) {
printk(KERN_WARNING "et131x: invalid speed setting ignored.\n");
- et131x_speed_set = 0;
+ et131x_speed_set = 0;
}
return pci_register_driver(&et131x_driver);
}
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index f80189d..278c8fd 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -241,14 +241,12 @@ void et131x_isr_handler(struct work_struct *work)
* exit.
*/
/* Handle all the completed Transmit interrupts */
- if (status & ET_INTR_TXDMA_ISR) {
+ if (status & ET_INTR_TXDMA_ISR)
et131x_handle_send_interrupt(etdev);
- }
/* Handle all the completed Receives interrupts */
- if (status & ET_INTR_RXDMA_XFR_DONE) {
+ if (status & ET_INTR_RXDMA_XFR_DONE)
et131x_handle_recv_interrupt(etdev);
- }
status &= 0xffffffd7;
@@ -266,7 +264,8 @@ void et131x_isr_handler(struct work_struct *work)
}
/* Handle Free Buffer Ring 0 and 1 Low interrupt */
- if (status & (ET_INTR_RXDMA_FB_R0_LOW | ET_INTR_RXDMA_FB_R1_LOW)) {
+ if (status & (ET_INTR_RXDMA_FB_R0_LOW |
+ ET_INTR_RXDMA_FB_R1_LOW)) {
/*
* This indicates the number of unused buffers in
* RXDMA free buffer ring 0 is <= the limit you
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c
index 8c7612f..2e16dd0 100644
--- a/drivers/staging/et131x/et131x_netdev.c
+++ b/drivers/staging/et131x/et131x_netdev.c
@@ -95,14 +95,15 @@
#include "et131x_initpci.h"
struct net_device_stats *et131x_stats(struct net_device *netdev);
-int et131x_open(struct net_device *netdev);
-int et131x_close(struct net_device *netdev);
-int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf, int cmd);
-void et131x_multicast(struct net_device *netdev);
-int et131x_tx(struct sk_buff *skb, struct net_device *netdev);
-void et131x_tx_timeout(struct net_device *netdev);
-int et131x_change_mtu(struct net_device *netdev, int new_mtu);
-int et131x_set_mac_addr(struct net_device *netdev, void *new_mac);
+static int et131x_open(struct net_device *netdev);
+static int et131x_close(struct net_device *netdev);
+static int et131x_ioctl(struct net_device *netdev,
+ struct ifreq *reqbuf, int cmd);
+static void et131x_multicast(struct net_device *netdev);
+static int et131x_tx(struct sk_buff *skb, struct net_device *netdev);
+static void et131x_tx_timeout(struct net_device *netdev);
+static int et131x_change_mtu(struct net_device *netdev, int new_mtu);
+static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac);
void et131x_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
void et131x_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
void et131x_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
@@ -209,7 +210,7 @@ struct net_device_stats *et131x_stats(struct net_device *netdev)
*
* Returns 0 on success, errno on failure (as defined in errno.h)
*/
-int et131x_open(struct net_device *netdev)
+static int et131x_open(struct net_device *netdev)
{
int result = 0;
struct et131x_adapter *adapter = netdev_priv(netdev);
@@ -246,7 +247,7 @@ int et131x_open(struct net_device *netdev)
*
* Returns 0 on success, errno on failure (as defined in errno.h)
*/
-int et131x_close(struct net_device *netdev)
+static int et131x_close(struct net_device *netdev)
{
struct et131x_adapter *adapter = netdev_priv(netdev);
@@ -318,7 +319,8 @@ int et131x_ioctl_mii(struct net_device *netdev, struct ifreq *reqbuf, int cmd)
*
* Returns 0 on success, errno on failure (as defined in errno.h)
*/
-int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf, int cmd)
+static int et131x_ioctl(struct net_device *netdev,
+ struct ifreq *reqbuf, int cmd)
{
int status = 0;
@@ -407,7 +409,7 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter)
* et131x_multicast - The handler to configure multicasting on the interface
* @netdev: a pointer to a net_device struct representing the device
*/
-void et131x_multicast(struct net_device *netdev)
+static void et131x_multicast(struct net_device *netdev)
{
struct et131x_adapter *adapter = netdev_priv(netdev);
uint32_t PacketFilter = 0;
@@ -434,19 +436,16 @@ void et131x_multicast(struct net_device *netdev)
* accordingly
*/
- if (netdev->flags & IFF_PROMISC) {
+ if (netdev->flags & IFF_PROMISC)
adapter->PacketFilter |= ET131X_PACKET_TYPE_PROMISCUOUS;
- } else {
+ else
adapter->PacketFilter &= ~ET131X_PACKET_TYPE_PROMISCUOUS;
- }
- if (netdev->flags & IFF_ALLMULTI) {
+ if (netdev->flags & IFF_ALLMULTI)
adapter->PacketFilter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
- }
- if (netdev->mc_count > NIC_MAX_MCAST_LIST) {
+ if (netdev->mc_count > NIC_MAX_MCAST_LIST)
adapter->PacketFilter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
- }
if (netdev->mc_count < 1) {
adapter->PacketFilter &= ~ET131X_PACKET_TYPE_ALL_MULTICAST;
@@ -516,7 +515,7 @@ int et131x_tx(struct sk_buff *skb, struct net_device *netdev)
* specified by the 'tx_timeo" element in the net_device structure (see
* et131x_alloc_device() to see how this value is set).
*/
-void et131x_tx_timeout(struct net_device *netdev)
+static void et131x_tx_timeout(struct net_device *netdev)
{
struct et131x_adapter *etdev = netdev_priv(netdev);
PMP_TCB pMpTcb;
@@ -560,7 +559,8 @@ void et131x_tx_timeout(struct net_device *netdev)
flags);
dev_warn(&etdev->pdev->dev,
- "Send stuck - reset. pMpTcb->WrIndex %x, Flags 0x%08x\n",
+ "Send stuck - reset.
+ pMpTcb->WrIndex %x, Flags 0x%08x\n",
pMpTcb->WrIndex,
pMpTcb->Flags);
@@ -581,7 +581,7 @@ void et131x_tx_timeout(struct net_device *netdev)
*
* Returns 0 on success, errno on failure (as defined in errno.h)
*/
-int et131x_change_mtu(struct net_device *netdev, int new_mtu)
+static int et131x_change_mtu(struct net_device *netdev, int new_mtu)
{
int result = 0;
struct et131x_adapter *adapter = netdev_priv(netdev);
@@ -650,7 +650,7 @@ int et131x_change_mtu(struct net_device *netdev, int new_mtu)
*
* IMPLEMENTED BY : blux http://berndlux.de 22.01.2007 21:14
*/
-int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
+static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
{
int result = 0;
struct et131x_adapter *adapter = netdev_priv(netdev);
More information about the devel
mailing list