Commit 81f2b572 authored by YueHaibing's avatar YueHaibing Committed by Alexei Starovoitov

bpf: Remove set but not used variable 'first_key'

kernel/bpf/syscall.c: In function generic_map_lookup_batch:
kernel/bpf/syscall.c:1339:7: warning: variable first_key set but not used [-Wunused-but-set-variable]

It is never used, so remove it.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarBrian Vazquez <brianvv@google.com>
Link: https://lore.kernel.org/bpf/20200116145300.59056-1-yuehaibing@huawei.com
parent ba926603
......@@ -1336,7 +1336,6 @@ int generic_map_lookup_batch(struct bpf_map *map,
void *buf, *buf_prevkey, *prev_key, *key, *value;
int err, retry = MAP_LOOKUP_RETRIES;
u32 value_size, cp, max_count;
bool first_key = false;
if (attr->batch.elem_flags & ~BPF_F_LOCK)
return -EINVAL;
......@@ -1365,7 +1364,6 @@ int generic_map_lookup_batch(struct bpf_map *map,
}
err = -EFAULT;
first_key = false;
prev_key = NULL;
if (ubatch && copy_from_user(buf_prevkey, ubatch, map->key_size))
goto free_buf;
......
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