Commit ca3fc0aa authored by Yixing Liu's avatar Yixing Liu Committed by David S. Miller
Browse files

net: amd8111e: fix inappropriate spaces



Delete unncecessary spaces and add some reasonable spaces according to the
coding-style of kernel.

Signed-off-by: default avatarYixing Liu <liuyixing1@huawei.com>
Signed-off-by: default avatarWeihang Li <liweihang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e355fa6a
Loading
Loading
Loading
Loading
+177 −185
Original line number Diff line number Diff line
@@ -381,8 +381,8 @@ static int amd8111e_set_coalesce(struct net_device *dev, enum coal_mode cmod)

			timeout = timeout * DELAY_TIMER_CONV;
			writel(VAL0|STINTEN, mmio+INTEN0);
			writel((u32)DLY_INT_A_R0|( event_count<< 16 )|timeout,
							mmio+DLY_INT_A);
			writel((u32)DLY_INT_A_R0 | (event_count << 16) |
				timeout, mmio + DLY_INT_A);
			break;

		case TX_INTR_COAL:
@@ -395,8 +395,8 @@ static int amd8111e_set_coalesce(struct net_device *dev, enum coal_mode cmod)

			timeout = timeout * DELAY_TIMER_CONV;
			writel(VAL0 | STINTEN, mmio + INTEN0);
			writel((u32)DLY_INT_B_T0|( event_count<< 16 )|timeout,
							 mmio+DLY_INT_B);
			writel((u32)DLY_INT_B_T0 | (event_count << 16) |
				timeout, mmio + DLY_INT_B);
			break;

		case DISABLE_COAL:
@@ -821,8 +821,7 @@ static int amd8111e_link_change(struct net_device *dev)
							"Full" : "Half");

		netif_carrier_on(dev);
	}
	else{
	} else {
		lp->link_config.speed = SPEED_INVALID;
		lp->link_config.duplex = DUPLEX_INVALID;
		lp->link_config.autoneg = AUTONEG_INVALID;
@@ -982,8 +981,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
			amd8111e_set_coalesce(dev, RX_INTR_COAL);
			coal_conf->rx_coal_type = NO_COALESCE;
		}
	}
	else{
	} else {

		rx_pkt_size = rx_data_rate/rx_pkt_rate;
		if (rx_pkt_size < 128) {
@@ -995,8 +993,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
				coal_conf->rx_coal_type = NO_COALESCE;
			}

		}
		else if ( (rx_pkt_size >= 128) && (rx_pkt_size < 512) ){
		} else if ((rx_pkt_size >= 128) && (rx_pkt_size < 512)) {

			if (coal_conf->rx_coal_type !=  LOW_COALESCE) {
				coal_conf->rx_timeout = 1;
@@ -1004,8 +1001,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
				amd8111e_set_coalesce(dev, RX_INTR_COAL);
				coal_conf->rx_coal_type = LOW_COALESCE;
			}
		}
		else if ((rx_pkt_size >= 512) && (rx_pkt_size < 1024)){
		} else if ((rx_pkt_size >= 512) && (rx_pkt_size < 1024)) {

			if (coal_conf->rx_coal_type != MEDIUM_COALESCE) {
				coal_conf->rx_timeout = 1;
@@ -1014,8 +1010,8 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
				coal_conf->rx_coal_type = MEDIUM_COALESCE;
			}

		}
		else if(rx_pkt_size >= 1024){
		} else if (rx_pkt_size >= 1024) {

			if (coal_conf->rx_coal_type !=  HIGH_COALESCE) {
				coal_conf->rx_timeout = 2;
				coal_conf->rx_event_count = 3;
@@ -1033,8 +1029,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
			amd8111e_set_coalesce(dev, TX_INTR_COAL);
			coal_conf->tx_coal_type = NO_COALESCE;
		}
	}
	else{
	} else {

		tx_pkt_size = tx_data_rate/tx_pkt_rate;
		if (tx_pkt_size < 128) {
@@ -1047,8 +1042,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
				coal_conf->tx_coal_type = NO_COALESCE;
			}

		}
		else if ( (tx_pkt_size >= 128) && (tx_pkt_size < 512) ){
		} else if ((tx_pkt_size >= 128) && (tx_pkt_size < 512)) {

			if (coal_conf->tx_coal_type != LOW_COALESCE) {
				coal_conf->tx_timeout = 1;
@@ -1057,8 +1051,7 @@ static int amd8111e_calc_coalesce(struct net_device *dev)
				coal_conf->tx_coal_type = LOW_COALESCE;

			}
		}
		else if ((tx_pkt_size >= 512) && (tx_pkt_size < 1024)){
		} else if ((tx_pkt_size >= 512) && (tx_pkt_size < 1024)) {

			if (coal_conf->tx_coal_type != MEDIUM_COALESCE) {
				coal_conf->tx_timeout = 2;
@@ -1200,8 +1193,8 @@ static int amd8111e_open(struct net_device *dev)
{
	struct amd8111e_priv *lp = netdev_priv(dev);

	if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, IRQF_SHARED,
					 dev->name, dev))
	if (dev->irq == 0 || request_irq(dev->irq, amd8111e_interrupt,
					 IRQF_SHARED, dev->name, dev))
		return -EAGAIN;

	napi_enable(&lp->napi);
@@ -1619,8 +1612,7 @@ static int __maybe_unused amd8111e_suspend(struct device *dev_d)

		device_set_wakeup_enable(dev_d, 1);

	}
	else{
	} else {
		device_set_wakeup_enable(dev_d, 0);
	}