All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] mt76: add mac80211 driver for MT7615 PCIe-based chipsets
@ 2019-05-03 13:06 Dan Carpenter
  2019-05-04  0:01 ` Ryder Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-05-03 13:06 UTC (permalink / raw)
  To: ryder.lee-NuS5LvNUpcJWk0Htik3J/w
  Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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?

  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] mt76: add mac80211 driver for MT7615 PCIe-based chipsets
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Ryder Lee @ 2019-05-04  0:01 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-04  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.