From: "Luiz Fernando N. Capitulino" <lcapitulino@conectiva.com.br>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] - remove ugly code from usb/serial/usb-serial.c.
Date: Mon, 13 Sep 2004 18:43:50 -0300 [thread overview]
Message-ID: <20040913184350.44788366.lcapitulino@conectiva.com.br> (raw)
Greg,
This patch removes ugly code from some function in usb/serial/usb-serial.c
which is using a goto statement intead of a simple `return'.
To be true, I'm not certain if there is a special reason to do that, if so
ignore me. ;)
Signed-off-by: Luiz Capitulino <lcapitulino@conectiva.com.br>
drivers/usb/serial/usb-serial.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff -X /home/capitulino/kernels/2.6/dontdiff -Nparu a/drivers/usb/serial/usb-serial.c a~/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c 2004-09-12 18:36:22.000000000 -0300
+++ a~/drivers/usb/serial/usb-serial.c 2004-09-12 18:47:32.000000000 -0300
@@ -621,15 +621,12 @@ static void serial_throttle (struct tty_
if (!port->open_count) {
dbg ("%s - port not open", __FUNCTION__);
- goto exit;
+ return;
}
/* pass on to the driver specific version of this function */
if (port->serial->type->throttle)
port->serial->type->throttle(port);
-
-exit:
- ;
}
static void serial_unthrottle (struct tty_struct * tty)
@@ -640,15 +637,12 @@ static void serial_unthrottle (struct tt
if (!port->open_count) {
dbg("%s - port not open", __FUNCTION__);
- goto exit;
+ return;
}
/* pass on to the driver specific version of this function */
if (port->serial->type->unthrottle)
port->serial->type->unthrottle(port);
-
-exit:
- ;
}
static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
@@ -681,15 +675,12 @@ static void serial_set_termios (struct t
if (!port->open_count) {
dbg("%s - port not open", __FUNCTION__);
- goto exit;
+ return;
}
/* pass on to the driver specific version of this function if it is available */
if (port->serial->type->set_termios)
port->serial->type->set_termios(port, old);
-
-exit:
- ;
}
static void serial_break (struct tty_struct *tty, int break_state)
@@ -700,15 +691,12 @@ static void serial_break (struct tty_str
if (!port->open_count) {
dbg("%s - port not open", __FUNCTION__);
- goto exit;
+ return;
}
/* pass on to the driver specific version of this function if it is available */
if (port->serial->type->break_ctl)
port->serial->type->break_ctl(port, break_state);
-
-exit:
- ;
}
static int serial_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data)
next reply other threads:[~2004-09-13 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-13 21:43 Luiz Fernando N. Capitulino [this message]
2004-09-14 19:04 ` 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=20040913184350.44788366.lcapitulino@conectiva.com.br \
--to=lcapitulino@conectiva.com.br \
--cc=greg@kroah.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 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®