Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4705508imm; Wed, 30 May 2018 10:19:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIeyNqY8rvaBUXTUXGGWzhFAMW6u5hkF9m6g/wWQXX0Wn1Cn0l20QZa9Vyp/yE/b/gTv4AH X-Received: by 2002:a63:7b4e:: with SMTP id k14-v6mr2851443pgn.261.1527700764559; Wed, 30 May 2018 10:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527700764; cv=none; d=google.com; s=arc-20160816; b=0rYjHLCc5TLu1CpAJaJy/TU9oC/Wslc9lekJy8sltXmIrFi5TnIEC+g+Tjf9OHMTRl HbokQmHganXTi9DhbIRJlf9y0QltUMwIp4rB8qxrseELReHr4WSJWyzoVgbuFT7cdbZW rITe9+I1swlPytHlY/Q8IDhaTMuVVmHzrA2MyR8vzWYLD+GxPWSlb7wFcqV5JW5XE1FX ZsMicJJ3rVyyLKPAvYoHGfvBByNhvPG0jnPEM7y5toV8+wjLzqw2Hbf7yhvZHB2Tuprv GRerNINSFSu7nuHDqFhsfMUTSnI2eSddwmGsKqImKzzz/1JRoLLta4i9d/oCnL2G+OPf f3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ZzaHlE208noLYQRgSdVXpq3cbJTbwuymbFVyKdYwvL8=; b=PfBQTMsi6Msr7jU7AqX5ZWbWw4erBfSvlTAGCd3YEooEFVSVEQtP0pcUMQuRiUqReR 7tNuaMfAn0kWyw7Au6heBpX7bBGDKZAbtuvoKVbe18NKtKziEzRuGiuXox1fPD2i6Lmz g4SD+rsRn53407D3LdSEtsrolRZ/M5dMik21f7Ni2KxRAGR7eeIfeU8cIMRjk5XlkS/t RF7sAaLOFuNw7+SVPT90ZpYQP1vkeVrUAFUZti7A34KzQAeosp6i4kpLWnl0DPR2BUsl 8WA+L0/IUzQk7YrhxN9eFg2NuCIUii7ZLMBjyH+Tl9M6ouIEZ2kxA3g7V4GwCZ03onkQ 6b0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g1wshYJf; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si34419146pld.218.2018.05.30.10.19.09; Wed, 30 May 2018 10:19:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g1wshYJf; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753799AbeE3RSp (ORCPT + 99 others); Wed, 30 May 2018 13:18:45 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:37591 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753706AbeE3RSn (ORCPT ); Wed, 30 May 2018 13:18:43 -0400 Received: by mail-qt0-f196.google.com with SMTP id q13-v6so24231728qtp.4; Wed, 30 May 2018 10:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZzaHlE208noLYQRgSdVXpq3cbJTbwuymbFVyKdYwvL8=; b=g1wshYJf2YDW6Kb/n6L1V2GQMV6Lqgd6FgUZOZS7JmLIhBQvZEMURlG1gAbKGI1JEJ AqkvmYj4xA8IgAAJ/7gzdlGfxurVzKfLL28fVGRWDSKH2Yl7WCnmjgQ1eqCS+Y/6rIPN mQSTyQauXJsAECsTaZ5M7x+z7JjCALwPvWHg/0hg71xFN00qZp/QIm+s2FxEVG9spAiz O/2QJjJT/36//RWItLU3QA+9q/A+x49TOERXTgrdayNL7+VyqOuerIvrYBp4Hhf17U2n pXHI1EK4LYGtCXUUF+7mlSckYXj//SKn1HZLW7wR87xs47jTMFtMS5kgKCPtDcZ0UWvR 1nyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZzaHlE208noLYQRgSdVXpq3cbJTbwuymbFVyKdYwvL8=; b=lujd9zgQ+wMk/pdnoVXN37JrN6WGkFbvZ1fzNF1dvyHfgyh0SRCNbwzd903XBglbAJ PFqEuVTBKxZOClO/uQ3zbL3yy4zCKoXVIH9ysD4Q3B1rO1KJX3549lGgxQTJ13LsYtpW 26n4UtK2xwF6CiAoFHesObdTpaztxu9ZBi1AjqfOdavWg/z+JfEvW5MxNURz8rvFLjcx emIyEWMbAZvQhl6D2rCCFqWEw+MTh4I2LRQTvAEPHp5LvqGs83A1m1IPPQldgkVUuvNY 42g9cIYz96hXrQOU0hfB+cBO0513aHAK4CVbKUNDj8oW0rTmGKz7uqw6/4gmWRRcdDmU sqPw== X-Gm-Message-State: APt69E1+lYr1WvbYMdVanG6Rp3MUN0tlyFWzGU/5Gd/yCwPjE6quzeW2 /kc84DzEmVnxKqgiN4O3lBLDIaQ0C2rm1q6kX/I= X-Received: by 2002:a0c:88ac:: with SMTP id 41-v6mr3390666qvn.201.1527700723134; Wed, 30 May 2018 10:18:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:9e10:0:0:0:0:0 with HTTP; Wed, 30 May 2018 10:18:42 -0700 (PDT) In-Reply-To: <20180530150916.16808-1-colin.king@canonical.com> References: <20180530150916.16808-1-colin.king@canonical.com> From: Song Liu Date: Wed, 30 May 2018 10:18:42 -0700 Message-ID: Subject: Re: [PATCH][next] bpf: devmap: remove redundant assignment of dev = dev To: Colin King Cc: Alexei Starovoitov , Daniel Borkmann , Networking , kernel-janitors@vger.kernel.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 8:09 AM, Colin King wrote: > 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 Acked-by: Song Liu > --- > 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 >