drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:114:10: warning: implicit conversion from 'enum mt76_cipher_type' to 'enum mcu_cipher_type'

From: kernel test robot
Date: Wed Jul 14 2021 - 12:05:01 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 40226a3d96ef8ab8980f032681c8bfd46d63874e
commit: c368362c36d3d4cedbc9a1c9caa95960912cc429 mt76: fix iv and CCMP header insertion
date: 4 weeks ago
config: i386-randconfig-s002-20210714 (attached as .config)
compiler: gcc-10 (Debian 10.2.1-6) 10.2.1 20210110
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c368362c36d3d4cedbc9a1c9caa95960912cc429
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c368362c36d3d4cedbc9a1c9caa95960912cc429
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c: In function 'mt7915_mcu_get_cipher':
>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:114:10: warning: implicit conversion from 'enum mt76_cipher_type' to 'enum mcu_cipher_type' [-Wenum-conversion]
114 | return MT_CIPHER_NONE;
| ^~~~~~~~~~~~~~


vim +114 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c

c336318f57a92d Ryder Lee 2020-04-25 90
c368362c36d3d4 Ryder Lee 2021-06-17 91 static enum mcu_cipher_type
e57b7901469fc0 Ryder Lee 2020-04-25 92 mt7915_mcu_get_cipher(int cipher)
e57b7901469fc0 Ryder Lee 2020-04-25 93 {
e57b7901469fc0 Ryder Lee 2020-04-25 94 switch (cipher) {
e57b7901469fc0 Ryder Lee 2020-04-25 95 case WLAN_CIPHER_SUITE_WEP40:
c368362c36d3d4 Ryder Lee 2021-06-17 96 return MCU_CIPHER_WEP40;
e57b7901469fc0 Ryder Lee 2020-04-25 97 case WLAN_CIPHER_SUITE_WEP104:
c368362c36d3d4 Ryder Lee 2021-06-17 98 return MCU_CIPHER_WEP104;
e57b7901469fc0 Ryder Lee 2020-04-25 99 case WLAN_CIPHER_SUITE_TKIP:
c368362c36d3d4 Ryder Lee 2021-06-17 100 return MCU_CIPHER_TKIP;
e57b7901469fc0 Ryder Lee 2020-04-25 101 case WLAN_CIPHER_SUITE_AES_CMAC:
c368362c36d3d4 Ryder Lee 2021-06-17 102 return MCU_CIPHER_BIP_CMAC_128;
e57b7901469fc0 Ryder Lee 2020-04-25 103 case WLAN_CIPHER_SUITE_CCMP:
c368362c36d3d4 Ryder Lee 2021-06-17 104 return MCU_CIPHER_AES_CCMP;
e57b7901469fc0 Ryder Lee 2020-04-25 105 case WLAN_CIPHER_SUITE_CCMP_256:
c368362c36d3d4 Ryder Lee 2021-06-17 106 return MCU_CIPHER_CCMP_256;
e57b7901469fc0 Ryder Lee 2020-04-25 107 case WLAN_CIPHER_SUITE_GCMP:
c368362c36d3d4 Ryder Lee 2021-06-17 108 return MCU_CIPHER_GCMP;
e57b7901469fc0 Ryder Lee 2020-04-25 109 case WLAN_CIPHER_SUITE_GCMP_256:
c368362c36d3d4 Ryder Lee 2021-06-17 110 return MCU_CIPHER_GCMP_256;
e57b7901469fc0 Ryder Lee 2020-04-25 111 case WLAN_CIPHER_SUITE_SMS4:
c368362c36d3d4 Ryder Lee 2021-06-17 112 return MCU_CIPHER_WAPI;
e57b7901469fc0 Ryder Lee 2020-04-25 113 default:
e57b7901469fc0 Ryder Lee 2020-04-25 @114 return MT_CIPHER_NONE;
e57b7901469fc0 Ryder Lee 2020-04-25 115 }
e57b7901469fc0 Ryder Lee 2020-04-25 116 }
e57b7901469fc0 Ryder Lee 2020-04-25 117

:::::: The code at line 114 was first introduced by commit
:::::: e57b7901469fc0b021930b83a8094baaf3d81b09 mt76: add mac80211 driver for MT7915 PCIe-based chipsets

:::::: TO: Ryder Lee <ryder.lee@xxxxxxxxxxxx>
:::::: CC: Felix Fietkau <nbd@xxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip