* [ath:pending 8/12] drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2515:77: warning: left shift count >= width of type
@ 2024-10-03 18:37 kernel test robot
2024-10-07 15:40 ` Jeff Johnson
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-10-03 18:37 UTC (permalink / raw)
To: Rajat Soni
Cc: oe-kbuild-all, Jeff Johnson, Kalle Valo, ath12k, Jeff Johnson,
Roopni Devanathan
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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ath:pending 8/12] drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2515:77: warning: left shift count >= width of type
2024-10-03 18:37 [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
@ 2024-10-07 15:40 ` Jeff Johnson
2024-10-07 15:50 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnson @ 2024-10-07 15:40 UTC (permalink / raw)
To: kernel test robot, Rajat Soni
Cc: oe-kbuild-all, Jeff Johnson, Kalle Valo, ath12k,
Roopni Devanathan
On 10/3/2024 11:37 AM, kernel test robot wrote:
> 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@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) |
> | ^~
Out of curiosity is there a way to tell if this is a 32-bit build vs a 64-bit
build? I just want to verify that the issue is that unsigned long is 32-bits
and not that the shift occurs before the typecast
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ath:pending 8/12] drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c:2515:77: warning: left shift count >= width of type
2024-10-07 15:40 ` Jeff Johnson
@ 2024-10-07 15:50 ` Kalle Valo
0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-10-07 15:50 UTC (permalink / raw)
To: Jeff Johnson
Cc: kernel test robot, Rajat Soni, oe-kbuild-all, Jeff Johnson,
ath12k, Roopni Devanathan
Jeff Johnson <quic_jjohnson@quicinc.com> writes:
> On 10/3/2024 11:37 AM, kernel test robot wrote:
>
>> 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@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) |
>> | ^~
>
> Out of curiosity is there a way to tell if this is a 32-bit build vs a 64-bit
> build? I just want to verify that the issue is that unsigned long is 32-bits
> and not that the shift occurs before the typecast
The config is i386-allmodconfig so it has to be 32-bit. The report also
includes link to the actual .config file.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-07 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 18:37 [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
2024-10-07 15:40 ` Jeff Johnson
2024-10-07 15:50 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox