Skip to content

Commit 548a3b7

Browse files
AnnsAnnscrasbe
andcommitted
Apply suggestions from code review
Co-authored-by: crasbe <[email protected]>
1 parent 55790a7 commit 548a3b7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

cpu/riscv_common/include/xh3irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern const void *vector_cpu[CPU_IRQ_NUMOF];
3939
* preemption level in meicontext.preempt.
4040
*/
4141
#define MEIP_OFFSET 11
42-
/* Mask to extract the MEIP bit from MIP/MISE */
42+
/** Mask to extract the MEIP bit from MIP/MISE */
4343
#define MEIP_MASK 0x1
4444
/**
4545
* Index of the highest-priority active external interrupt.

cpu/riscv_common/irq_arch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ __attribute((used)) static void handle_trap(uword_t mcause)
9797

9898
#ifdef DEVELHELP
9999
printf("Trap: mcause=0x%" PRIx32 " mepc=0x%lx mtval=0x%lx\n",
100-
(uint32_t)mcause, read_csr(mepc), read_csr(mtval));
100+
(uint32_t)mcause, read_csr(mepc), read_csr(mtval));
101101

102102
/* See https://riscv.github.io/riscv-isa-manual/snapshot/privileged/#mcause */
103103
if ((mcause & ~MCAUSE_INT) <= 0xb) {
@@ -132,8 +132,8 @@ __attribute((used)) static void handle_trap(uword_t mcause)
132132
);
133133
} else {
134134
printf("Machine Cause indicates that 0x%lx"
135-
" is a reserved or custom cause code\n",
136-
cause_code
135+
" is a reserved or custom cause code\n",
136+
cause_code
137137
);
138138
}
139139
}

cpu/riscv_common/periph/xh3irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ uint32_t xh3irq_has_pending(void)
1515
* Get MEIP which is the external interrupt pending bit
1616
* from the Machine Interrupt Pending Register address
1717
*/
18-
uint32_t mip_reg = read_csr(0x344);
19-
uint32_t meip = bit_check32(&mip_reg, MEIP_OFFSET);
18+
uint32_t mip_reg = read_csr(0x344);
19+
uint32_t meip = bit_check32(&mip_reg, MEIP_OFFSET);
2020

2121
return (meip != 0);
2222
}

cpu/rp2350_riscv/include/cpu_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" {
2323

2424
#define CPU_DEFAULT_IRQ_PRIO 1u
2525
#define CPU_IRQ_NUMOF 52u
26-
/* This tells rp2350_common that we are using the RISC-V core */
26+
/** This tells rp2350_common that we are using the RISC-V core */
2727
#define RP2350_USE_RISCV 1
2828

2929
#ifdef __cplusplus

0 commit comments

Comments
 (0)