[PATCH 1/2] lib: sbi_illegal_insn: Constify illegal_insn_table

Anup Patel anup at brainfault.org
Wed Jun 1 03:51:28 PDT 2022


On Mon, May 30, 2022 at 11:30 AM Anup Patel <anup at brainfault.org> wrote:
>
> On Sun, May 29, 2022 at 11:55 PM Samuel Holland <samuel at sholland.org> wrote:
> >
> > This table does not need to be modified at runtime.
> >
> > Signed-off-by: Samuel Holland <samuel at sholland.org>
>
> Looks good to me.
>
> Reviewed-by: Anup Patel <anup at brainfault.org>

Applied this patch to the riscv/opensbi repo

Thanks,
Anup

>
> Regards,
> Anup
>
> > ---
> >
> >  lib/sbi/sbi_illegal_insn.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/sbi/sbi_illegal_insn.c b/lib/sbi/sbi_illegal_insn.c
> > index bfe7d61..39ef990 100644
> > --- a/lib/sbi/sbi_illegal_insn.c
> > +++ b/lib/sbi/sbi_illegal_insn.c
> > @@ -80,7 +80,7 @@ static int system_opcode_insn(ulong insn, struct sbi_trap_regs *regs)
> >         return 0;
> >  }
> >
> > -static illegal_insn_func illegal_insn_table[32] = {
> > +static const illegal_insn_func illegal_insn_table[32] = {
> >         truly_illegal_insn, /* 0 */
> >         truly_illegal_insn, /* 1 */
> >         truly_illegal_insn, /* 2 */
> > --
> > 2.35.1
> >
> >
> > --
> > opensbi mailing list
> > opensbi at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list