Skip to content

Commit 205e4c8

Browse files
Align include guards with OpenOCD coding guidelines
Fixes: riscv-collab#1097
1 parent f5f5f6d commit 205e4c8

File tree

12 files changed

+35
-26
lines changed

12 files changed

+35
-26
lines changed

src/target/riscv/asm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef TARGET__RISCV__ASM_H
4-
#define TARGET__RISCV__ASM_H
3+
#ifndef OPENOCD_TARGET_RISCV_ASM_H
4+
#define OPENOCD_TARGET_RISCV_ASM_H
55

66
#include "riscv.h"
77

@@ -37,4 +37,4 @@ static uint32_t store(const struct target *target, unsigned int src,
3737
return 0; /* Silence -Werror=return-type */
3838
}
3939

40-
#endif
40+
#endif /* OPENOCD_TARGET_RISCV_ASM_H */

src/target/riscv/batch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef TARGET__RISCV__SCANS_H
4-
#define TARGET__RISCV__SCANS_H
3+
#ifndef OPENOCD_TARGET_RISCV_BATCH_H
4+
#define OPENOCD_TARGET_RISCV_BATCH_H
55

66
#include "target/target.h"
77
#include "jtag/jtag.h"
@@ -216,4 +216,4 @@ bool riscv_batch_was_batch_busy(const struct riscv_batch *batch);
216216
void riscv_log_dmi_scan(const struct target *target, int idle, const struct scan_field *field,
217217
bool discard_in);
218218

219-
#endif
219+
#endif /* OPENOCD_TARGET_RISCV_BATCH_H */

src/target/riscv/debug_reg_printer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3+
#ifndef OPENOCD_TARGET_RISCV_DEBUG_REG_PRINTER_H
4+
#define OPENOCD_TARGET_RISCV_DEBUG_REG_PRINTER_H
5+
36
#include "debug_defines.h"
47

58
enum riscv_debug_reg_show {
@@ -33,3 +36,5 @@ enum riscv_debug_reg_show {
3336
unsigned int riscv_debug_reg_to_s(char *buf, enum riscv_debug_reg_ordinal reg_ordinal,
3437
riscv_debug_reg_ctx_t context, uint64_t value,
3538
enum riscv_debug_reg_show show);
39+
40+
#endif /* OPENOCD_TARGET_RISCV_DEBUG_REG_PRINTER_H */

src/target/riscv/field_helpers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef FIELD_HELPERS_H
4-
#define FIELD_HELPERS_H
3+
#ifndef OPENOCD_TARGET_RISCV_FIELD_HELPERS_H
4+
#define OPENOCD_TARGET_RISCV_FIELD_HELPERS_H
55

66
#include <stdint.h>
77
#include <assert.h>
@@ -44,4 +44,4 @@ static inline uint32_t field_value32(uint32_t mask, uint32_t val)
4444
return set_field32(0, mask, val);
4545
}
4646

47-
#endif
47+
#endif /* OPENOCD_TARGET_RISCV_FIELD_HELPERS_H */

src/target/riscv/gdb_regs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef TARGET__RISCV__GDB_REGS_H
4-
#define TARGET__RISCV__GDB_REGS_H
3+
#ifndef OPENOCD_TARGET_RISCV_GDB_REGS_H
4+
#define OPENOCD_TARGET_RISCV_GDB_REGS_H
55

66
#include "encoding.h"
77

@@ -125,4 +125,4 @@ enum gdb_regno {
125125
GDB_REGNO_COUNT
126126
};
127127

128-
#endif
128+
#endif /* OPENOCD_TARGET_RISCV_GDB_REGS_H */

src/target/riscv/opcodes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3+
#ifndef OPENOCD_TARGET_RISCV_OPCODES_H
4+
#define OPENOCD_TARGET_RISCV_OPCODES_H
5+
36
#include "encoding.h"
47

58
#define ZERO 0
@@ -339,3 +342,4 @@ static uint32_t vslide1down_vx(unsigned int vd, unsigned int vs2,
339342
return ((vm & 1) << 25) | inst_rs2(vs2) | inst_rs1(rs1) | inst_rd(vd) | MATCH_VSLIDE1DOWN_VX;
340343
}
341344

345+
#endif /* OPENOCD_TARGET_RISCV_OPCODES_H */

src/target/riscv/program.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef TARGET__RISCV__PROGRAM_H
4-
#define TARGET__RISCV__PROGRAM_H
3+
#ifndef OPENOCD_TARGET_RISCV_PROGRAM_H
4+
#define OPENOCD_TARGET_RISCV_PROGRAM_H
55

66
#include "riscv.h"
77

@@ -77,4 +77,4 @@ int riscv_program_ebreak(struct riscv_program *p);
7777

7878
int riscv_program_addi(struct riscv_program *p, enum gdb_regno d, enum gdb_regno s, int16_t i);
7979

80-
#endif
80+
#endif /* OPENOCD_TARGET_RISCV_PROGRAM_H */

src/target/riscv/riscv-011.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ int riscv011_get_register(struct target *target, riscv_reg_t *value,
1212
int riscv011_set_register(struct target *target, enum gdb_regno regid,
1313
riscv_reg_t value);
1414

15-
#endif /*OPENOCD_TARGET_RISCV_RISCV_011_H*/
15+
#endif /* OPENOCD_TARGET_RISCV_RISCV_011_H */

src/target/riscv/riscv-011_reg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-or-later */
22

3-
#ifndef OPENOCD_TARGET_RISCV_RISCV_REG_011_H
4-
#define OPENOCD_TARGET_RISCV_RISCV_REG_011_H
3+
#ifndef OPENOCD_TARGET_RISCV_RISCV_011_REG_H
4+
#define OPENOCD_TARGET_RISCV_RISCV_011_REG_H
55

66
#include "target/target.h"
77

@@ -16,4 +16,4 @@
1616
*/
1717
int riscv011_reg_init_all(struct target *target);
1818

19-
#endif /*OPENOCD_TARGET_RISCV_RISCV_REG_011_H*/
19+
#endif /* OPENOCD_TARGET_RISCV_RISCV_011_REG_H */

src/target/riscv/riscv-013.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ int riscv013_set_register(struct target *target, enum gdb_regno rid,
2020
int riscv013_set_register_buf(struct target *target, enum gdb_regno regno,
2121
const uint8_t *value);
2222

23-
#endif /*OPENOCD_TARGET_RISCV_RISCV_013_H*/
23+
#endif /* OPENOCD_TARGET_RISCV_RISCV_013_H */

0 commit comments

Comments
 (0)