kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] tty: cyclades, cache HW version
Date: Thu, 25 Jun 2020 16:36:11 +0000	[thread overview]
Message-ID: <20200625163611.GE2549@kadam> (raw)
In-Reply-To: <20200624131858.GA9972@mwanda>

On Thu, Jun 25, 2020 at 10:57:46AM +0200, Jiri Slaby wrote:
> Hi,
> 
> On 24. 06. 20, 15:18, Dan Carpenter wrote:
> > [ Kees recently removed the uninitialized_var() variable so ancient
> >   code has started to print warnings.  GCC doesn't warn about
> >   uninitialized variables these days either.  It's been buggy for
> >   10 years so it's probably not an emergency.  -dan ]
> > 
> > Hello Jiri Slaby,
> > 
> > The patch 101b81590d8d: "tty: cyclades, cache HW version" from Jun
> > 11, 2009, leads to the following static checker warning:
> > 
> > 	drivers/tty/cyclades.c:3805 cy_pci_probe()
> > 	error: uninitialized symbol 'mailbox'.
> > 
> > drivers/tty/cyclades.c
> >   3640  static int cy_pci_probe(struct pci_dev *pdev,
> >   3641                  const struct pci_device_id *ent)
> >   3642  {
> >   3643          struct cyclades_card *card;
> >   3644          void __iomem *addr0 = NULL, *addr2 = NULL;
> >   3645          char *card_name = NULL;
> >   3646          u32 mailbox;
> >                 ^^^^^^^^^^^^
> > 
> >   3647          unsigned int device_id, nchan = 0, card_no, i, j;
> >   3648          unsigned char plx_ver;
> >   3649          int retval, irq;
> >   3650  
> >   3651          retval = pci_enable_device(pdev);
> >   3652          if (retval) {
> >   3653                  dev_err(&pdev->dev, "cannot enable device\n");
> >   3654                  goto err;
> >   3655          }
> >   3656  
> >   3657          /* read PCI configuration area */
> >   3658          irq = pdev->irq;
> >   3659          device_id = pdev->device & ~PCI_DEVICE_ID_MASK;
> 
> It looks like you and/or your analyzer missed this line ^^?

Both of us missed it.  It turns out there is a bug in Smatch and also
some missing features which triggered this warning.

Thanks for taking a look at it.

regards,
dan carpenter

      parent reply	other threads:[~2020-06-25 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 13:18 [bug report] tty: cyclades, cache HW version Dan Carpenter
2020-06-25  8:57 ` Jiri Slaby
2020-06-25 16:36 ` Dan Carpenter [this message]

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=20200625163611.GE2549@kadam \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).