Re: [PATCH 1/8] mac80211: minstrel_ht: clean up CCK code

kernel test robot
2020-12-30T04:26:08Z

[-- Attachment #1: Type: text/plain, Size: 3115 bytes --]

Hi Felix,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master v5.11-rc1 next-20201223]
[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/Felix-Fietkau/mac80211-minstrel_ht-clean-up-CCK-code/20201230-000429
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: i386-randconfig-c001-20201229 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/5899ab94b901a3c2e4fbeefae344f54649662b1c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Felix-Fietkau/mac80211-minstrel_ht-clean-up-CCK-code/20201230-000429
git checkout 5899ab94b901a3c2e4fbeefae344f54649662b1c
# save the attached .config to linux build tree
make W=1 ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

net/mac80211/rc80211_minstrel_ht.c: In function 'minstrel_ht_get_tp_avg':
>> net/mac80211/rc80211_minstrel_ht.c:348:26: warning: variable 'overhead' set but not used [-Wunused-but-set-variable]
348 | unsigned int nsecs = 0, overhead = mi->overhead;
| ^~~~~~~~

vim +/overhead +348 net/mac80211/rc80211_minstrel_ht.c

339
340 /*
341 * Return current throughput based on the average A-MPDU length, taking into
342 * account the expected number of retransmissions and their expected length
343 */
344 int
345 minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate,
346 int prob_avg)
347 {
> 348 unsigned int nsecs = 0, overhead = mi->overhead;
349 unsigned int ampdu_len = 1;
350
351 /* do not account throughput if sucess prob is below 10% */
352 if (prob_avg < MINSTREL_FRAC(10, 100))
353 return 0;
354
355 if (group == MINSTREL_CCK_GROUP)
356 overhead = mi->overhead_legacy;
357 else
358 ampdu_len = minstrel_ht_avg_ampdu_len(mi);
359
360 nsecs = 1000 * mi->overhead / ampdu_len;
361 nsecs += minstrel_mcs_groups[group].duration[rate] <<
362 minstrel_mcs_groups[group].shift;
363
364 /*
365 * For the throughput calculation, limit the probability value to 90% to
366 * account for collision related packet error rate fluctuation
367 * (prob is scaled - see MINSTREL_FRAC above)
368 */
369 if (prob_avg > MINSTREL_FRAC(90, 100))
370 return MINSTREL_TRUNC(100000 * ((MINSTREL_FRAC(90, 100) * 1000)
371 / nsecs));
372 else
373 return MINSTREL_TRUNC(100000 * ((prob_avg * 1000) / nsecs));
374 }
375

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45545 bytes --]