@@ -319,8 +319,7 @@ static int32_t profiling_generate_data(int32_t collector, uint32_t type)
319
319
__func__ , get_pcpu_id ());
320
320
321
321
if (collector == COLLECT_PROFILE_DATA ) {
322
- sbuf = (struct shared_buf * )
323
- per_cpu (sbuf , get_pcpu_id ())[ACRN_SEP ];
322
+ sbuf = per_cpu (sbuf , get_pcpu_id ())[ACRN_SEP ];
324
323
325
324
if (sbuf == NULL ) {
326
325
ss -> samples_dropped ++ ;
@@ -381,21 +380,18 @@ static int32_t profiling_generate_data(int32_t collector, uint32_t type)
381
380
}
382
381
383
382
for (i = 0U ; i < (((DATA_HEADER_SIZE - 1U ) / SEP_BUF_ENTRY_SIZE ) + 1U ); i ++ ) {
384
- (void )sbuf_put ((struct shared_buf * )sbuf ,
385
- (uint8_t * )& pkt_header + i * SEP_BUF_ENTRY_SIZE );
383
+ (void )sbuf_put (sbuf , (uint8_t * )& pkt_header + i * SEP_BUF_ENTRY_SIZE );
386
384
}
387
385
388
386
for (i = 0U ; i < (((payload_size - 1U ) / SEP_BUF_ENTRY_SIZE ) + 1U ); i ++ ) {
389
- (void )sbuf_put ((struct shared_buf * )sbuf ,
390
- (uint8_t * )payload + i * SEP_BUF_ENTRY_SIZE );
387
+ (void )sbuf_put (sbuf , (uint8_t * )payload + i * SEP_BUF_ENTRY_SIZE );
391
388
}
392
389
393
390
ss -> samples_logged ++ ;
394
391
}
395
392
} else if (collector == COLLECT_POWER_DATA ) {
396
393
397
- sbuf = (struct shared_buf * )
398
- per_cpu (sbuf , get_pcpu_id ())[ACRN_SOCWATCH ];
394
+ sbuf = per_cpu (sbuf , get_pcpu_id ())[ACRN_SOCWATCH ];
399
395
400
396
if (sbuf == NULL ) {
401
397
dev_dbg (ACRN_DBG_PROFILING ,
@@ -455,11 +451,11 @@ static int32_t profiling_generate_data(int32_t collector, uint32_t type)
455
451
return 0 ;
456
452
}
457
453
/* copy header */
458
- (void )profiling_sbuf_put_variable (( struct shared_buf * ) sbuf ,
454
+ (void )profiling_sbuf_put_variable (sbuf ,
459
455
(uint8_t * )& pkt_header , (uint32_t )DATA_HEADER_SIZE );
460
456
461
457
/* copy payload */
462
- (void )profiling_sbuf_put_variable (( struct shared_buf * ) sbuf ,
458
+ (void )profiling_sbuf_put_variable (sbuf ,
463
459
(uint8_t * )payload , (uint32_t )payload_size );
464
460
465
461
spinlock_irqrestore_release (sw_lock , rflags );
0 commit comments