tty: sysrq: rename and re-type i in sysrq_handle_loglevel()

JIRA: https://issues.redhat.com/browse/RHEL-24205

commit 00ef7eff2f2fcb28a3a4b5697ab6ce242e041091
Author: Jiri Slaby <jirislaby@kernel.org>
Date:   Wed Jul 12 10:18:02 2023 +0200

    tty: sysrq: rename and re-type i in sysrq_handle_loglevel()

    'i' is a too generic name for something which carries a 'loglevel'. Name
    it as such and make it 'u8', the same as key will become in the next
    patches.

    Note that we are not stripping any high bits away, 'key' is given only
    8bit values.

    Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
    Link: https://lore.kernel.org/r/20230712081811.29004-2-jirislaby@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
This commit is contained in:
Andrew Halaney 2024-02-27 14:55:32 -06:00 committed by Derek Barbosa
parent adc5a0901b
commit 53b8bcad17
1 changed files with 3 additions and 4 deletions

View File

@ -100,12 +100,11 @@ __setup("sysrq_always_enabled", sysrq_always_enabled_setup);
static void sysrq_handle_loglevel(int key)
{
int i;
u8 loglevel = key - '0';
i = key - '0';
console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
pr_info("Loglevel set to %d\n", i);
console_loglevel = i;
pr_info("Loglevel set to %u\n", loglevel);
console_loglevel = loglevel;
}
static const struct sysrq_key_op sysrq_loglevel_op = {
.handler = sysrq_handle_loglevel,