fix: minor warning related to missing parenthesis

This commit is contained in:
Mahavir Jain 2024-04-01 09:20:21 +05:30
parent baa42be64c
commit 166fa7acac
No known key found for this signature in database
GPG Key ID: 99324EF4A00734E0
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
[codespell] [codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart
write-changes = true write-changes = true

View File

@ -78,7 +78,7 @@ extern "C" {
do { \ do { \
ESP_STATIC_ASSERT(__builtin_popcount((SIZE)) == 1, "Size must be a power of 2"); \ ESP_STATIC_ASSERT(__builtin_popcount((SIZE)) == 1, "Size must be a power of 2"); \
ESP_STATIC_ASSERT((ADDR) % ((SIZE)) == 0, "Addr must be aligned to size"); \ ESP_STATIC_ASSERT((ADDR) % ((SIZE)) == 0, "Addr must be aligned to size"); \
RV_WRITE_CSR((CSR_PMAADDR0) + (ENTRY), ((ADDR) | ((SIZE >> 1) - 1)) >> 2); \ RV_WRITE_CSR((CSR_PMAADDR0) + (ENTRY), ((ADDR) | (((SIZE) >> 1) - 1)) >> 2); \
RV_WRITE_CSR((CSR_PMACFG0) + (ENTRY), CFG); \ RV_WRITE_CSR((CSR_PMACFG0) + (ENTRY), CFG); \
} while (0) } while (0)
@ -119,7 +119,7 @@ extern "C" {
generate specific assembly instructions. generate specific assembly instructions.
- ADDR is the address to write to the PMPADDRx register. Note this is the unshifted address. - ADDR is the address to write to the PMPADDRx register. Note this is the unshifted address.
- CFG is the configuration value to write to the correct CFG entry register. Note that - CFG is the configuration value to write to the correct CFG entry register. Note that
the macro only sets bits in the CFG register, so it sould be zeroed already. the macro only sets bits in the CFG register, so it should be zeroed already.
*/ */
#define PMP_ENTRY_SET(ENTRY, ADDR, CFG) do { \ #define PMP_ENTRY_SET(ENTRY, ADDR, CFG) do { \
RV_WRITE_CSR((CSR_PMPADDR0) + (ENTRY), (ADDR) >> (PMP_SHIFT)); \ RV_WRITE_CSR((CSR_PMPADDR0) + (ENTRY), (ADDR) >> (PMP_SHIFT)); \