From: kernel test robot <lkp@intel.com>
To: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
ath12k@lists.infradead.org, johannes@sipsolutions.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-wireless@vger.kernel.org,
Harshitha Prem <quic_hprem@quicinc.com>,
Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Subject: Re: [PATCH 13/13] wifi: ath12k: Advertise multi hardware iface combination
Date: Fri, 29 Mar 2024 07:42:41 +0800 [thread overview]
Message-ID: <202403290724.p8vSV474-lkp@intel.com> (raw)
In-Reply-To: <20240328072916.1164195-14-quic_periyasa@quicinc.com>
Hi Karthikeyan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on d69aef8084cc72df7b0f2583096d9b037c647ec8]
url: https://github.com/intel-lab-lkp/linux/commits/Karthikeyan-Periyasamy/wifi-cfg80211-Add-provision-to-advertise-multiple-radio-in-one-wiphy/20240328-153303
base: d69aef8084cc72df7b0f2583096d9b037c647ec8
patch link: https://lore.kernel.org/r/20240328072916.1164195-14-quic_periyasa%40quicinc.com
patch subject: [PATCH 13/13] wifi: ath12k: Advertise multi hardware iface combination
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20240329/202403290724.p8vSV474-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 79ba323bdd0843275019e16b6e9b35133677c514)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403290724.p8vSV474-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403290724.p8vSV474-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/wireless/ath/ath12k/mac.c:7:
In file included from include/net/mac80211.h:18:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/arm64/include/asm/cacheflush.h:11:
In file included from include/linux/kgdb.h:19:
In file included from include/linux/kprobes.h:28:
In file included from include/linux/ftrace.h:13:
In file included from include/linux/kallsyms.h:13:
In file included from include/linux/mm.h:2188:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath12k/mac.c:7795:11: warning: variable 'band' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
7795 | else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7796 | ar->supports_6ghz)
| ~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath12k/mac.c:7799:44: note: uninitialized use occurs here
7799 | chans = kzalloc(struct_size(chans, chans, band->n_channels),
| ^~~~
include/linux/overflow.h:294:53: note: expanded from macro 'struct_size'
294 | size_add(sizeof(*(p)), flex_array_size(p, member, count)))
| ^~~~~
include/linux/overflow.h:278:12: note: expanded from macro 'flex_array_size'
278 | size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member)))
| ^~~~~
drivers/net/wireless/ath/ath12k/mac.c:7795:7: note: remove the 'if' if its condition is always true
7795 | else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7796 | ar->supports_6ghz)
| ~~~~~~~~~~~~~~~~~~
7797 | band = &ar->mac.sbands[NL80211_BAND_6GHZ];
>> drivers/net/wireless/ath/ath12k/mac.c:7795:11: warning: variable 'band' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
7795 | else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath12k/mac.c:7799:44: note: uninitialized use occurs here
7799 | chans = kzalloc(struct_size(chans, chans, band->n_channels),
| ^~~~
include/linux/overflow.h:294:53: note: expanded from macro 'struct_size'
294 | size_add(sizeof(*(p)), flex_array_size(p, member, count)))
| ^~~~~
include/linux/overflow.h:278:12: note: expanded from macro 'flex_array_size'
278 | size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member)))
| ^~~~~
drivers/net/wireless/ath/ath12k/mac.c:7795:11: note: remove the '&&' if its condition is always true
7795 | else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath12k/mac.c:7788:39: note: initialize the variable 'band' to silence this warning
7788 | struct ieee80211_supported_band *band;
| ^
| = NULL
7 warnings generated.
vim +7795 drivers/net/wireless/ath/ath12k/mac.c
7783
7784 static
7785 struct ieee80211_chans_per_hw *ath12k_setup_per_hw_chan(struct ath12k *ar)
7786 {
7787 struct ieee80211_chans_per_hw *chans;
7788 struct ieee80211_supported_band *band;
7789
7790 if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP)
7791 band = &ar->mac.sbands[NL80211_BAND_2GHZ];
7792 else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
7793 !ar->supports_6ghz)
7794 band = &ar->mac.sbands[NL80211_BAND_5GHZ];
> 7795 else if (ar->pdev->cap.supported_bands & WMI_HOST_WLAN_5G_CAP &&
7796 ar->supports_6ghz)
7797 band = &ar->mac.sbands[NL80211_BAND_6GHZ];
7798
7799 chans = kzalloc(struct_size(chans, chans, band->n_channels),
7800 GFP_KERNEL);
7801 if (!chans)
7802 return NULL;
7803
7804 memcpy(chans->chans, band->channels,
7805 sizeof(*band->channels) * band->n_channels);
7806 chans->n_chans = band->n_channels;
7807
7808 return chans;
7809 }
7810
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-03-28 23:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240328072916.1164195-14-quic_periyasa@quicinc.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202403290724.p8vSV474-lkp@intel.com \
--to=lkp@intel.com \
--cc=ath12k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_hprem@quicinc.com \
--cc=quic_periyasa@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox