Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp722799pxj; Thu, 27 May 2021 10:10:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySUwGvL2Pk34Bku/KVWRzNXPHkNQicgk6UjQwHI2SoDIFClILierjDpH662SmpYTj8WXVy X-Received: by 2002:a05:6602:2b84:: with SMTP id r4mr3677013iov.206.1622135414252; Thu, 27 May 2021 10:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622135414; cv=none; d=google.com; s=arc-20160816; b=AxYP9jXf8pp3peepmEpraEZICqQgU4tLG1HeEZfjoY/09tidt/VqhPeV6euuhvtU8i e5OVRCJsJaW+utrwOIpbiXFd2yF7skhWEnEosSBrkPCY21WkjDCATzwRchRYH1sJ6wHJ R5DrK1MnBlAW1UYfSQxcvAHo5upgVCwt51qk7gd5ViBYd9azDI9nPx+Um6fXed9hJs9j zvnptPTskuehiI2/xK+Z/WRFn9rco++fHcsn4R5ALzJxBcFNZgKxNzmkVznndtBWYbO3 ddHJnbNGLsaRVXFnLQXbh6qwkNuLzkNKrpwR98VdQWT1e2AIUwH8Y8ga06R1iGpOmbma DlYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=weMp1/O0J4Xr+u/oujo0ZvOdZrwaUGlgQsxZA7gLF3I=; b=sE0aZjk5agEnpKYwVGOBzi0HSnHpZxwdGzAW+1eeNOTnIlDaD93vMIA6WsHtt910Ls AMZjjILi1TUPKnyJOrMjf4DhdMNc4XPjWjLnczn7ut0V+1XGCfPO3zcpknFNKQGBVVUG 8APh9cxKUBKx7xuPDkuSrcxRYuAP/805exB9w2S7nmnW2GLcTMfG27GAq5t2S0sQLqER cBX+twJqUw+F3bGxrhBlVQPbPv829fRoz8hD2r/2pFKrbZlU+ARPTu2hWNuQb+8e0NED VShqWS43vGUQpDkEK44FNSlPKEVeWTOLsl7O7HzJoDwdrc7EgM0RqbD2aEYlbHnk3lG+ 3vrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si1785534ilk.68.2021.05.27.10.09.36; Thu, 27 May 2021 10:10:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235451AbhE0PLm (ORCPT + 99 others); Thu, 27 May 2021 11:11:42 -0400 Received: from mga06.intel.com ([134.134.136.31]:49130 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235409AbhE0PLh (ORCPT ); Thu, 27 May 2021 11:11:37 -0400 IronPort-SDR: ck1LiCcellxJF00fXeT+iCiZlmKMaDwM8+FDn8IaOcRR6TpFdA3rToSGn2O7gDyaWNOZwbiboz Z2nlOfLpjriQ== X-IronPort-AV: E=McAfee;i="6200,9189,9996"; a="263956575" X-IronPort-AV: E=Sophos;i="5.82,334,1613462400"; d="scan'208";a="263956575" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2021 08:08:47 -0700 IronPort-SDR: Wj929PUHpl8sBYnB2olrul2/4w69SoSFv3GcjDKcMhOdbr0Tj1iG3tjPCIVfFzuZO7zBDTeuUx U2ZLGBMOiqtg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,334,1613462400"; d="scan'208";a="480620895" Received: from ranger.igk.intel.com ([10.102.21.164]) by fmsmga002.fm.intel.com with ESMTP; 27 May 2021 08:08:43 -0700 Date: Thu, 27 May 2021 16:55:49 +0200 From: Maciej Fijalkowski To: Colin King Cc: Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] bpf: devmap: remove redundant assignment of variable drops Message-ID: <20210527145549.GA7570@ranger.igk.intel.com> References: <20210527143637.795393-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210527143637.795393-1-colin.king@canonical.com> User-Agent: Mutt/1.12.1 (2019-06-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 27, 2021 at 03:36:37PM +0100, Colin King wrote: > From: Colin Ian King > > The variable drops is being assigned a value that is never > read, it is being updated later on. The assignment is redundant and > can be removed. Acked-by: Maciej Fijalkowski Would help if you would have CCed me given the fact that hour ago I confirmed that it could be removed :p but no big deal. Thanks! > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > kernel/bpf/devmap.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c > index f9148daab0e3..fe3873b5d13d 100644 > --- a/kernel/bpf/devmap.c > +++ b/kernel/bpf/devmap.c > @@ -388,8 +388,6 @@ static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags) > to_send = dev_map_bpf_prog_run(bq->xdp_prog, bq->q, cnt, dev); > if (!to_send) > goto out; > - > - drops = cnt - to_send; > } > > sent = dev->netdev_ops->ndo_xdp_xmit(dev, to_send, bq->q, flags); > -- > 2.31.1 >