Skip to content

Commit

Permalink
cxgb3: simplify need_skb_unmap
Browse files Browse the repository at this point in the history
We can use CONFIG_NEED_DMA_MAP_STATE to see if a platform does real
DMA unmapping.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
FUJITA Tomonori authored and David S. Miller committed Jul 9, 2010
1 parent 57b2eaf commit 122e28e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions drivers/net/cxgb3/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,11 @@ static inline void refill_rspq(struct adapter *adapter,
*/
static inline int need_skb_unmap(void)
{
/*
* This structure is used to tell if the platform needs buffer
* unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines anything.
*/
struct dummy {
DEFINE_DMA_UNMAP_ADDR(addr);
};

return sizeof(struct dummy) != 0;
#ifdef CONFIG_NEED_DMA_MAP_STATE
return 1;
#else
return 0;
#endif
}

/**
Expand Down

0 comments on commit 122e28e

Please sign in to comment.