From: Pavel Skripkin <paskripkin@gmail.com>
To: Ajay Garg <ajaygargnsit@gmail.com>,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
andriy.shevchenko@linux.intel.com, kernel@esmil.dk,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] tty: vt: keyboard: add default switch-case, to handle smatch-warnings in method vt_do_kdgkb_ioctl
Date: Sun, 7 Nov 2021 01:12:44 +0300 [thread overview]
Message-ID: <8d0346ba-4819-c25e-f208-0b51116d9147@gmail.com> (raw)
In-Reply-To: <20211106220315.392842-1-ajaygargnsit@gmail.com>
On 11/7/21 01:03, Ajay Garg wrote:
> diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
> index c7fbbcdcc346..b83e7669658d 100644
> --- a/drivers/tty/vt/keyboard.c
> +++ b/drivers/tty/vt/keyboard.c
> @@ -2090,6 +2090,12 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
>
> ret = 0;
> break;
> + default: {
> + kbs = NULL;
> + ret = -ENOIOCTLCMD;
> +
> + break;
> + }
Are these brackets needed here? There are no local variables inside
default case.
just my 2c,
With regards,
Pavel Skripkin
next prev parent reply other threads:[~2021-11-06 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 22:03 [PATCH v3] tty: vt: keyboard: add default switch-case, to handle smatch-warnings in method vt_do_kdgkb_ioctl Ajay Garg
2021-11-06 22:12 ` Pavel Skripkin [this message]
2021-11-06 22:17 ` Ajay Garg
2021-11-06 22:25 ` Pavel Skripkin
2021-11-07 3:21 ` Ajay Garg
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=8d0346ba-4819-c25e-f208-0b51116d9147@gmail.com \
--to=paskripkin@gmail.com \
--cc=ajaygargnsit@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel@esmil.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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).