Commit 9ceec7d3 authored by John Efstathiades's avatar John Efstathiades Committed by David S. Miller

lan78xx: Fix white space and style issues

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>
parent fbd029df
...@@ -382,7 +382,7 @@ struct lan78xx_net { ...@@ -382,7 +382,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 */
...@@ -392,7 +392,7 @@ struct lan78xx_net { ...@@ -392,7 +392,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;
...@@ -501,7 +501,7 @@ static int lan78xx_read_stats(struct lan78xx_net *dev, ...@@ -501,7 +501,7 @@ static int lan78xx_read_stats(struct lan78xx_net *dev,
if (likely(ret >= 0)) { if (likely(ret >= 0)) {
src = (u32 *)stats; src = (u32 *)stats;
dst = (u32 *)data; 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]); le32_to_cpus(&src[i]);
dst[i] = src[i]; dst[i] = src[i];
} }
...@@ -515,10 +515,11 @@ static int lan78xx_read_stats(struct lan78xx_net *dev, ...@@ -515,10 +515,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)
...@@ -959,7 +960,7 @@ static int lan78xx_dataport_wait_not_busy(struct lan78xx_net *dev) ...@@ -959,7 +960,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;
} }
...@@ -1067,9 +1068,10 @@ static void lan78xx_set_multicast(struct net_device *netdev) ...@@ -1067,9 +1068,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;
} }
...@@ -1264,9 +1266,10 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb) ...@@ -1264,9 +1266,10 @@ 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)
...@@ -3356,9 +3359,10 @@ static void lan78xx_tx_bh(struct lan78xx_net *dev) ...@@ -3356,9 +3359,10 @@ 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)
...@@ -3632,8 +3636,8 @@ static int lan78xx_probe(struct usb_interface *intf, ...@@ -3632,8 +3636,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment