Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122721
b: refs/heads/master
c: c40cf51
h: refs/heads/master
i:
  122719: 8879f71
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Dec 16, 2008
1 parent 4afbc24 commit 37e6de0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82ad33297410c1af8e993210da76e114a4c1670d
refs/heads/master: c40cf519f0c0f0cb0579d853949ef517a8bb494d
8 changes: 4 additions & 4 deletions trunk/drivers/net/hp100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ static int hp100_init_rxpdl(struct net_device *dev,
*(pdlptr + 2) = (u_int) virt_to_whatever(dev, pdlptr); /* Address Frag 1 */
*(pdlptr + 3) = 4; /* Length Frag 1 */

return ((((MAX_RX_FRAG * 2 + 2) + 3) / 4) * 4);
return roundup(MAX_RX_FRAG * 2 + 2, 4);
}


Expand All @@ -1227,7 +1227,7 @@ static int hp100_init_txpdl(struct net_device *dev,
ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr); /* +1 */
ringptr->skb = (void *) NULL;

return ((((MAX_TX_FRAG * 2 + 2) + 3) / 4) * 4);
return roundup(MAX_TX_FRAG * 2 + 2, 4);
}

/*
Expand Down Expand Up @@ -1256,7 +1256,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
/* Note: This depends on the alloc_skb functions allocating more
* space than requested, i.e. aligning to 16bytes */

ringptr->skb = dev_alloc_skb(((MAX_ETHER_SIZE + 2 + 3) / 4) * 4);
ringptr->skb = dev_alloc_skb(roundup(MAX_ETHER_SIZE + 2, 4));

if (NULL != ringptr->skb) {
/*
Expand All @@ -1279,7 +1279,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
#ifdef HP100_DEBUG_BM
printk("hp100: %s: build_rx_pdl: PDH@0x%x, skb->data (len %d) at 0x%x\n",
dev->name, (u_int) ringptr->pdl,
((MAX_ETHER_SIZE + 2 + 3) / 4) * 4,
roundup(MAX_ETHER_SIZE + 2, 4),
(unsigned int) ringptr->skb->data);
#endif

Expand Down

0 comments on commit 37e6de0

Please sign in to comment.