Commit 8554768c authored by Jan Sokolowski's avatar Jan Sokolowski Committed by Jeff Kirsher

i40e: Use a local variable for readability

Use a local variable to make the code a bit more readable.
Signed-off-by: default avatarJan Sokolowski <jan.sokolowski@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6a9a5ec1
...@@ -3528,6 +3528,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf, ...@@ -3528,6 +3528,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
u16 i = xdp_ring->next_to_use; u16 i = xdp_ring->next_to_use;
struct i40e_tx_buffer *tx_bi; struct i40e_tx_buffer *tx_bi;
struct i40e_tx_desc *tx_desc; struct i40e_tx_desc *tx_desc;
void *data = xdpf->data;
u32 size = xdpf->len; u32 size = xdpf->len;
dma_addr_t dma; dma_addr_t dma;
...@@ -3535,8 +3536,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf, ...@@ -3535,8 +3536,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
xdp_ring->tx_stats.tx_busy++; xdp_ring->tx_stats.tx_busy++;
return I40E_XDP_CONSUMED; return I40E_XDP_CONSUMED;
} }
dma = dma_map_single(xdp_ring->dev, data, size, DMA_TO_DEVICE);
dma = dma_map_single(xdp_ring->dev, xdpf->data, size, DMA_TO_DEVICE);
if (dma_mapping_error(xdp_ring->dev, dma)) if (dma_mapping_error(xdp_ring->dev, dma))
return I40E_XDP_CONSUMED; return I40E_XDP_CONSUMED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment