Hi Thomas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[cannot apply to mac80211/master v5.9-rc6 next-20200921]
[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]
url:
https://github.com/0day-ci/linux/commits/Thomas-Pedersen/add-support-for-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-s022-20200920 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> net/mac80211/util.c:4412:16: sparse: sparse: incorrect type in
return expression (different base types) @@ expected restricted __le16 @@ got int
[assigned] listen_interval @@
> net/mac80211/util.c:4412:16: sparse: expected restricted __le16
> net/mac80211/util.c:4412:16: sparse: got int [assigned] listen_interval
--
> net/mac80211/mlme.c:789:22: sparse: sparse: restricted __le16
degrades to integer
#
https://github.com/0day-ci/linux/commit/3fc1b6bebf4f30e15318e12b83607fb20...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Thomas-Pedersen/add-support-for-S1G-association/20200909-122015
git checkout 3fc1b6bebf4f30e15318e12b83607fb202bf7528
vim +4412 net/mac80211/util.c
4394
4395 __le16 ieee80211_encode_usf(int listen_interval)
4396 {
4397 u16 ui, usf = 0;
4398
4399 /* find greatest USF */
4400 while (usf < IEEE80211_MAX_USF) {
4401 if (listen_interval % listen_int_usf[usf + 1])
4402 break;
4403 usf += 1;
4404 }
4405 ui = listen_interval / listen_int_usf[usf];
4406
4407 /* error if there is a remainder. Should've been checked by user */
4408 WARN_ON_ONCE(ui > IEEE80211_MAX_UI);
4409 listen_interval = FIELD_PREP(LISTEN_INT_USF, usf) |
4410 FIELD_PREP(LISTEN_INT_UI, ui);
4411
4412 return listen_interval;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org