lan78xx: Fix white space and style issues

[ Upstream commit 9ceec7d33adf9647293f24d2fd9a055b89c63864 ]

Fix white space and code style issues identified by checkpatch.

Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 1eecc7ab82c4 ("net: lan78xx: fix runtime PM count underflow on link stop")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
John Efstathiades 2021-08-24 19:56:04 +01:00 committed by Ksawlii
parent bf6b61c8a7
commit 0b359bd275

View file

@ -385,7 +385,7 @@ struct lan78xx_net {
struct usb_anchor deferred;
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 */
size_t rx_urb_size; /* size for rx urbs */
@ -395,7 +395,7 @@ struct lan78xx_net {
wait_queue_head_t *wait;
unsigned char suspend_count;
unsigned maxpacket;
unsigned int maxpacket;
struct timer_list delay;
struct timer_list stat_monitor;
@ -504,7 +504,7 @@ static int lan78xx_read_stats(struct lan78xx_net *dev,
if (likely(ret >= 0)) {
src = (u32 *)stats;
dst = (u32 *)data;
for (i = 0; i < sizeof(*stats)/sizeof(u32); i++) {
for (i = 0; i < sizeof(*stats) / sizeof(u32); i++) {
le32_to_cpus(&src[i]);
dst[i] = src[i];
}
@ -518,10 +518,11 @@ static int lan78xx_read_stats(struct lan78xx_net *dev,
return ret;
}
#define check_counter_rollover(struct1, dev_stats, member) { \
if (struct1->member < dev_stats.saved.member) \
dev_stats.rollover_count.member++; \
}
#define check_counter_rollover(struct1, dev_stats, member) \
do { \
if ((struct1)->member < (dev_stats).saved.member) \
(dev_stats).rollover_count.member++; \
} while (0)
static void lan78xx_check_stat_rollover(struct lan78xx_net *dev,
struct lan78xx_statstage *stats)
@ -962,7 +963,7 @@ static int lan78xx_dataport_wait_not_busy(struct lan78xx_net *dev)
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;
}
@ -1070,9 +1071,10 @@ static void lan78xx_set_multicast(struct net_device *netdev)
for (i = 0; i < DP_SEL_VHF_HASH_LEN; i++)
pdata->mchash_table[i] = 0;
/* pfilter_table[0] has own HW address */
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;
}
@ -1267,9 +1269,10 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb)
generic_handle_irq(dev->domain_data.phyirq);
local_irq_enable();
}
} else
} else {
netdev_warn(dev->net,
"unexpected interrupt: 0x%08x\n", intdata);
}
}
static int lan78xx_ethtool_get_eeprom_len(struct net_device *netdev)
@ -3334,9 +3337,10 @@ drop:
if (skb)
dev_kfree_skb_any(skb);
usb_free_urb(urb);
} else
} else {
netif_dbg(dev, tx_queued, dev->net,
"> tx, len %d, type 0x%x\n", length, skb->protocol);
}
}
static void lan78xx_rx_bh(struct lan78xx_net *dev)
@ -3610,8 +3614,8 @@ static int lan78xx_probe(struct usb_interface *intf,
struct net_device *netdev;
struct usb_device *udev;
int ret;
unsigned maxp;
unsigned period;
unsigned int maxp;
unsigned int period;
u8 *buf = NULL;
udev = interface_to_usbdev(intf);