Hi Ian, 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-rc6 next-20220921] [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/Ian-Lin/Fix-connect-p2p-issue-series/20220922-184424 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20220923/202209231808.8r6Ydw4M-lkp@xxxxxxxxx/config) compiler: hppa-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/620f981fff55c74cd1fa86e5b6c177d51344f654 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ian-Lin/Fix-connect-p2p-issue-series/20220922-184424 git checkout 620f981fff55c74cd1fa86e5b6c177d51344f654 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/net/wireless/broadcom/brcm80211/brcmfmac/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function 'brcmf_inform_single_bss': >> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3039:28: warning: passing argument 1 of 'memcpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 3039 | memcpy(ssid->data, bi->SSID, bi->SSID_len); | ~~~~^~~~~~ In file included from include/linux/string.h:20, from include/linux/uuid.h:12, from include/linux/mod_devicetable.h:13, from arch/parisc/include/asm/hardware.h:5, from arch/parisc/include/asm/processor.h:17, from arch/parisc/include/asm/spinlock.h:7, from arch/parisc/include/asm/atomic.h:22, from include/linux/atomic.h:7, from arch/parisc/include/asm/bitops.h:13, from include/linux/bitops.h:68, from include/linux/kernel.h:22, from drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:8: arch/parisc/include/asm/string.h:9:22: note: expected 'void *' but argument is of type 'const u8 *' {aka 'const unsigned char *'} 9 | void * memcpy(void * dest,const void *src,size_t count); | ~~~~~~~^~~~ vim +3039 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 2990 2991 static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, 2992 struct brcmf_bss_info_le *bi) 2993 { 2994 struct wiphy *wiphy = cfg_to_wiphy(cfg); 2995 struct brcmf_pub *drvr = cfg->pub; 2996 struct cfg80211_bss *bss; 2997 enum nl80211_band band; 2998 struct brcmu_chan ch; 2999 u16 channel; 3000 u32 freq; 3001 u16 notify_capability; 3002 u16 notify_interval; 3003 u8 *notify_ie; 3004 size_t notify_ielen; 3005 struct cfg80211_inform_bss bss_data = {}; 3006 const struct brcmf_tlv *ssid = NULL; 3007 3008 if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) { 3009 bphy_err(drvr, "Bss info is larger than buffer. Discarding\n"); 3010 return -EINVAL; 3011 } 3012 3013 if (!bi->ctl_ch) { 3014 ch.chspec = le16_to_cpu(bi->chanspec); 3015 cfg->d11inf.decchspec(&ch); 3016 bi->ctl_ch = ch.control_ch_num; 3017 } 3018 channel = bi->ctl_ch; 3019 3020 if (channel <= CH_MAX_2G_CHANNEL) 3021 band = NL80211_BAND_2GHZ; 3022 else 3023 band = NL80211_BAND_5GHZ; 3024 3025 freq = ieee80211_channel_to_frequency(channel, band); 3026 bss_data.chan = ieee80211_get_channel(wiphy, freq); 3027 bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20; 3028 bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime()); 3029 3030 notify_capability = le16_to_cpu(bi->capability); 3031 notify_interval = le16_to_cpu(bi->beacon_period); 3032 notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset); 3033 notify_ielen = le32_to_cpu(bi->ie_length); 3034 bss_data.signal = (s16)le16_to_cpu(bi->RSSI) * 100; 3035 3036 ssid = brcmf_parse_tlvs(notify_ie, notify_ielen, WLAN_EID_SSID); 3037 if (ssid && ssid->data[0] == '\0' && ssid->len == bi->SSID_len) { 3038 /* Update SSID for hidden AP */ > 3039 memcpy(ssid->data, bi->SSID, bi->SSID_len); 3040 } 3041 3042 brcmf_dbg(CONN, "bssid: %pM\n", bi->BSSID); 3043 brcmf_dbg(CONN, "Channel: %d(%d)\n", channel, freq); 3044 brcmf_dbg(CONN, "Capability: %X\n", notify_capability); 3045 brcmf_dbg(CONN, "Beacon interval: %d\n", notify_interval); 3046 brcmf_dbg(CONN, "Signal: %d\n", bss_data.signal); 3047 3048 bss = cfg80211_inform_bss_data(wiphy, &bss_data, 3049 CFG80211_BSS_FTYPE_UNKNOWN, 3050 (const u8 *)bi->BSSID, 3051 0, notify_capability, 3052 notify_interval, notify_ie, 3053 notify_ielen, GFP_KERNEL); 3054 3055 if (!bss) 3056 return -ENOMEM; 3057 3058 cfg80211_put_bss(wiphy, bss); 3059 3060 return 0; 3061 } 3062 -- 0-DAY CI Kernel Test Service https://01.org/lkp