From a722b17b144ee80bba5bcd2cad5b9427a8d2c9be Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Wed, 21 Aug 2024 17:53:06 +0200 Subject: [PATCH] Correct linting --- sw/snRuntime/src/alloc_v2.h | 10 ++++++---- sw/snRuntime/src/omp/omp.c | 4 ++-- target/snitch_cluster/sw/runtime/banshee/src/snrt.h | 2 +- target/snitch_cluster/sw/runtime/rtl/src/snrt.h | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sw/snRuntime/src/alloc_v2.h b/sw/snRuntime/src/alloc_v2.h index abe0f0765..29ffb81e5 100644 --- a/sw/snRuntime/src/alloc_v2.h +++ b/sw/snRuntime/src/alloc_v2.h @@ -19,14 +19,15 @@ inline void snrt_l1_update_next_v2(void *next) { // exception otherwise inline void snrt_l1_alloc_check_bounds() { if (snrt_l1_allocator_v2()->next > snrt_l1_allocator_v2()->end) - asm volatile ("ecall \n"); + asm volatile("ecall \n"); } // Dynamically allocate space for a variable of size `size` in the cluster's L1 // memory. This function should be invoked by every core in a cluster. Every // core receives a pointer to the allocated variable. inline void *snrt_l1_alloc_cluster_local(size_t size, const size_t alignment) { - snrt_l1_allocator_v2()->next = ALIGN_UP(snrt_l1_allocator_v2()->next, alignment); + snrt_l1_allocator_v2()->next = + ALIGN_UP(snrt_l1_allocator_v2()->next, alignment); void *retval = snrt_l1_next_v2(); snrt_l1_allocator_v2()->next += size; snrt_l1_alloc_check_bounds(); @@ -40,7 +41,8 @@ inline void *snrt_l1_alloc_cluster_local(size_t size, const size_t alignment) { // return value for the DM core is undefined. inline void *snrt_l1_alloc_compute_core_local(size_t size, const size_t alignment) { - snrt_l1_allocator_v2()->next = ALIGN_UP(snrt_l1_allocator_v2()->next, alignment); + snrt_l1_allocator_v2()->next = + ALIGN_UP(snrt_l1_allocator_v2()->next, alignment); void *retval = snrt_l1_next_v2() + size * snrt_cluster_core_idx(); snrt_l1_allocator_v2()->next += size * snrt_cluster_compute_core_num(); snrt_l1_alloc_check_bounds(); @@ -65,7 +67,7 @@ inline void *snrt_remote_l1_ptr(void *ptr, uint32_t src_cluster_idx, (dst_cluster_idx - src_cluster_idx) * SNRT_CLUSTER_OFFSET); } -inline void snrt_alloc_init_v2() { +inline void snrt_alloc_init_v2() { // Calculate end address of the heap. The top of the TCDM address space is // reserved for the cluster-local storage (CLS) and the stack of every // core. We further provision a safety margin of 128B. The rest of the diff --git a/sw/snRuntime/src/omp/omp.c b/sw/snRuntime/src/omp/omp.c index 97fad2b2c..6fdeec2e5 100644 --- a/sw/snRuntime/src/omp/omp.c +++ b/sw/snRuntime/src/omp/omp.c @@ -48,8 +48,8 @@ static inline void initTeam(omp_t *_this, omp_team_t *team) { void omp_init(void) { if (snrt_cluster_core_idx() == 0) { // allocate space for kmp arguments - kmpc_args = - (_kmp_ptr32 *)snrt_l1_alloc(sizeof(_kmp_ptr32) * KMP_FORK_MAX_NARGS); + kmpc_args = (_kmp_ptr32 *)snrt_l1_alloc(sizeof(_kmp_ptr32) * + KMP_FORK_MAX_NARGS); #ifndef OMPSTATIC_NUMTHREADS omp_p = (omp_t *)snrt_l1_alloc(sizeof(omp_t)); unsigned int nbCores = snrt_cluster_compute_core_num(); diff --git a/target/snitch_cluster/sw/runtime/banshee/src/snrt.h b/target/snitch_cluster/sw/runtime/banshee/src/snrt.h index 062bc95ba..a9857e850 100644 --- a/target/snitch_cluster/sw/runtime/banshee/src/snrt.h +++ b/target/snitch_cluster/sw/runtime/banshee/src/snrt.h @@ -34,8 +34,8 @@ #include "printf.h" #include "riscv.h" #include "snitch_cluster_global_interrupts.h" -#include "ssr.h" #include "snitch_cluster_start.h" +#include "ssr.h" #include "sync.h" #include "team.h" #include "types.h" diff --git a/target/snitch_cluster/sw/runtime/rtl/src/snrt.h b/target/snitch_cluster/sw/runtime/rtl/src/snrt.h index 6c85ec2c8..426b623ed 100644 --- a/target/snitch_cluster/sw/runtime/rtl/src/snrt.h +++ b/target/snitch_cluster/sw/runtime/rtl/src/snrt.h @@ -34,8 +34,8 @@ #include "printf.h" #include "riscv.h" #include "snitch_cluster_global_interrupts.h" -#include "ssr.h" #include "snitch_cluster_start.h" +#include "ssr.h" #include "sync.h" #include "team.h" #include "types.h"