Skip to content

Commit ce06b42

Browse files
Andrew Jonespalmer-dabbelt
authored andcommitted
riscv: alternatives: Remove unnecessary define and unused struct
A define and a struct were introduced with commit 6f4eea9 ("riscv: Introduce alternative mechanism to apply errata solution"), which introduced alternatives to RISC-V. The define is used for an arbitrary string length, specific to sifive errata, so just use the number directly there instead. The struct has never been used, so remove it. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu> Link: https://lore.kernel.org/r/20230224154601.88163-4-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent a3d095a commit ce06b42

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

arch/riscv/errata/sifive/errata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <asm/errata_list.h>
1515

1616
struct errata_info_t {
17-
char name[ERRATA_STRING_LENGTH_MAX];
17+
char name[32];
1818
bool (*check_func)(unsigned long arch_id, unsigned long impid);
1919
};
2020

arch/riscv/include/asm/alternative.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#ifndef __ASM_ALTERNATIVE_H
77
#define __ASM_ALTERNATIVE_H
88

9-
#define ERRATA_STRING_LENGTH_MAX 32
10-
119
#include <asm/alternative-macros.h>
1210

1311
#ifndef __ASSEMBLY__
@@ -43,11 +41,6 @@ struct alt_entry {
4341
u32 errata_id; /* The errata id */
4442
};
4543

46-
struct errata_checkfunc_id {
47-
unsigned long vendor_id;
48-
bool (*func)(struct alt_entry *alt);
49-
};
50-
5144
void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
5245
unsigned long archid, unsigned long impid,
5346
unsigned int stage);

0 commit comments

Comments
 (0)