Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289785
b: refs/heads/master
c: 0beaca2
h: refs/heads/master
i:
  289783: 25e5fd6
v: v3
  • Loading branch information
Ben Hutchings committed Jan 5, 2012
1 parent 5a7a5a4 commit f617d9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: e9e01846c7e18a3b5682b54e50f1005949737bd9
refs/heads/master: 0beaca2ca0b3c12dabab046f1541b09179ec449c
15 changes: 7 additions & 8 deletions trunk/drivers/net/ethernet/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ static inline unsigned int efx_rx_buf_offset(struct efx_nic *efx,
/* Offset is always within one page, so we don't need to consider
* the page order.
*/
return (((__force unsigned long) buf->dma_addr & (PAGE_SIZE - 1)) +
efx->type->rx_buffer_hash_size);
return ((__force unsigned long) buf->dma_addr & (PAGE_SIZE - 1)) +
efx->type->rx_buffer_hash_size;
}
static inline unsigned int efx_rx_buf_size(struct efx_nic *efx)
{
Expand All @@ -111,8 +111,7 @@ static u8 *efx_rx_buf_eh(struct efx_nic *efx, struct efx_rx_buffer *buf)
if (buf->is_page)
return page_address(buf->u.page) + efx_rx_buf_offset(efx, buf);
else
return ((u8 *)buf->u.skb->data +
efx->type->rx_buffer_hash_size);
return (u8 *)buf->u.skb->data + efx->type->rx_buffer_hash_size;
}

static inline u32 efx_rx_buf_hash(const u8 *eh)
Expand All @@ -122,10 +121,10 @@ static inline u32 efx_rx_buf_hash(const u8 *eh)
return __le32_to_cpup((const __le32 *)(eh - 4));
#else
const u8 *data = eh - 4;
return ((u32)data[0] |
(u32)data[1] << 8 |
(u32)data[2] << 16 |
(u32)data[3] << 24);
return (u32)data[0] |
(u32)data[1] << 8 |
(u32)data[2] << 16 |
(u32)data[3] << 24;
#endif
}

Expand Down

0 comments on commit f617d9d

Please sign in to comment.