From: Atin Bainada <hi@atinb.me>
To: gregkh@linuxfoundation.org
Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org,
Atin Bainada <hi@atinb.me>
Subject: [PATCH] tty: do checkpatch cleanup
Date: Tue, 07 Mar 2023 16:02:47 +0000 [thread overview]
Message-ID: <20230307160232.1029705-1-hi@atinb.me> (raw)
Signed-off-by: Atin Bainada <hi@atinb.me>
---
drivers/tty/tty_ioctl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 12983ce4e43e..05a4dd0db476 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
* the number of bytes written. If no method is provided 2K is always
* returned and data may be lost as there will be no flow control.
*/
-
+
unsigned int tty_write_room(struct tty_struct *tty)
{
if (tty->ops->write_room)
@@ -403,6 +403,7 @@ __weak int kernel_termios_to_user_termio(struct termio __user *termio,
struct ktermios *termios)
{
struct termio v;
+
memset(&v, 0, sizeof(struct termio));
v.c_iflag = termios->c_iflag;
v.c_oflag = termios->c_oflag;
@@ -540,6 +541,7 @@ static void copy_termios_locked(struct tty_struct *tty, struct ktermios *kterm)
static int get_termio(struct tty_struct *tty, struct termio __user *termio)
{
struct ktermios kterm;
+
copy_termios(tty, &kterm);
if (kernel_termios_to_user_termio(termio, &kterm))
return -EFAULT;
@@ -919,6 +921,7 @@ static int __tty_perform_flush(struct tty_struct *tty, unsigned long arg)
int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
{
struct tty_ldisc *ld;
+
int retval = tty_check_change(tty);
if (retval)
return retval;
--
2.39.2
next reply other threads:[~2023-03-07 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 16:02 Atin Bainada [this message]
2023-03-07 16:15 ` Greg KH
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=20230307160232.1029705-1-hi@atinb.me \
--to=hi@atinb.me \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®