From: Amerigo Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@linux.intel.com>,
akpm@linux-foundation.org, Greg Kroah-Hartman <gregkh@suse.de>,
Joe Peterson <joe@skyrush.com>, Amerigo Wang <amwang@redhat.com>
Subject: [Patch] tty: move a definition out of switch block
Date: Tue, 1 Dec 2009 02:54:44 -0500 [thread overview]
Message-ID: <20091201075744.4456.48125.sendpatchset@localhost.localdomain> (raw)
It's not good to leave a definition between 'switch'
and its first label. Move it out of the switch block.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Joe Peterson <joe@skyrush.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 2e50f4d..233aa3d 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -502,6 +502,7 @@ static void process_echoes(struct tty_struct *tty)
unsigned char op;
unsigned char *opp;
int no_space_left = 0;
+ unsigned int num_chars, num_bs;
/*
* If the buffer byte is the start of a multi-byte
@@ -514,8 +515,6 @@ static void process_echoes(struct tty_struct *tty)
op = *opp;
switch (op) {
- unsigned int num_chars, num_bs;
-
case ECHO_OP_ERASE_TAB:
if (++opp == buf_end)
opp -= N_TTY_BUF_SIZE;
next reply other threads:[~2009-12-01 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 7:54 Amerigo Wang [this message]
2009-12-01 15:44 ` [Patch] tty: move a definition out of switch block Alan Cox
2009-12-03 8:36 ` Cong Wang
2009-12-03 11:13 ` Alan Cox
2009-12-08 10:10 ` Cong Wang
2009-12-08 15:02 ` Joe Peterson
2009-12-03 15:18 ` Joe Peterson
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=20091201075744.4456.48125.sendpatchset@localhost.localdomain \
--to=amwang@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=joe@skyrush.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.