Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5458126ybh; Wed, 7 Aug 2019 06:22:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGU2XMCQkXsmaq2MhQZ/OSwPHrHklyyqFdEJ1FGtjcikliQJupZTYc7PbvYRy7I4niLzta X-Received: by 2002:aa7:914e:: with SMTP id 14mr9300105pfi.136.1565184131834; Wed, 07 Aug 2019 06:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565184131; cv=none; d=google.com; s=arc-20160816; b=k72X1iG0Qj2tmKhMrXROTU+xf5r6hl+DqRGVrjsJOi4rprL9Y4FAfn3r8GfGM4FEia QVSWrMWZ8c+2TMmJZ/oLVSPjtTXIS/Bmm/sgsNo/CZYmBDEBH+eKVG4YV+VU36tgslvC bfIVzUKH6BoaAQBVaw7UpGhiABiKhAGiLn1G1pTu7gAmlBcpHEjDFp9ahtAmjpLBkEbC m/PGDNCcDEi22ddw2pFzCVmsHxlRJk9zlEkGn806Z85N4L/QuO2qrXkY+RUqedEGAmjj R6Nf+6+bYP9RHN25iNJKQkl+SdEMh1ryw/uE9gbulcAa56Aj0pDHCg0QXlWuKAA4MI31 Z5yw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=o7gDnBpDuDwXcYQ6QlYY8efn/08+76Px3igT9oXiK5k=; b=ptW5Vr4FXyX4Y4Qknp9MPcx9b+0d0YzJKRDfiAOI8s+wV3nUGvJH7kKNchcIEllA7W bLCi1VhNiH6ndhdAjVBdu2wLT0NK7t/gEuQvwCEHgEMBUTIDPmkGx+lzMwM9yqK1utsR 2X1pKUQD/Q0as7Wlbghz9/ixvSJCP+nh2KOjAgg7cuhzdlKdWp26z9/ABy7F5ZUGyLyM NgcXsXjFxgopFf8140+qbiF1+YDHdt8C7YwzJukn4q1pJS2rzZCN4SFb5dMuykii546K JypkVIqi7GISNY/2SIZJfGKfVgoQXD7D6zQtbdAN40l5dQCq6zYWGuDZY/lzH+Ij908Z 6rxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mAq5BtUh; 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 j100si16844122pje.52.2019.08.07.06.21.55; Wed, 07 Aug 2019 06:22:11 -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=mAq5BtUh; 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 S2388297AbfHGNVD (ORCPT + 99 others); Wed, 7 Aug 2019 09:21:03 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44134 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388059AbfHGNVC (ORCPT ); Wed, 7 Aug 2019 09:21:02 -0400 Received: by mail-ed1-f68.google.com with SMTP id k8so86166315edr.11; Wed, 07 Aug 2019 06:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o7gDnBpDuDwXcYQ6QlYY8efn/08+76Px3igT9oXiK5k=; b=mAq5BtUhI3z8QjtUP5eyHqp1lRL4rZsr/asLgLulVustVZihkiAI2jA/936C7Ne/Ed +xw/1ApoAaKYMSgiUNBNjXo2CB+CdcNkkNBURfQpUUq+UP0tFevI/h82lw+gaAPp7c8S CKxixq506MTIMdNj/oi6+ck/B1WkHpBKKjeO+T0z3AGtCcwQgua98Bzsi8QbSvWdVGEx VerZihDR9aiEfl3sdyDR9h8+g96A8ucnrauVnkL+4u/bf2waTqhRWO11a2nNqQJ4WNHR OvlarePLz5a2++24v8FYro2WWIMz2kQJIkBt2//lDo34fG0oqRghVDuWHYj+Jb5PTL2D R/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o7gDnBpDuDwXcYQ6QlYY8efn/08+76Px3igT9oXiK5k=; b=ujj0mpFg3nG3BbA1sJ6girzUrXNwTU+qxnIJI3kE32lKtuGBrAYRawTOZatd3JKIwd 1LA7h1uULi7ca62v4dhdQW8NnOfQiDvcP69bUhXJF65XydteCH4E1hIXnbckAl4bguID k8ALTNR2IJiBNWGbqmlZZ/pfxzp0L6qC6OeXlff9QyaqTSyM+gIr2ZppMQ5KHUnmKkLS SEa4lIXrW0Bk7EI4mTWYRC636jY35aNZzSvT4JHw0VJ6qYsUWx1bdsy9tzw7f5FHr2JY Dv/A1reeR+kgWMD5XMN9O+F7j5EkmzudfrrrW7AGfVHbWEAE7ZmwFbGu6OY0csl2BZ9V Aqww== X-Gm-Message-State: APjAAAUrc8H3IboR0rnbo0jSjg878TBOQsumrCGyEGQunZ92+qhvA6yO vzDNUCDE9z3qtNlekGkSbEt6mVJhuBRvWNuvUXi0dw== X-Received: by 2002:a17:906:b7d8:: with SMTP id fy24mr8450496ejb.230.1565184060594; Wed, 07 Aug 2019 06:21:00 -0700 (PDT) MIME-Version: 1.0 References: <20190807130856.60792-1-yuehaibing@huawei.com> In-Reply-To: From: Vladimir Oltean Date: Wed, 7 Aug 2019 16:20:49 +0300 Message-ID: Subject: Re: [PATCH net-next] net: dsa: sja1105: remove set but not used variables 'tx_vid' and 'rx_vid' To: YueHaibing Cc: "David S. Miller" , Andrew Lunn , Vivien Didelot , Florian Fainelli , lkml , netdev 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, 7 Aug 2019 at 16:19, Vladimir Oltean wrote: > > On Wed, 7 Aug 2019 at 16:09, YueHaibing wrote: > > > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/net/dsa/sja1105/sja1105_main.c: In function sja1105_fdb_dump: > > drivers/net/dsa/sja1105/sja1105_main.c:1226:14: warning: > > variable tx_vid set but not used [-Wunused-but-set-variable] > > drivers/net/dsa/sja1105/sja1105_main.c:1226:6: warning: > > variable rx_vid set but not used [-Wunused-but-set-variable] > > > > They are not used since commit 6d7c7d948a2e ("net: dsa: > > sja1105: Fix broken learning with vlan_filtering disabled") > > > > Reported-by: Hulk Robot > > Signed-off-by: YueHaibing > > --- > > Reviewed-by: Vladimir Oltean This patch should also go to the "net" tree. > > > drivers/net/dsa/sja1105/sja1105_main.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c > > index d073baf..df976b25 100644 > > --- a/drivers/net/dsa/sja1105/sja1105_main.c > > +++ b/drivers/net/dsa/sja1105/sja1105_main.c > > @@ -1223,12 +1223,8 @@ static int sja1105_fdb_dump(struct dsa_switch *ds, int port, > > { > > struct sja1105_private *priv = ds->priv; > > struct device *dev = ds->dev; > > - u16 rx_vid, tx_vid; > > int i; > > > > - rx_vid = dsa_8021q_rx_vid(ds, port); > > - tx_vid = dsa_8021q_tx_vid(ds, port); > > - > > for (i = 0; i < SJA1105_MAX_L2_LOOKUP_COUNT; i++) { > > struct sja1105_l2_lookup_entry l2_lookup = {0}; > > u8 macaddr[ETH_ALEN]; > > -- > > 2.7.4 > > > >