Skip to content

Commit

Permalink
net: Fix checkpatch, Missing a blank line after declarations
Browse files Browse the repository at this point in the history
This patch fixes multiple occurrences of checkpatch WARNING: Missing
a blank line after declarations.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
tcharding authored and David S. Miller committed Feb 10, 2017
1 parent eb13da1 commit f4563a7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,7 @@ u16 __skb_tx_hash(const struct net_device *dev, struct sk_buff *skb,

if (dev->num_tc) {
u8 tc = netdev_get_prio_tc_map(dev, skb->priority);

qoffset = dev->tc_to_txq[tc].offset;
qcount = dev->tc_to_txq[tc].count;
}
Expand Down Expand Up @@ -2719,9 +2720,11 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
{
#ifdef CONFIG_HIGHMEM
int i;

if (!(dev->features & NETIF_F_HIGHDMA)) {
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];

if (PageHighMem(skb_frag_page(frag)))
return 1;
}
Expand All @@ -2735,6 +2738,7 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
dma_addr_t addr = page_to_phys(skb_frag_page(frag));

if (!pdev->dma_mask || addr + PAGE_SIZE - 1 > *pdev->dma_mask)
return 1;
}
Expand Down Expand Up @@ -3210,6 +3214,7 @@ static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
if (queue_index < 0 || skb->ooo_okay ||
queue_index >= dev->real_num_tx_queues) {
int new_index = get_xps_queue(dev, skb);

if (new_index < 0)
new_index = skb_tx_hash(dev, skb);

Expand Down Expand Up @@ -3239,6 +3244,7 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev,

if (dev->real_num_tx_queues != 1) {
const struct net_device_ops *ops = dev->netdev_ops;

if (ops->ndo_select_queue)
queue_index = ops->ndo_select_queue(dev, skb, accel_priv,
__netdev_pick_tx);
Expand Down Expand Up @@ -3768,6 +3774,7 @@ static int netif_rx_internal(struct sk_buff *skb)
#endif
{
unsigned int qtail;

ret = enqueue_to_backlog(skb, get_cpu(), &qtail);
put_cpu();
}
Expand Down Expand Up @@ -3827,6 +3834,7 @@ static __latent_entropy void net_tx_action(struct softirq_action *h)

while (clist) {
struct sk_buff *skb = clist;

clist = clist->next;

WARN_ON(atomic_read(&skb->users));
Expand Down Expand Up @@ -5663,6 +5671,7 @@ static int netdev_adjacent_sysfs_add(struct net_device *dev,
struct list_head *dev_list)
{
char linkname[IFNAMSIZ+7];

sprintf(linkname, dev_list == &dev->adj_list.upper ?
"upper_%s" : "lower_%s", adj_dev->name);
return sysfs_create_link(&(dev->dev.kobj), &(adj_dev->dev.kobj),
Expand All @@ -5673,6 +5682,7 @@ static void netdev_adjacent_sysfs_del(struct net_device *dev,
struct list_head *dev_list)
{
char linkname[IFNAMSIZ+7];

sprintf(linkname, dev_list == &dev->adj_list.upper ?
"upper_%s" : "lower_%s", name);
sysfs_remove_link(&(dev->dev.kobj), linkname);
Expand Down Expand Up @@ -5942,6 +5952,7 @@ void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev)
{
struct netdev_notifier_changeupper_info changeupper_info;

ASSERT_RTNL();

changeupper_info.upper_dev = upper_dev;
Expand Down Expand Up @@ -6659,6 +6670,7 @@ EXPORT_SYMBOL(dev_change_xdp_fd);
static int dev_new_index(struct net *net)
{
int ifindex = net->ifindex;

for (;;) {
if (++ifindex <= 0)
ifindex = 1;
Expand Down Expand Up @@ -7072,6 +7084,7 @@ void netif_tx_stop_all_queues(struct net_device *dev)

for (i = 0; i < dev->num_tx_queues; i++) {
struct netdev_queue *txq = netdev_get_tx_queue(dev, i);

netif_tx_stop_queue(txq);
}
}
Expand Down

0 comments on commit f4563a7

Please sign in to comment.