Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09a8c3e4 authored by John Efstathiades's avatar John Efstathiades Committed by Sasha Levin
Browse files

lan78xx: Fix white space and style issues



[ Upstream commit 9ceec7d33adf9647293f24d2fd9a055b89c63864 ]

Fix white space and code style issues identified by checkpatch.

Signed-off-by: default avatarJohn Efstathiades <john.efstathiades@pebblebay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7585522b
Loading
Loading
Loading
Loading
+42 −38
Original line number Original line Diff line number Diff line
@@ -396,7 +396,7 @@ struct lan78xx_net {
	struct usb_anchor	deferred;
	struct usb_anchor	deferred;


	struct mutex		phy_mutex; /* for phy access */
	struct mutex		phy_mutex; /* for phy access */
	unsigned		pipe_in, pipe_out, pipe_intr;
	unsigned int		pipe_in, pipe_out, pipe_intr;


	u32			hard_mtu;	/* count any extra framing */
	u32			hard_mtu;	/* count any extra framing */
	size_t			rx_urb_size;	/* size for rx urbs */
	size_t			rx_urb_size;	/* size for rx urbs */
@@ -406,7 +406,7 @@ struct lan78xx_net {
	wait_queue_head_t	*wait;
	wait_queue_head_t	*wait;
	unsigned char		suspend_count;
	unsigned char		suspend_count;


	unsigned		maxpacket;
	unsigned int		maxpacket;
	struct timer_list	delay;
	struct timer_list	delay;
	struct timer_list	stat_monitor;
	struct timer_list	stat_monitor;


@@ -529,10 +529,11 @@ static int lan78xx_read_stats(struct lan78xx_net *dev,
	return ret;
	return ret;
}
}


#define check_counter_rollover(struct1, dev_stats, member) {	\
#define check_counter_rollover(struct1, dev_stats, member)		\
	if (struct1->member < dev_stats.saved.member)		\
	do {								\
		dev_stats.rollover_count.member++;		\
		if ((struct1)->member < (dev_stats).saved.member)	\
	}
			(dev_stats).rollover_count.member++;		\
	} while (0)


static void lan78xx_check_stat_rollover(struct lan78xx_net *dev,
static void lan78xx_check_stat_rollover(struct lan78xx_net *dev,
					struct lan78xx_statstage *stats)
					struct lan78xx_statstage *stats)
@@ -973,7 +974,7 @@ static int lan78xx_dataport_wait_not_busy(struct lan78xx_net *dev)
		usleep_range(40, 100);
		usleep_range(40, 100);
	}
	}


	netdev_warn(dev->net, "lan78xx_dataport_wait_not_busy timed out");
	netdev_warn(dev->net, "%s timed out", __func__);


	return -EIO;
	return -EIO;
}
}
@@ -1081,9 +1082,10 @@ static void lan78xx_set_multicast(struct net_device *netdev)


	for (i = 0; i < DP_SEL_VHF_HASH_LEN; i++)
	for (i = 0; i < DP_SEL_VHF_HASH_LEN; i++)
		pdata->mchash_table[i] = 0;
		pdata->mchash_table[i] = 0;

	/* pfilter_table[0] has own HW address */
	/* pfilter_table[0] has own HW address */
	for (i = 1; i < NUM_OF_MAF; i++) {
	for (i = 1; i < NUM_OF_MAF; i++) {
			pdata->pfilter_table[i][0] =
		pdata->pfilter_table[i][0] = 0;
		pdata->pfilter_table[i][1] = 0;
		pdata->pfilter_table[i][1] = 0;
	}
	}


@@ -1279,10 +1281,11 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb)
			generic_handle_irq(dev->domain_data.phyirq);
			generic_handle_irq(dev->domain_data.phyirq);
			local_irq_enable();
			local_irq_enable();
		}
		}
	} else
	} else {
		netdev_warn(dev->net,
		netdev_warn(dev->net,
			    "unexpected interrupt: 0x%08x\n", intdata);
			    "unexpected interrupt: 0x%08x\n", intdata);
	}
	}
}


static int lan78xx_ethtool_get_eeprom_len(struct net_device *netdev)
static int lan78xx_ethtool_get_eeprom_len(struct net_device *netdev)
{
{
@@ -3383,10 +3386,11 @@ static void lan78xx_tx_bh(struct lan78xx_net *dev)
		if (skb)
		if (skb)
			dev_kfree_skb_any(skb);
			dev_kfree_skb_any(skb);
		usb_free_urb(urb);
		usb_free_urb(urb);
	} else
	} else {
		netif_dbg(dev, tx_queued, dev->net,
		netif_dbg(dev, tx_queued, dev->net,
			  "> tx, len %d, type 0x%x\n", length, skb->protocol);
			  "> tx, len %d, type 0x%x\n", length, skb->protocol);
	}
	}
}


static void lan78xx_rx_bh(struct lan78xx_net *dev)
static void lan78xx_rx_bh(struct lan78xx_net *dev)
{
{
@@ -3659,8 +3663,8 @@ static int lan78xx_probe(struct usb_interface *intf,
	struct net_device *netdev;
	struct net_device *netdev;
	struct usb_device *udev;
	struct usb_device *udev;
	int ret;
	int ret;
	unsigned maxp;
	unsigned int maxp;
	unsigned period;
	unsigned int period;
	u8 *buf = NULL;
	u8 *buf = NULL;


	udev = interface_to_usbdev(intf);
	udev = interface_to_usbdev(intf);