Skip to content

Commit 022484c

Browse files
Julia Lawalldavem330
authored andcommitted
drivers/net: Adjust confusing if indentation
In amd8111e.c, indent the branch of an if. In eepro.c, outdent the code following the if. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b0f1d8 commit 022484c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/net/amd8111e.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int amd8111e_set_coalesce(struct net_device * dev, enum coal_mode cmod)
396396
event_count = coal_conf->rx_event_count;
397397
if( timeout > MAX_TIMEOUT ||
398398
event_count > MAX_EVENT_COUNT )
399-
return -EINVAL;
399+
return -EINVAL;
400400

401401
timeout = timeout * DELAY_TIMER_CONV;
402402
writel(VAL0|STINTEN, mmio+INTEN0);
@@ -409,7 +409,7 @@ static int amd8111e_set_coalesce(struct net_device * dev, enum coal_mode cmod)
409409
event_count = coal_conf->tx_event_count;
410410
if( timeout > MAX_TIMEOUT ||
411411
event_count > MAX_EVENT_COUNT )
412-
return -EINVAL;
412+
return -EINVAL;
413413

414414

415415
timeout = timeout * DELAY_TIMER_CONV;

‎drivers/net/eepro.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,11 +1457,11 @@ hardware_send_packet(struct net_device *dev, void *buf, short length)
14571457
if (net_debug > 5)
14581458
printk(KERN_DEBUG "%s: entering hardware_send_packet routine.\n", dev->name);
14591459

1460-
/* determine how much of the transmit buffer space is available */
1461-
if (lp->tx_end > lp->tx_start)
1460+
/* determine how much of the transmit buffer space is available */
1461+
if (lp->tx_end > lp->tx_start)
14621462
tx_available = lp->xmt_ram - (lp->tx_end - lp->tx_start);
1463-
else if (lp->tx_end < lp->tx_start)
1464-
tx_available = lp->tx_start - lp->tx_end;
1463+
else if (lp->tx_end < lp->tx_start)
1464+
tx_available = lp->tx_start - lp->tx_end;
14651465
else tx_available = lp->xmt_ram;
14661466

14671467
if (((((length + 3) >> 1) << 1) + 2*XMT_HEADER) >= tx_available) {

0 commit comments

Comments
 (0)