From: Guenter Roeck <linux@roeck-us.net>
To: Joerg Roedel <joro@8bytes.org>
Cc: Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
Joerg Roedel <jroedel@suse.de>,
Emil Velikov <emil.l.velikov@gmail.com>
Subject: Re: [PATCH] alpha: Fix build around srm_sysrq_reboot_op
Date: Thu, 11 Jun 2020 06:23:22 -0700 [thread overview]
Message-ID: <20200611132322.GA52797@roeck-us.net> (raw)
On Thu, Jun 11, 2020 at 11:11:39AM +0200, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@suse.de>
>
> The patch introducing the struct was probably never compile tested,
> because it sets a handler with a wrong function signature. Wrap the
> handler into a functions with the correct signature to fix the build.
>
> Fixes: 0f1c9688a194 ("tty/sysrq: alpha: export and use __sysrq_get_key_op()")
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> arch/alpha/kernel/setup.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
> index f5c42a8fcf9c..53520f8cb904 100644
> --- a/arch/alpha/kernel/setup.c
> +++ b/arch/alpha/kernel/setup.c
> @@ -430,8 +430,13 @@ register_cpus(void)
> arch_initcall(register_cpus);
>
> #ifdef CONFIG_MAGIC_SYSRQ
> +static void sysrq_reboot_handler(int unused)
> +{
> + machine_halt();
> +}
> +
> static const struct sysrq_key_op srm_sysrq_reboot_op = {
> - .handler = machine_halt,
> + .handler = sysrq_reboot_handler,
> .help_msg = "reboot(b)",
> .action_msg = "Resetting",
> .enable_mask = SYSRQ_ENABLE_BOOT,
> --
> 2.26.2
>
next reply other threads:[~2020-06-11 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 13:23 Guenter Roeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-11 9:11 [PATCH] alpha: Fix build around srm_sysrq_reboot_op Joerg Roedel
2020-06-13 0:29 ` Matt Turner
2020-06-15 19:47 ` Emil Velikov
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=20200611132322.GA52797@roeck-us.net \
--to=linux@roeck-us.net \
--cc=emil.l.velikov@gmail.com \
--cc=ink@jurassic.park.msu.ru \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).