public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Ryder Lee <ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [bug report] mt76: add mac80211 driver for MT7615 PCIe-based chipsets
Date: Sat, 4 May 2019 08:01:02 +0800	[thread overview]
Message-ID: <1556928062.5650.5.camel@mtkswgap22> (raw)
In-Reply-To: <20190503130642.GH29695@mwanda>

On Fri, 2019-05-03 at 16:06 +0300, Dan Carpenter wrote:
> Hello Ryder Lee,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 04b8e65922f6: "mt76: add mac80211 driver for MT7615 
> PCIe-based chipsets" from Apr 1, 2019, leads to the following Smatch 
> complaint:
> 
>     drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1012 mt7615_mcu_set_wtbl_key()
>     error: we previously assumed 'key' could be null (see line 1008)
> 
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
>   1007			cipher = mt7615_get_key_info(key, wtbl_sec_key.key_material);
>   1008			if (cipher == MT_CIPHER_NONE && key)
>                                                         ^^^
> This check doesn't make much sense.  Do you want to just remove it?

Just in case that 'key != NULL' but 'cipher == MT_CIPHER_NONE'. It
should not happen.

>   1009				return -EOPNOTSUPP;
>   1010	
>   1011			wtbl_sec_key.cipher_id = cipher;
>   1012			wtbl_sec_key.key_id = key->keyidx;
>                                               ^^^^^^^^^^^
>   1013			wtbl_sec_key.key_len = key->keylen;
>   1014		} else {
> 
> regards,
> dan carpenter

      reply	other threads:[~2019-05-04  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 13:06 [bug report] mt76: add mac80211 driver for MT7615 PCIe-based chipsets Dan Carpenter
2019-05-04  0:01 ` Ryder Lee [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=1556928062.5650.5.camel@mtkswgap22 \
    --to=ryder.lee-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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