@@ -137,7 +137,8 @@ static int __must_check smsc95xx_write_reg(struct usbnet *dev, u32 index,
}
/* Loop until the read is completed with timeout
- * called with phy_mutex held */
+ * called with phy_mutex held
+ */
static int __must_check smsc95xx_phy_wait_not_busy(struct usbnet *dev)
{
unsigned long start_time = jiffies;
@@ -470,7 +471,8 @@ static int __must_check smsc95xx_write_reg_async(struct usbnet *dev, u16 index,
/* returns hash bit number for given MAC address
* example:
- * 01 00 5E 00 00 01 -> returns bit number 31 */
+ * 01 00 5E 00 00 01 -> returns bit number 31
+ */
static unsigned int smsc95xx_hash(char addr[ETH_ALEN])
{
return (ether_crc(ETH_ALEN, addr) >> 26) & 0x3f;
@@ -882,7 +884,7 @@ static int smsc95xx_reset(struct usbnet *dev)
u32 read_buf, burst_cap;
int ret = 0, timeout;
- netif_dbg(dev, ifup, dev->net, "entering smsc95xx_reset\n");
+ netif_dbg(dev, ifup, dev->net, "entering %s\n", __func__);
ret = smsc95xx_write_reg(dev, HW_CFG, HW_CFG_LRST_);
if (ret < 0)
@@ -1065,7 +1067,7 @@ static int smsc95xx_reset(struct usbnet *dev)
return ret;
}
- netif_dbg(dev, ifup, dev->net, "smsc95xx_reset, return 0\n");
+ netif_dbg(dev, ifup, dev->net, "%s, return 0\n", __func__);
return 0;
}
@@ -1076,7 +1078,7 @@ static const struct net_device_ops smsc95xx_netdev_ops = {
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_get_stats64 = dev_get_tstats64,
- .ndo_set_mac_address = eth_mac_addr,
+ .ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_eth_ioctl = smsc95xx_ioctl,
.ndo_set_rx_mode = smsc95xx_set_multicast,
@@ -1471,7 +1473,8 @@ static int smsc95xx_autosuspend(struct usbnet *dev, u32 link_up)
/* link is down so enter EDPD mode, but only if device can
* reliably resume from it. This check should be redundant
* as current FEATURE_REMOTE_WAKEUP parts also support
- * FEATURE_PHY_NLP_CROSSOVER but it's included for clarity */
+ * FEATURE_PHY_NLP_CROSSOVER but it's included for clarity
+ */
if (!(pdata->features & FEATURE_PHY_NLP_CROSSOVER)) {
netdev_warn(dev->net, "EDPD not supported\n");
return -EBUSY;
@@ -1922,11 +1925,11 @@ static u32 smsc95xx_calc_csum_preamble(struct sk_buff *skb)
*/
static bool smsc95xx_can_tx_checksum(struct sk_buff *skb)
{
- unsigned int len = skb->len - skb_checksum_start_offset(skb);
+ unsigned int len = skb->len - skb_checksum_start_offset(skb);
- if (skb->len <= 45)
- return false;
- return skb->csum_offset < (len - (4 + 1));
+ if (skb->len <= 45)
+ return false;
+ return skb->csum_offset < (len - (4 + 1));
}
static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
@@ -1955,7 +1958,8 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
if (csum) {
if (!smsc95xx_can_tx_checksum(skb)) {
/* workaround - hardware tx checksum does not work
- * properly with extremely small packets */
+ * properly with extremely small packets
+ */
long csstart = skb_checksum_start_offset(skb);
__wsum calc = csum_partial(skb->data + csstart,
skb->len - csstart, 0);
Fix some coding style issues in drivers/net/usb/smsc95xx.c that checkpatch.pl script reported. Signed-off-by: Liel Harel <liel.harel@gmail.com> --- drivers/net/usb/smsc95xx.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-)