All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] net: dsa: Mock-up driver
Date: Mon, 03 Apr 2017 18:55:52 +0000	[thread overview]
Message-ID: <20170403185552.GA10603@mwanda> (raw)

Hello Florian Fainelli,

The patch 98cd1552ea27: "net: dsa: Mock-up driver" from Mar 30, 2017,
leads to the following static checker warning:

	drivers/net/dsa/dsa_loop.c:181 dsa_loop_port_vlan_del()
	error: XXX uninitialized symbol 'pvid'.

drivers/net/dsa/dsa_loop.c
   163          bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
   164          struct dsa_loop_priv *ps = ds->priv;
   165          struct mii_bus *bus = ps->bus;
   166          struct dsa_loop_vlan *vl;
   167          u16 vid, pvid;
   168  
   169          dev_dbg(ds->dev, "%s\n", __func__);
   170  
   171          /* Just do a sleeping operation to make lockdep checks effective */
   172          mdiobus_read(bus, ps->port_base + port, MII_BMSR);
   173  
   174          for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
   175                  vl = &ps->vlans[vid];
   176  
   177                  vl->members &= ~BIT(port);
   178                  if (untagged)
   179                          vl->untagged &= ~BIT(port);
   180  
   181                  if (pvid = vid)

What's pvid supposed to start out as?  This isn't right.

   182                          pvid = 1;
   183          }
   184          ps->pvid = pvid;
   185  
   186          return 0;

regards,
dan carpenter

             reply	other threads:[~2017-04-03 18:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 18:55 Dan Carpenter [this message]
2017-04-03 18:59 ` [bug report] net: dsa: Mock-up driver Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170403185552.GA10603@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.