summaryrefslogtreecommitdiff
path: root/net/core/xdp.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-08-30 17:27:18 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-09-01 02:35:53 +0300
commit7296216776dbbe5094e218035debe1c0a5a3674a (patch)
tree78bf4a6545bb32505923f5ec4f56c1965f5d5642 /net/core/xdp.c
parent18baed2684b02f752b5d800bb113e99730e1d24b (diff)
downloadlinux-7296216776dbbe5094e218035debe1c0a5a3674a.tar.xz
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 <colin.king@canonical.com> Acked-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/core/xdp.c')
-rw-r--r--net/core/xdp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/xdp.c b/net/core/xdp.c
index 654dbb19707e..4b2b194f4f1f 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -412,7 +412,7 @@ EXPORT_SYMBOL_GPL(xdp_attachment_setup);
struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
{
- unsigned int metasize, headroom, totsize;
+ unsigned int metasize, totsize;
void *addr, *data_to_copy;
struct xdp_frame *xdpf;
struct page *page;
@@ -420,7 +420,6 @@ struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp)
/* Clone into a MEM_TYPE_PAGE_ORDER0 xdp_frame. */
metasize = xdp_data_meta_unsupported(xdp) ? 0 :
xdp->data - xdp->data_meta;
- headroom = xdp->data - xdp->data_hard_start;
totsize = xdp->data_end - xdp->data + metasize;
if (sizeof(*xdpf) + totsize > PAGE_SIZE)