From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Michael Ellerman <mpe@ellerman.id.au>,
Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
paul.burton@mips.com, ralf@linux-mips.org, jhogan@kernel.org
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-mips@linux-mips.org
Subject: Re: Checkpatch bad Warning (Re: [PATCH] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint())
Date: Thu, 20 Sep 2018 01:23:55 +0000 [thread overview]
Message-ID: <d31bd0cb-b9da-6f1b-4f93-da71644668d6@c-s.fr> (raw)
In-Reply-To: <f9ad7501-4d07-ddc2-6236-a7eb61283378@c-s.fr>
Adding MIPS arch in the loop
On 09/20/2018 01:19 PM, Christophe LEROY wrote:
>
>
> Le 20/09/2018 à 15:13, Michael Ellerman a écrit :
>> Joe Perches <joe@perches.com> writes:
>>
>>> On Tue, 2018-09-18 at 09:33 +0000, Christophe Leroy wrote:
>>>> On the below patch, checkpatch reports
>>>>
>>>> WARNING: struct kgdb_arch should normally be const
>>>> #127: FILE: arch/powerpc/kernel/kgdb.c:480:
>>>> +struct kgdb_arch arch_kgdb_ops;
>>>>
>>>> But when I add 'const', I get compilation failure
>>>
>>> So don't add const.
>>>
>>> checkpatch is stupid. You are not.
>>>
>>> _Always_ take checkpatch bleats with very
>>> large grains of salt.
>>>
>>> Perhaps send a patch to remove kgbd_arch
>>> from scripts/const_structs.checkpatch as
>>> it seems not ever to be const.
>>
>> I think it could/should be const though, it just requires updating all
>> arches.
>>
>
> Yes I was thinking about doing it, but first thing is to change the way
> MIPS initialises it:
>
>
> struct kgdb_arch arch_kgdb_ops;
>
> int kgdb_arch_init(void)
> {
> union mips_instruction insn = {
> .r_format = {
> .opcode = spec_op,
> .func = break_op,
> }
> };
> memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE);
>
>
> Can this be done staticaly ?
>
> Christophe
next prev parent reply other threads:[~2018-09-20 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 9:26 [PATCH] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint() Christophe Leroy
2018-09-18 9:33 ` Checkpatch bad Warning (Re: [PATCH] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()) Christophe Leroy
2018-09-20 3:02 ` Joe Perches
2018-09-20 13:13 ` Michael Ellerman
2018-09-20 13:19 ` Christophe LEROY
2018-09-20 1:23 ` Christophe Leroy [this message]
2018-09-20 20:36 ` Paul Burton
2018-09-20 14:07 ` Christophe Leroy
2018-10-22 9:37 ` powerpc/kgdb: add kgdb_arch_set/remove_breakpoint() Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d31bd0cb-b9da-6f1b-4f93-da71644668d6@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=apw@canonical.com \
--cc=jhogan@kernel.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paul.burton@mips.com \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®