tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head:   5c94a82422585f88765f58e0f8b4b84c1fabbb31
commit: b98c50fdd3bfa201487ef7fe3b9b41d76c7802d2 [8/14] ath10k: allow dynamic 
SAR power limits via common API
config: x86_64-randconfig-a011-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
c9439ca36342fb6013187d0a69aef92736951476)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=b98c50fdd3bfa201487ef7fe3b9b41d76c7802d2
        git remote add ath6kl 
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
        git fetch --no-tags ath6kl pending
        git checkout b98c50fdd3bfa201487ef7fe3b9b41d76c7802d2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath10k/mac.c:3010:39: warning: address of array 
>> 'sar->sub_specs' will always evaluate to 'true' [-Wpointer-bool-conversion]
               sar->num_sub_specs == 0 || !sar->sub_specs) {
                                          ~~~~~~^~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8635:7: warning: format specifies type 
'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                              vifs[i].old_ctx->def.chan->center_freq,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/debug.h:285:37: note: expanded from macro 
'ath10k_dbg'
                   __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
                                              ~~~    ^~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8636:7: warning: format specifies type 
'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                              vifs[i].new_ctx->def.chan->center_freq,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/debug.h:285:37: note: expanded from macro 
'ath10k_dbg'
                   __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
                                              ~~~    ^~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8708:6: warning: format specifies type 
'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                      ctx->def.chan->center_freq, ctx->def.width, ctx);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/debug.h:285:37: note: expanded from macro 
'ath10k_dbg'
                   __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
                                              ~~~    ^~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8732:6: warning: format specifies type 
'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                      ctx->def.chan->center_freq, ctx->def.width, ctx);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/debug.h:285:37: note: expanded from macro 
'ath10k_dbg'
                   __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
                                              ~~~    ^~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/mac.c:8797:6: warning: format specifies type 
'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat]
                      ctx->def.chan->center_freq, ctx->def.width, ctx, changed);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/ath/ath10k/debug.h:285:37: note: expanded from macro 
'ath10k_dbg'
                   __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \
                                              ~~~    ^~~~~~~~~~~
   6 warnings generated.


vim +3010 drivers/net/wireless/ath/ath10k/mac.c

  2993  
  2994  static int ath10k_mac_set_sar_specs(struct ieee80211_hw *hw,
  2995                                      const struct cfg80211_sar_specs 
*sar)
  2996  {
  2997          const struct cfg80211_sar_sub_specs *sub_specs;
  2998          struct ath10k *ar = hw->priv;
  2999          u32 i;
  3000          int ret;
  3001  
  3002          mutex_lock(&ar->conf_mutex);
  3003  
  3004          if (!ar->hw_params.dynamic_sar_support) {
  3005                  ret = -EOPNOTSUPP;
  3006                  goto err;
  3007          }
  3008  
  3009          if (!sar || sar->type != NL80211_SAR_TYPE_POWER ||
> 3010              sar->num_sub_specs == 0 || !sar->sub_specs) {
  3011                  ret = -EINVAL;
  3012                  goto err;
  3013          }
  3014  
  3015          sub_specs = sar->sub_specs;
  3016  
  3017          /* 0dbm is not a practical value for ath10k, so use 0
  3018           * as no SAR limitation on it.
  3019           */
  3020          ar->tx_power_2g_limit = 0;
  3021          ar->tx_power_5g_limit = 0;
  3022  
  3023          /* note the power is in 0.25dbm unit, while ath10k uses
  3024           * 0.5dbm unit.
  3025           */
  3026          for (i = 0; i < sar->num_sub_specs; i++) {
  3027                  if (sub_specs->freq_range_index == 0)
  3028                          ar->tx_power_2g_limit = sub_specs->power / 2;
  3029                  else if (sub_specs->freq_range_index == 1)
  3030                          ar->tx_power_5g_limit = sub_specs->power / 2;
  3031  
  3032                  sub_specs++;
  3033          }
  3034  
  3035          ret = ath10k_mac_set_sar_power(ar);
  3036          if (ret) {
  3037                  ath10k_warn(ar, "failed to set sar power: %d", ret);
  3038                  goto err;
  3039          }
  3040  
  3041  err:
  3042          mutex_unlock(&ar->conf_mutex);
  3043          return ret;
  3044  }
  3045  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to