[ath:pending 8/12] drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2515:77: warning: left shift count >= width of type

kernel test robot lkp at intel.com
Thu Oct 3 11:37:47 PDT 2024


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git pending
head:   08dd5d93509f962500dc983864b4effb2600831a
commit: f6a46bc3719cc6b445cb071a7dd6968891ffb169 [8/12] wifi: ath12k: Support DMAC Reset Stats
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20241004/202410040200.Mwb85JzQ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241004/202410040200.Mwb85JzQ-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410040200.Mwb85JzQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c: In function 'ath12k_htt_print_dmac_reset_stats_tlv':
>> drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2515:77: warning: left shift count >= width of type [-Wshift-count-overflow]
    2515 |         time = ((unsigned long)le32_to_cpu(htt_stats_buf->reset_time_hi_ms) << 32) |
         |                                                                             ^~
   drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2519:81: warning: left shift count >= width of type [-Wshift-count-overflow]
    2519 |         time = ((unsigned long)le32_to_cpu(htt_stats_buf->disengage_time_hi_ms) << 32) |
         |                                                                                 ^~
   drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2523:78: warning: left shift count >= width of type [-Wshift-count-overflow]
    2523 |         time = ((unsigned long)le32_to_cpu(htt_stats_buf->engage_time_hi_ms) << 32) |
         |                                                                              ^~


vim +2515 drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c

  2498	
  2499	static void
  2500	ath12k_htt_print_dmac_reset_stats_tlv(const void *tag_buf, u16 tag_len,
  2501					      struct debug_htt_stats_req *stats_req)
  2502	{
  2503		const struct ath12k_htt_dmac_reset_stats_tlv *htt_stats_buf = tag_buf;
  2504		u8 *buf = stats_req->buf;
  2505		u32 len = stats_req->buf_len;
  2506		u32 buf_len = ATH12K_HTT_STATS_BUF_SIZE;
  2507		unsigned long time;
  2508	
  2509		if (tag_len < sizeof(*htt_stats_buf))
  2510			return;
  2511	
  2512		len += scnprintf(buf + len, buf_len - len, "HTT_DMAC_RESET_STATS_TLV:\n");
  2513		len += scnprintf(buf + len, buf_len - len, "reset_count = %u\n",
  2514				 le32_to_cpu(htt_stats_buf->reset_count));
> 2515		time = ((unsigned long)le32_to_cpu(htt_stats_buf->reset_time_hi_ms) << 32) |
  2516			le32_to_cpu(htt_stats_buf->reset_time_lo_ms);
  2517		len += scnprintf(buf + len, buf_len - len, "reset_time_ms = %ld\n", time);
  2518	
  2519		time = ((unsigned long)le32_to_cpu(htt_stats_buf->disengage_time_hi_ms) << 32) |
  2520			le32_to_cpu(htt_stats_buf->disengage_time_lo_ms);
  2521		len += scnprintf(buf + len, buf_len - len, "disengage_time_ms = %ld\n", time);
  2522	
  2523		time = ((unsigned long)le32_to_cpu(htt_stats_buf->engage_time_hi_ms) << 32) |
  2524			le32_to_cpu(htt_stats_buf->engage_time_lo_ms);
  2525		len += scnprintf(buf + len, buf_len - len, "engage_time_ms = %ld\n", time);
  2526	
  2527		len += scnprintf(buf + len, buf_len - len, "disengage_count = %u\n",
  2528				 le32_to_cpu(htt_stats_buf->disengage_count));
  2529		len += scnprintf(buf + len, buf_len - len, "engage_count = %u\n",
  2530				 le32_to_cpu(htt_stats_buf->engage_count));
  2531		len += scnprintf(buf + len, buf_len - len, "drain_dest_ring_mask = 0x%x\n\n",
  2532				 le32_to_cpu(htt_stats_buf->drain_dest_ring_mask));
  2533	
  2534		stats_req->buf_len = len;
  2535	}
  2536	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the ath12k mailing list