Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8608603ybl; Thu, 16 Jan 2020 20:49:31 -0800 (PST) X-Google-Smtp-Source: APXvYqy5gdvocncRdcmsja4lO1R3k1V1ScYcFk4ddSGOFfrjMbuKHdEXNwRB25ngq0MBbNtexKdE X-Received: by 2002:aca:d483:: with SMTP id l125mr2075983oig.124.1579236571687; Thu, 16 Jan 2020 20:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579236571; cv=none; d=google.com; s=arc-20160816; b=d0n2qiZv3TvE91DkvG37k0H4LlshWpyc0fbDufr1XFcCE8iVF/IVVlhQiTOcBbjYfC qtRWFe6Ble9m2gCpjZ5P2rUYnHZZntGgeZ3KWpL4xlB1CgU/9g9WO6TmwMotPN3V4b33 RI6aMwLBEp95dn43hA0HDGpjEnJDaFLtK6dJPcZpvdUz4iGyIkoBRQDTtOi2kuGTCXE+ yXK9D2I/8pTl0bPVHsumkdUspNQogLEGRSS0aod/ENGpT8743P2ZGzDsyC+HkzwPaayU ZW7cAVWnW44UQzcOneuh0uz2OvQp3a+zVKoVuzNv6jGAg/UsyRhzBluG4jyq5q12ZMIK j9rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=S6LWvDGur0qOhlRuTPmExycHYXvIAhDual2g3Bx8roc=; b=VCSV3W6l6LUOE5U5J+r/cbtcueqdlBZwuzzfcYImwlbSK1XBW3I1vaCAYFhOxh8NX7 KLqEoxBnIhgn1TK/2pU7zIqGnjb0gojuuuXVOFmNea65WHHtv4ryHK2I/IZSs8YtFpEu h32StLK/seMEqtlptkduDex0yIYtWllUVNNiIxni22S7nSJuPy/pEfM2KtMAhXpZvDr/ dqVQshP6RvNClnxviL4NrD8BsL7/k8Y5LklavOnVoC3h2Lg0Uylbhf4NV3PiwZSJzWds nWUFJuUOkUXQwP9DuSPbYv5u1KS8wgy6NNWCUlRJb5s5UIGNe9h0EFG7o2CrvS1z+nA8 aa/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si5035869otp.151.2020.01.16.20.49.20; Thu, 16 Jan 2020 20:49:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388468AbgAQBiX (ORCPT + 99 others); Thu, 16 Jan 2020 20:38:23 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9180 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730720AbgAQBiX (ORCPT ); Thu, 16 Jan 2020 20:38:23 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7529E2450DA21B6F08DA; Fri, 17 Jan 2020 09:38:20 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Fri, 17 Jan 2020 09:38:12 +0800 From: YueHaibing To: , , , , , , CC: , , , YueHaibing Subject: [PATCH bpf-next] bpf: Remove set but not used variable 'first_key' Date: Thu, 16 Jan 2020 22:53:00 +0800 Message-ID: <20200116145300.59056-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Hulk Robot Signed-off-by: YueHaibing --- kernel/bpf/syscall.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 0d94d36..c26a714 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -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; -- 2.7.4