linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}"
@ 2013-01-16 22:25 Cong Ding
  2013-01-16 23:19 ` Tony Prisk
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Ding @ 2013-01-16 22:25 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}"
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Prisk @ 2013-01-16 23:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2013-01-16 at 23:25 +0100, Cong Ding wrote:
> 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 */

Correct. This patch is good but unnecessary now as the patch series I
pushed out removes this code anyway.

It should be applied if the series I sent out is not accepted in this
merge windows.

Regards
Tony P

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-16 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).