Просмотр исходного кода

qcacmn: Fix NR_CPUS overflow for one byte data structure

For one byte data structure of unsigned type, it is expected that
the maximum value is 255. However, NR_CPUS is 512 in x86 setup of
Napier.

CRs-Fixed: 2158203
Change-Id: I057fb0cf3c11e687dfdd6cd2295b16743297d561
chenguo 7 лет назад
Родитель
Сommit
8107b66d8f
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      dp/wifi3.0/dp_main.c

+ 2 - 1
dp/wifi3.0/dp_main.c

@@ -5205,7 +5205,8 @@ static void dp_print_napi_stats(struct dp_soc *soc)
  */
 static void dp_print_per_ring_stats(struct dp_soc *soc)
 {
-	uint8_t core, ring;
+	uint8_t ring;
+	uint16_t core;
 	uint64_t total_packets;
 
 	DP_TRACE(FATAL, "Reo packets per ring:");