Skip to content

Commit

Permalink
style: format missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreCostaaa committed Feb 6, 2025
1 parent 879e30e commit 57fbc07
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
15 changes: 9 additions & 6 deletions so3/arch/arm64/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,

extern unsigned long __bad_cmpxchg(volatile void *ptr, int size);

/* clang-format off */

#define __CMPXCHG_CASE(w, sz, name) \
static inline bool __cmpxchg_case_##name( \
volatile void *ptr, unsigned long *old, unsigned long new, \
Expand All @@ -229,12 +231,11 @@ extern unsigned long __bad_cmpxchg(volatile void *ptr, int size);
\
do { \
asm volatile("// __cmpxchg_case_" #name "\n" \
" ldxr" #sz " %" #w "1, %2\n" \
" mov %w0, #0\n" \
" cmp %" #w "1, %" #w "3\n" \
" b.ne 1f\n" \
" stxr" #sz " %w0, %" #w \
"4, %2\n" \
" ldxr" #sz " %" #w "1, %2\n" \
" mov %w0, #0\n" \
" cmp %" #w "1, %" #w "3\n" \
" b.ne 1f\n" \
" stxr" #sz " %w0, %" #w "4, %2\n" \
"1:\n" \
: "=&r"(res), "=&r"(oldval), \
"+Q"(*(unsigned long *)ptr) \
Expand All @@ -250,6 +251,8 @@ extern unsigned long __bad_cmpxchg(volatile void *ptr, int size);
return !res; \
}

/* clang-format on */

__CMPXCHG_CASE(w, b, 1)
__CMPXCHG_CASE(w, h, 2)
__CMPXCHG_CASE(w, , 4)
Expand Down
7 changes: 4 additions & 3 deletions so3/arch/arm64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1170,9 +1170,10 @@ static inline int irqs_disabled_flags(cpu_regs_t *regs)

static inline void local_irq_enable(void)
{
asm volatile("msr daifclr, #2 // arch_local_irq_enable\n"
"nop" ::
: "memory");
asm volatile(
"msr daifclr, #2 // arch_local_irq_enable\n"
"nop" ::
: "memory");
}

static inline void local_irq_disable(void)
Expand Down
3 changes: 1 addition & 2 deletions so3/fs/fat/ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ static const BYTE DbcTbl[] = MKCVTBL(TBL_DC, FF_CODE_PAGE);
/* Load/Store multi-byte word in the FAT structure */
/*-----------------------------------------------------------------------*/

static WORD
ld_word(const BYTE *ptr) /* Load a 2-byte little-endian word */
static WORD ld_word(const BYTE *ptr) /* Load a 2-byte little-endian word */
{
WORD rv;

Expand Down
4 changes: 2 additions & 2 deletions so3/include/net/lwip/inet.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ struct in6_addr {

/** This macro can be used to initialize a variable of type struct in6_addr
to the IPv6 wildcard address. */
#define IN6ADDR_ANY_INIT \
{ \
#define IN6ADDR_ANY_INIT \
{ \
{{0,0,0,0}} \
}
/** This macro can be used to initialize a variable of type struct in6_addr
Expand Down
2 changes: 1 addition & 1 deletion so3/include/net/lwip/priv/tcp_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb);

#define TCP_MAXIDLE \
TCP_KEEPCNT_DEFAULT \
*TCP_KEEPINTVL_DEFAULT /* Maximum KEEPALIVE probe time */
*TCP_KEEPINTVL_DEFAULT /* Maximum KEEPALIVE probe time */

#define TCP_TCPLEN(seg) \
((seg)->len + \
Expand Down
2 changes: 1 addition & 1 deletion so3/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ void load_process(elf_img_info_t *elf_img_info)
} while (section_base_name[l++] != '\0');
section_base_name[l] =
'\0'; // Terminate string correctly (replace second
// '.' if stopped by it)
// '.' if stopped by it)

/* Not all sections are supported */
section_supported = false;
Expand Down

0 comments on commit 57fbc07

Please sign in to comment.