Created
January 29, 2025 18:06
pw928724-p13952020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? | |
#17: | |
new file mode 100644 | |
CHECK: Macro argument 'iselbase' may be better as '(iselbase)' to avoid precedence issues | |
#32: FILE: arch/riscv/include/asm/csr_ind.h:11: | |
+#define csr_ind_read(iregcsr, iselbase, iseloff) ({ \ | |
+ unsigned long value = 0; \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ value = csr_read(iregcsr); \ | |
+ local_irq_restore(flags); \ | |
+ value; \ | |
+}) | |
CHECK: Macro argument 'iseloff' may be better as '(iseloff)' to avoid precedence issues | |
#32: FILE: arch/riscv/include/asm/csr_ind.h:11: | |
+#define csr_ind_read(iregcsr, iselbase, iseloff) ({ \ | |
+ unsigned long value = 0; \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ value = csr_read(iregcsr); \ | |
+ local_irq_restore(flags); \ | |
+ value; \ | |
+}) | |
CHECK: Macro argument 'iselbase' may be better as '(iselbase)' to avoid precedence issues | |
#42: FILE: arch/riscv/include/asm/csr_ind.h:21: | |
+#define csr_ind_write(iregcsr, iselbase, iseloff, value) ({ \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ csr_write(iregcsr, value); \ | |
+ local_irq_restore(flags); \ | |
+}) | |
CHECK: Macro argument 'iseloff' may be better as '(iseloff)' to avoid precedence issues | |
#42: FILE: arch/riscv/include/asm/csr_ind.h:21: | |
+#define csr_ind_write(iregcsr, iselbase, iseloff, value) ({ \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ csr_write(iregcsr, value); \ | |
+ local_irq_restore(flags); \ | |
+}) | |
CHECK: Macro argument 'iselbase' may be better as '(iselbase)' to avoid precedence issues | |
#50: FILE: arch/riscv/include/asm/csr_ind.h:29: | |
+#define csr_ind_warl(iregcsr, iselbase, iseloff, warl_val) ({ \ | |
+ unsigned long old_val = 0, value = 0; \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ old_val = csr_read(iregcsr); \ | |
+ csr_write(iregcsr, warl_val); \ | |
+ value = csr_read(iregcsr); \ | |
+ csr_write(iregcsr, old_val); \ | |
+ local_irq_restore(flags); \ | |
+ value; \ | |
+}) | |
CHECK: Macro argument 'iseloff' may be better as '(iseloff)' to avoid precedence issues | |
#50: FILE: arch/riscv/include/asm/csr_ind.h:29: | |
+#define csr_ind_warl(iregcsr, iselbase, iseloff, warl_val) ({ \ | |
+ unsigned long old_val = 0, value = 0; \ | |
+ unsigned long flags; \ | |
+ local_irq_save(flags); \ | |
+ csr_write(CSR_ISELECT, iselbase + iseloff); \ | |
+ old_val = csr_read(iregcsr); \ | |
+ csr_write(iregcsr, warl_val); \ | |
+ value = csr_read(iregcsr); \ | |
+ csr_write(iregcsr, old_val); \ | |
+ local_irq_restore(flags); \ | |
+ value; \ | |
+}) | |
total: 0 errors, 1 warnings, 6 checks, 42 lines checked | |
NOTE: For some of the reported defects, checkpatch may be able to | |
mechanically convert to the typical style using --fix or --fix-inplace. | |
Commit 1ec6714be04a ("RISC-V: Define indirect CSR access helpers") has style problems, please review. | |
NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF | |
NOTE: If any of the errors are false positives, please report | |
them to the maintainer, see CHECKPATCH in MAINTAINERS. | |
total: 0 errors, 1 warnings, 6 checks, 42 lines checked | |
CHECK: Macro argument 'iselbase' may be better as '(iselbase)' to avoid precedence issues | |
CHECK: Macro argument 'iseloff' may be better as '(iseloff)' to avoid precedence issues | |
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment