[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xen/riscv: align header inclusion guards with CODING_STYLE





On 11/5/26 4:44 PM, Jan Beulich wrote:
On 05.11.2026 16:03, Oleksii Kurochko wrote:
Commit 7abea85c9f12 ("CODING_STYLE: Updated header guard
recommendations") changed the recommended naming of inclusion guards
for arch-specific headers to <arch>_<something>_H. Most RISC-V headers
still use the ASM__RISCV__<FILENAME>_H form required by the previous
rules, and a few use ASM_RISCV_<FILENAME>_H, which follows neither.

Rename the guards to RISCV_<SOMETHING>_H. While doing so, also fix two
guards which don't match their file names: extable.h used
ASM__RISCV__ASM_EXTABLE_H and intc.h used the misspelt
ASM__RISCV__INTERRUPT_CONTOLLER_H. For riscv_encoding.h, don't repeat
the architecture name and use RISCV_ENCODING_H.

I'd recommend against that. If you want this tag, renamed the file as
well. Otherwise stick to the naming rules.

No functional change.

Assisted-by: Claude-Code:claude-opus-5-5
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

With the above (and possibly also the below) adjustment(s)
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Which way to make the adjustment you will need to indicate. Changing the
tag identifier can be done while committing. If you want to rename the
file, I could drop that one hunk from here while committing. Please
indicate intentions.

I think I prefer then to follow the naming rules and name tag identifier as RISCV_RISCV_ENCODING_H.

--- a/xen/arch/riscv/include/asm/vsbi.h
+++ b/xen/arch/riscv/include/asm/vsbi.h
@@ -1,7 +1,7 @@
  /* SPDX-License-Identifier:  GPL-2.0-only */
-#ifndef ASM_RISCV_VSBI_H
-#define ASM_RISCV_VSBI_H
+#ifndef RISCV_VSBI_H
+#define RISCV_VSBI_H
struct cpu_user_regs;

I think at this occasion the #endif also wants to gain the usual comment.

Oh, missed that.

I will appreciate if it could be done during committing.

Thanks a lot!

~ Oleksii



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.