[PATCH v2 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops
Michael Ellerman
mpe at ellerman.id.au
Fri Dec 7 22:15:14 AEDT 2018
Christophe Leroy <christophe.leroy at c-s.fr> writes:
> checkpatch.pl reports the following:
>
> WARNING: struct kgdb_arch should normally be const
> #28: FILE: arch/mips/kernel/kgdb.c:397:
> +struct kgdb_arch arch_kgdb_ops = {
>
> This report makes sense, as all other ops struct, this
> one should also be const. This patch does the change.
...
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 59c578f865aa..bdb588b1d8fb 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -477,7 +477,7 @@ int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
> /*
> * Global data
> */
> -struct kgdb_arch arch_kgdb_ops;
> +const struct kgdb_arch arch_kgdb_ops;
>
> static int kgdb_not_implemented(struct pt_regs *regs)
> {
Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)
cheers
More information about the Linuxppc-dev
mailing list