net/7990: Fix whitespace errors
Most of them reported by checkpatch.pl Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ea074b3495
commit
a8ab77a83a
@@ -308,11 +308,16 @@ static int lance_rx (struct net_device *dev)
|
|||||||
/* Count only the end frame as a rx error,
|
/* Count only the end frame as a rx error,
|
||||||
* not the beginning
|
* not the beginning
|
||||||
*/
|
*/
|
||||||
if (bits & LE_R1_BUF) dev->stats.rx_fifo_errors++;
|
if (bits & LE_R1_BUF)
|
||||||
if (bits & LE_R1_CRC) dev->stats.rx_crc_errors++;
|
dev->stats.rx_fifo_errors++;
|
||||||
if (bits & LE_R1_OFL) dev->stats.rx_over_errors++;
|
if (bits & LE_R1_CRC)
|
||||||
if (bits & LE_R1_FRA) dev->stats.rx_frame_errors++;
|
dev->stats.rx_crc_errors++;
|
||||||
if (bits & LE_R1_EOP) dev->stats.rx_errors++;
|
if (bits & LE_R1_OFL)
|
||||||
|
dev->stats.rx_over_errors++;
|
||||||
|
if (bits & LE_R1_FRA)
|
||||||
|
dev->stats.rx_frame_errors++;
|
||||||
|
if (bits & LE_R1_EOP)
|
||||||
|
dev->stats.rx_errors++;
|
||||||
} else {
|
} else {
|
||||||
int len = (rd->mblength & 0xfff) - 4;
|
int len = (rd->mblength & 0xfff) - 4;
|
||||||
struct sk_buff *skb = netdev_alloc_skb(dev, len + 2);
|
struct sk_buff *skb = netdev_alloc_skb(dev, len + 2);
|
||||||
@@ -371,15 +376,18 @@ static int lance_tx (struct net_device *dev)
|
|||||||
status = td->misc;
|
status = td->misc;
|
||||||
|
|
||||||
dev->stats.tx_errors++;
|
dev->stats.tx_errors++;
|
||||||
if (status & LE_T3_RTY) dev->stats.tx_aborted_errors++;
|
if (status & LE_T3_RTY)
|
||||||
if (status & LE_T3_LCOL) dev->stats.tx_window_errors++;
|
dev->stats.tx_aborted_errors++;
|
||||||
|
if (status & LE_T3_LCOL)
|
||||||
|
dev->stats.tx_window_errors++;
|
||||||
|
|
||||||
if (status & LE_T3_CLOS) {
|
if (status & LE_T3_CLOS) {
|
||||||
dev->stats.tx_carrier_errors++;
|
dev->stats.tx_carrier_errors++;
|
||||||
if (lp->auto_select) {
|
if (lp->auto_select) {
|
||||||
lp->tpe = 1 - lp->tpe;
|
lp->tpe = 1 - lp->tpe;
|
||||||
printk("%s: Carrier Lost, trying %s\n",
|
printk("%s: Carrier Lost, trying %s\n",
|
||||||
dev->name, lp->tpe?"TPE":"AUI");
|
dev->name,
|
||||||
|
lp->tpe ? "TPE" : "AUI");
|
||||||
/* Stop the lance */
|
/* Stop the lance */
|
||||||
WRITERAP(lp, LE_CSR0);
|
WRITERAP(lp, LE_CSR0);
|
||||||
WRITERDP(lp, LE_C0_STOP);
|
WRITERDP(lp, LE_C0_STOP);
|
||||||
|
@@ -51,8 +51,7 @@ struct lance_rx_desc {
|
|||||||
volatile unsigned char rmd1_bits; /* descriptor bits */
|
volatile unsigned char rmd1_bits; /* descriptor bits */
|
||||||
volatile unsigned char rmd1_hadr; /* high address of packet */
|
volatile unsigned char rmd1_hadr; /* high address of packet */
|
||||||
volatile short length; /* This length is 2s complement (negative)!
|
volatile short length; /* This length is 2s complement (negative)!
|
||||||
* Buffer length
|
* Buffer length */
|
||||||
*/
|
|
||||||
volatile unsigned short mblength; /* Actual number of bytes received */
|
volatile unsigned short mblength; /* Actual number of bytes received */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -98,8 +97,7 @@ struct lance_init_block {
|
|||||||
* I'm definitely unhappy about the mechanism for allowing specific
|
* I'm definitely unhappy about the mechanism for allowing specific
|
||||||
* drivers to add things...
|
* drivers to add things...
|
||||||
*/
|
*/
|
||||||
struct lance_private
|
struct lance_private {
|
||||||
{
|
|
||||||
char *name;
|
char *name;
|
||||||
unsigned long base;
|
unsigned long base;
|
||||||
volatile struct lance_init_block *init_block; /* CPU address of RAM */
|
volatile struct lance_init_block *init_block; /* CPU address of RAM */
|
||||||
@@ -161,10 +159,8 @@ struct lance_private
|
|||||||
/*
|
/*
|
||||||
* Bit definitions for CSR3
|
* Bit definitions for CSR3
|
||||||
*/
|
*/
|
||||||
#define LE_C3_BSWP 0x0004 /* Byte Swap
|
#define LE_C3_BSWP 0x0004 /* Byte Swap (on for big endian byte order) */
|
||||||
(on for big endian byte order) */
|
#define LE_C3_ACON 0x0002 /* ALE Control (on for active low ALE) */
|
||||||
#define LE_C3_ACON 0x0002 /* ALE Control
|
|
||||||
(on for active low ALE) */
|
|
||||||
#define LE_C3_BCON 0x0001 /* Byte Control */
|
#define LE_C3_BCON 0x0001 /* Byte Control */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -106,15 +106,13 @@ struct net_device * __init mvme147lance_probe(int unit)
|
|||||||
address = address >> 8;
|
address = address >> 8;
|
||||||
dev->dev_addr[3] = address&0xff;
|
dev->dev_addr[3] = address&0xff;
|
||||||
|
|
||||||
printk("%s: MVME147 at 0x%08lx, irq %d, "
|
printk("%s: MVME147 at 0x%08lx, irq %d, Hardware Address %pM\n",
|
||||||
"Hardware Address %pM\n",
|
|
||||||
dev->name, dev->base_addr, MVME147_LANCE_IRQ,
|
dev->name, dev->base_addr, MVME147_LANCE_IRQ,
|
||||||
dev->dev_addr);
|
dev->dev_addr);
|
||||||
|
|
||||||
lp = netdev_priv(dev);
|
lp = netdev_priv(dev);
|
||||||
lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 16K */
|
lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 16K */
|
||||||
if (!lp->ram)
|
if (!lp->ram) {
|
||||||
{
|
|
||||||
printk("%s: No memory for LANCE buffers\n", dev->name);
|
printk("%s: No memory for LANCE buffers\n", dev->name);
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
Reference in New Issue
Block a user