From: Jiri Slaby <jirislaby@kernel.org>
To: wujunwen <wudaemon@163.com>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] tty/sysrq: change the definition of sysrq_key_table's element to make it more readable
Date: Wed, 6 Apr 2022 11:57:12 +0200 [thread overview]
Message-ID: <19e11d77-1f81-c5a8-8a72-4fb7616438bf@kernel.org> (raw)
In-Reply-To: <20220405153625.55689-1-wudaemon@163.com>
Hi,
On 05. 04. 22, 17:36, wujunwen wrote:
> the definition of sysrq_key_table's elements, like sysrq_thaw_op and
The starts the sentence, so should be with capital T.
> sysrq_showallcpus_op are massive,
massive?
> so we should make it consistent.
You should elaborate consistent to what.
> Signed-off-by: wujunwen <wudaemon@163.com>
Is this really your real full name?
Other than that, the patch appears to be correct.
> drivers/tty/sysrq.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index bbfd004449b5..9485156bf48b 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -274,6 +274,8 @@ static const struct sysrq_key_op sysrq_showallcpus_op = {
> .action_msg = "Show backtrace of all active CPUs",
> .enable_mask = SYSRQ_ENABLE_DUMP,
> };
> +#else
> +#define sysrq_showallcpus_op (*(const struct sysrq_key_op *)NULL)
> #endif
>
> static void sysrq_handle_showregs(int key)
> @@ -405,6 +407,7 @@ static const struct sysrq_key_op sysrq_moom_op = {
> .enable_mask = SYSRQ_ENABLE_SIGNAL,
> };
>
> +#ifdef CONFIG_BLOCK
> static void sysrq_handle_thaw(int key)
> {
> emergency_thaw_all();
> @@ -415,6 +418,9 @@ static const struct sysrq_key_op sysrq_thaw_op = {
> .action_msg = "Emergency Thaw of all frozen filesystems",
> .enable_mask = SYSRQ_ENABLE_SIGNAL,
> };
> +#else
> +#define sysrq_thaw_op (*(const struct sysrq_key_op *)NULL)
> +#endif
>
> static void sysrq_handle_kill(int key)
> {
> @@ -468,17 +474,9 @@ static const struct sysrq_key_op *sysrq_key_table[62] = {
> NULL, /* g */
> NULL, /* h - reserved for help */
> &sysrq_kill_op, /* i */
> -#ifdef CONFIG_BLOCK
> &sysrq_thaw_op, /* j */
> -#else
> - NULL, /* j */
> -#endif
> &sysrq_SAK_op, /* k */
> -#ifdef CONFIG_SMP
> &sysrq_showallcpus_op, /* l */
> -#else
> - NULL, /* l */
> -#endif
> &sysrq_showmem_op, /* m */
> &sysrq_unrt_op, /* n */
> /* o: This will often be registered as 'Off' at init time */
--
js
suse labs
next prev parent reply other threads:[~2022-04-06 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 15:36 wujunwen
2022-04-06 9:57 ` Jiri Slaby [this message]
2022-04-10 8:01 ` Junwen Wu
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=19e11d77-1f81-c5a8-8a72-4fb7616438bf@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wudaemon@163.com \
/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®