* [nbd168-wireless:mt76 35/40] drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2959:44: sparse: sparse: incorrect type in argument 1 (different base types)
@ 2020-04-23 16:33 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-04-23 16:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4079 bytes --]
tree: https://github.com/nbd168/wireless mt76
head: ff13e4b9ee7594866c49fe6418c7640570bf1582
commit: cbfcdc7fdd917e304d5dda7a16a157304cc5e6bd [35/40] mt76: mt7615: add support for applying DC offset calibration from EEPROM
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout cbfcdc7fdd917e304d5dda7a16a157304cc5e6bd
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2953:28: sparse: sparse: restricted __le16 degrades to integer
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2954:33: sparse: sparse: bad assignment (-=) to restricted __le16
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2959:44: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [assigned] [usertype] freq @@ got resunsigned short [assigned] [usertype] freq @@
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2959:44: sparse: expected unsigned short [assigned] [usertype] freq
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2959:44: sparse: got restricted __le16 [assigned] [usertype] center_freq
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2975:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [addressable] [assigned] [usertype] center_freq @@ got ed] [usertype] center_freq @@
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2975:33: sparse: expected restricted __le16 [addressable] [assigned] [usertype] center_freq
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2975:33: sparse: got int [assigned] freq2
vim +2959 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
2910
2911 int mt7615_mcu_apply_rx_dcoc(struct mt7615_phy *phy)
2912 {
2913 struct mt7615_dev *dev = phy->dev;
2914 struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
2915 int freq2 = chandef->center_freq2;
2916 int ret;
2917 struct {
2918 u8 direction;
2919 u8 runtime_calibration;
2920 u8 _rsv[2];
2921
2922 __le16 center_freq;
2923 u8 bw;
2924 u8 band;
2925 u8 is_freq2;
2926 u8 success;
2927 u8 dbdc_en;
2928
2929 u8 _rsv2;
2930
2931 struct {
2932 __le32 sx0_i_lna[4];
2933 __le32 sx0_q_lna[4];
2934
2935 __le32 sx2_i_lna[4];
2936 __le32 sx2_q_lna[4];
2937 } dcoc_data[4];
2938 } req = {
2939 .direction = 1,
2940
2941 .center_freq = cpu_to_le16(chandef->center_freq1),
2942 .bw = mt7615_mcu_chan_bw(chandef),
2943 .band = chandef->center_freq1 > 4000,
2944 .dbdc_en = !!dev->mt76.phy2,
2945 };
2946 int freq_idx;
2947 u8 *eep = dev->mt76.eeprom.data;
2948
2949 if (!(eep[MT_EE_CALDATA_FLASH] & MT_EE_CALDATA_FLASH_RX_CAL))
2950 return 0;
2951
2952 if (chandef->width == NL80211_CHAN_WIDTH_160) {
2953 freq2 = req.center_freq + 40;
2954 req.center_freq -= 40;
2955 }
2956
2957 again:
2958 req.runtime_calibration = 1;
> 2959 freq_idx = mt7615_dcoc_freq_idx(req.center_freq, chandef->width);
2960 if (freq_idx < 0)
2961 goto out;
2962
2963 memcpy(req.dcoc_data, eep + MT7615_EEPROM_DCOC_OFFSET +
2964 freq_idx * MT7615_EEPROM_DCOC_SIZE,
2965 sizeof(req.dcoc_data));
2966 req.runtime_calibration = 0;
2967
2968 out:
2969 ret = __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_RXDCOC_CAL, &req,
2970 sizeof(req), true);
2971
2972 if ((chandef->width == NL80211_CHAN_WIDTH_80P80 ||
2973 chandef->width == NL80211_CHAN_WIDTH_160) && !req.is_freq2) {
2974 req.is_freq2 = true;
> 2975 req.center_freq = freq2;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-23 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 16:33 [nbd168-wireless:mt76 35/40] drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:2959:44: sparse: sparse: incorrect type in argument 1 (different base types) kbuild test robot
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.