Linux wireless drivers development
 help / color / mirror / Atom feed
From: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [bug report] qtnfmac: introduce new FullMAC driver for Quantenna chipsets
Date: Mon, 19 Jun 2017 14:35:00 -0700	[thread overview]
Message-ID: <3730af22-ad1e-a6d9-273d-af1fe5dc7cb2@quantenna.com> (raw)
In-Reply-To: <20170619105552.GB23995@elgon.mountain>

On 06/19/2017 03:55 AM, Dan Carpenter wrote:
> 
> External Email
> 
> 
> Hello Igor Mitsyanko,
> 
> The patch 98f44cb0655c: "qtnfmac: introduce new FullMAC driver for
> Quantenna chipsets" from May 11, 2017, leads to the following static
> checker warning:
> 
>          drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c:285 qtnf_pcie_init_dma_mask()
>          info: return a literal instead of 'ret'
> 
> drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
>     277  static int
>     278  qtnf_pcie_init_dma_mask(struct qtnf_pcie_bus_priv *priv, u64 dma_mask)
>     279  {
>     280          int ret;
>     281
>     282          ret = dma_supported(&priv->pdev->dev, dma_mask);
>     283          if (!ret) {
>     284                  pr_err("DMA mask %llu not supported\n", dma_mask);
>     285                  return ret;
> 
> We should probably return a negative?  It's also possible that returning
> zero is intended but then we should use a literal so it's more clearly
> deliberate.

Hello Dan,
it is indeed a bug, 0 is not expected in case of error. Will fix, thanks!

> 
>     286          }
>     287
>     288          ret = pci_set_dma_mask(priv->pdev, dma_mask);
>     289          if (ret) {
>     290                  pr_err("failed to set DMA mask %llu\n", dma_mask);
>     291                  return ret;
>     292          }
>     293
>     294          ret = pci_set_consistent_dma_mask(priv->pdev, dma_mask);
>     295          if (ret) {
>     296                  pr_err("failed to set consistent DMA mask %llu\n", dma_mask);
>     297                  return ret;
>     298          }
>     299
>     300          return ret;
>     301  }
> 
> regards,
> dan carpenter
> 

      reply	other threads:[~2017-06-19 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 10:55 [bug report] qtnfmac: introduce new FullMAC driver for Quantenna chipsets Dan Carpenter
2017-06-19 21:35 ` Igor Mitsyanko [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=3730af22-ad1e-a6d9-273d-af1fe5dc7cb2@quantenna.com \
    --to=igor.mitsyanko.os@quantenna.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-wireless@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