All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Ding <dinggnu@gmail.com>
To: Tony Prisk <linux@prisktech.co.nz>,
	Alan Cox <alan@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Cong Ding <dinggnu@gmail.com>
Subject: [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}"
Date: Wed, 16 Jan 2013 23:25:03 +0100	[thread overview]
Message-ID: <1358375103-11703-1-git-send-email-dinggnu@gmail.com> (raw)

It is obviously here should be braced by "{}" in the "if" branch (more than 1
line in the "if" branch), and by the
coding style document of the kernel I also add "{}" to the else branch.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/tty/serial/vt8500_serial.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 8fd1814..ac46a6e 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -567,12 +567,13 @@ static int vt8500_serial_probe(struct platform_device *pdev)
 	if (!mmres || !irqres)
 		return -ENODEV;
 
-	if (np)
+	if (np) {
 		port = of_alias_get_id(np, "serial");
 		if (port > VT8500_MAX_PORTS)
 			port = -1;
-	else
+	} else {
 		port = -1;
+	}
 
 	if (port < 0) {
 		/* calculate the port id */
-- 
1.7.10.4


WARNING: multiple messages have this Message-ID (diff)
From: dinggnu@gmail.com (Cong Ding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}"
Date: Wed, 16 Jan 2013 23:25:03 +0100	[thread overview]
Message-ID: <1358375103-11703-1-git-send-email-dinggnu@gmail.com> (raw)

It is obviously here should be braced by "{}" in the "if" branch (more than 1
line in the "if" branch), and by the
coding style document of the kernel I also add "{}" to the else branch.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/tty/serial/vt8500_serial.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 8fd1814..ac46a6e 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -567,12 +567,13 @@ static int vt8500_serial_probe(struct platform_device *pdev)
 	if (!mmres || !irqres)
 		return -ENODEV;
 
-	if (np)
+	if (np) {
 		port = of_alias_get_id(np, "serial");
 		if (port > VT8500_MAX_PORTS)
 			port = -1;
-	else
+	} else {
 		port = -1;
+	}
 
 	if (port < 0) {
 		/* calculate the port id */
-- 
1.7.10.4

             reply	other threads:[~2013-01-16 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 22:25 Cong Ding [this message]
2013-01-16 22:25 ` [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}" Cong Ding
2013-01-16 23:19 ` Tony Prisk
2013-01-16 23:19   ` Tony Prisk

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=1358375103-11703-1-git-send-email-dinggnu@gmail.com \
    --to=dinggnu@gmail.com \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    /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.