Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4580217imm; Wed, 30 May 2018 08:10:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKR4relQO9T0JjYqY5jAzYi4BnZo0VBP/ToMHg3v/PqU/Vsp0FyN2SYylu1plN1498Dq8KE X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr3168183pla.207.1527692999949; Wed, 30 May 2018 08:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527692999; cv=none; d=google.com; s=arc-20160816; b=i+4h1EX3jxZTTTZ49S4I7poWHBKxwBglzB4sAzBa1pqsRbh6Q7dvdVgpj6e9vzYMrh +HF+lKGYN6D+WBO+IgzoXwlHon/ehsDJW+sH/qNAwT9WKtFblGyDgDJa99gQP0zIHOTp P+rly48yBvtIH6mxTTMsaTYkCr+xLoh7/Jt6OpcLUAQ+5+StleSJcebbaOR5qUgdBVKi /WeCw6VnriMP1QwiIn97IOgiYE+d/qHTpBvAZ7tYHbJNw2Ve2QxXdEbf9raEd7M6frJ2 PXsCfXdIJrDqPzPgwGAZ+PrWk3i0hWxuWPabNhLZqn97FIJWkNEKiq+os5ygCna4n+Ym e1tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=YD2PZPe/Bf36VyHGD3SQSBshQE9ZRs2t+4ZaOJyyVA4=; b=HkcYv//Q2M80FsRVdvI77V9bQh3ZyCFBqB9gSBsYYTSX1P9zdaCh3QgaXl5wgSTCou 98AeX73gmZscfCWGnxqpR6wAjNsBd331dAhJL0xPVeEliHb4JI/TPtt5AP9wTzAnAjnq 2ArJvqfkf6ROoeqauITF4VeODFkyWXk+gA5t+MJihPm9z2loqezuYM0KI+HVKAAQKPN7 2IG8fljSjknQMwBnytw8QNtwRpKM9I9yYWTw2uuaLKCCwo8nvPuWF02kCKj857FI1FcI qaQDM1gdLArjoMUqIVs9Ho8UyMcdepTpEDXIe1hnKP0tIxORwDLQWi0mBuQoTmF9zVd7 z7Rg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4-v6si27366466pgp.336.2018.05.30.08.09.45; Wed, 30 May 2018 08:09:59 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753655AbeE3PJY (ORCPT + 99 others); Wed, 30 May 2018 11:09:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37927 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753180AbeE3PJU (ORCPT ); Wed, 30 May 2018 11:09:20 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fO2iz-0001c6-6p; Wed, 30 May 2018 15:09:17 +0000 From: Colin King To: Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] bpf: devmap: remove redundant assignment of dev = dev Date: Wed, 30 May 2018 16:09:16 +0100 Message-Id: <20180530150916.16808-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The assignment dev = dev is redundant and should be removed. Detected by CoverityScan, CID#1469486 ("Evaluation order violation") Signed-off-by: Colin Ian King --- kernel/bpf/devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index ae16d0c373ef..1fe3fe60508a 100644 --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c @@ -352,7 +352,7 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, static void *dev_map_lookup_elem(struct bpf_map *map, void *key) { struct bpf_dtab_netdev *obj = __dev_map_lookup_elem(map, *(u32 *)key); - struct net_device *dev = dev = obj ? obj->dev : NULL; + struct net_device *dev = obj ? obj->dev : NULL; return dev ? &dev->ifindex : NULL; } -- 2.17.0