Hi Deren, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on wireless-next/main] [also build test WARNING on wireless/main linus/master v6.0-rc4 next-20220906] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Deren-Wu/wifi-mt76-mt7921-introduce-Country-Location-Control-support/20220906-171401 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main config: arm64-randconfig-s042-20220906 (https://download.01.org/0day-ci/archive/20220907/202209070520.bQXe62tP-lkp@xxxxxxxxx/config) compiler: aarch64-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/e0bf37418dbcff6f111fbf6dad1d142180e2ec4f git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Deren-Wu/wifi-mt76-mt7921-introduce-Country-Location-Control-support/20220906-171401 git checkout e0bf37418dbcff6f111fbf6dad1d142180e2ec4f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1089:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [addressable] [usertype] len @@ got unsigned long @@ drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1089:25: sparse: expected restricted __le16 [addressable] [usertype] len drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1089:25: sparse: got unsigned long >> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1090:65: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int len @@ got restricted __le16 [addressable] [usertype] len @@ drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1090:65: sparse: expected int len drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:1090:65: sparse: got restricted __le16 [addressable] [usertype] len vim +1089 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c 1048 1049 static 1050 int __mt7921_mcu_set_clc(struct mt7921_dev *dev, u8 *alpha2, 1051 enum environment_cap env_cap, 1052 struct mt7921_clc *clc, 1053 u8 idx) 1054 { 1055 struct sk_buff *skb; 1056 struct { 1057 u8 ver; 1058 u8 pad0; 1059 __le16 len; 1060 u8 idx; 1061 u8 env; 1062 u8 pad1[2]; 1063 u8 alpha2[2]; 1064 u8 type[2]; 1065 u8 rsvd[64]; 1066 } __packed req = { 1067 .idx = idx, 1068 .env = env_cap, 1069 }; 1070 int ret, valid_cnt = 0; 1071 u8 i, *pos; 1072 1073 if (!clc) 1074 return 0; 1075 1076 pos = clc->data; 1077 for (i = 0; i < clc->nr_country; i++) { 1078 struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos; 1079 u16 len = le16_to_cpu(rule->len); 1080 1081 pos += len + sizeof(*rule); 1082 if (rule->alpha2[0] != alpha2[0] || 1083 rule->alpha2[1] != alpha2[1]) 1084 continue; 1085 1086 memcpy(req.alpha2, rule->alpha2, 2); 1087 memcpy(req.type, rule->type, 2); 1088 > 1089 req.len = sizeof(req) + len; > 1090 skb = __mt76_mcu_msg_alloc(&dev->mt76, &req, req.len, 1091 sizeof(req), GFP_KERNEL); 1092 if (!skb) 1093 return -ENOMEM; 1094 skb_put_data(skb, rule->data, len); 1095 1096 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, 1097 MCU_CE_CMD(SET_CLC), false); 1098 if (ret < 0) 1099 return ret; 1100 valid_cnt++; 1101 } 1102 1103 if (!valid_cnt) 1104 return -ENOENT; 1105 1106 return 0; 1107 } 1108 -- 0-DAY CI Kernel Test Service https://01.org/lkp