Skip to content

Commit 7296216

Browse files
Colin Ian Kingborkmann
authored andcommitted
xdp: remove redundant variable 'headroom'
Variable 'headroom' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable ‘headroom’ set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <[email protected]> Acked-by: Björn Töpel <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 18baed2 commit 7296216

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/core/xdp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,14 @@ EXPORT_SYMBOL_GPL(xdp_attachment_setup);
412412

413413
struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
414414
{
415-
unsigned int metasize, headroom, totsize;
415+
unsigned int metasize, totsize;
416416
void *addr, *data_to_copy;
417417
struct xdp_frame *xdpf;
418418
struct page *page;
419419

420420
/* Clone into a MEM_TYPE_PAGE_ORDER0 xdp_frame. */
421421
metasize = xdp_data_meta_unsupported(xdp) ? 0 :
422422
xdp->data - xdp->data_meta;
423-
headroom = xdp->data - xdp->data_hard_start;
424423
totsize = xdp->data_end - xdp->data + metasize;
425424

426425
if (sizeof(*xdpf) + totsize > PAGE_SIZE)

0 commit comments

Comments
 (0)