]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Use a more sensible cast in efx_rx_buf_offset()
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 30 Jan 2012 16:55:05 +0000 (16:55 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Mon, 30 Jan 2012 16:58:45 +0000 (16:58 +0000)
commit03ad4f074ecf3f33fc3c55365702f52be8d058bb
tree8f94c0c1d4c2347dc0dc5099440d3dc3b19e203f
parent4a891eb1bbda3a3f71ead7ef4a81889e404d48b3
sfc: Use a more sensible cast in efx_rx_buf_offset()

This function returns the page offset of the buffer, which can be
calculated based on either its DMA address or its virtual address.  It
used to use the virtual address and we would cast that to unsigned
long, as anything smaller would result in a compiler warning.  Now
that it's using the DMA address we should use unsigned int, matching
the return type.  It is also unnecessary to use __force.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/rx.c