Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269021 > unrolled thread

[PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement

Started byNizam Haider <nizamhaider786@gmail.com>
First post2015-11-13 16:40 +0100
Last post2015-11-14 07:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement Nizam Haider <nizamhaider786@gmail.com> - 2015-11-13 16:40 +0100
    Re: [PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be  used on all arms of this statement Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-14 07:50 +0100

#1269021 — [PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement

FromNizam Haider <nizamhaider786@gmail.com>
Date2015-11-13 16:40 +0100
Subject[PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement
Message-ID<quoCd-8cf-7@gated-at.bofh.it>
Fix Checlpatch warning
HECK: braces {} should be used on all arms of this statement

Signed-off-by: Nizam Haider <nijamh@cdac.in>
---
 drivers/staging/dgnc/dgnc_neo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index e980150..99b230f 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1108,9 +1108,10 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
 	 * On the other hand, if the UART IS in FIFO mode, then ask
 	 * the UART to give us an approximation of data it has RX'ed.
 	 */
-	if (!(ch->ch_flags & CH_FIFO_ENABLED))
+	if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
 		total = 0;
-	else {
+	}
+		else {
 		total = readb(&ch->ch_neo_uart->rfifo);
 
 		/*
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1269426 — Re: [PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-11-14 07:50 +0100
SubjectRe: [PATCH v2 4/5] Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement
Message-ID<quCOS-zo-5@gated-at.bofh.it>
In reply to#1269021
On Fri, Nov 13, 2015 at 09:03:56PM +0530, Nizam Haider wrote:
> Fix Checlpatch warning
> HECK: braces {} should be used on all arms of this statement
> 
> Signed-off-by: Nizam Haider <nijamh@cdac.in>
> ---
>  drivers/staging/dgnc/dgnc_neo.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
> index e980150..99b230f 100644
> --- a/drivers/staging/dgnc/dgnc_neo.c
> +++ b/drivers/staging/dgnc/dgnc_neo.c
> @@ -1108,9 +1108,10 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
>  	 * On the other hand, if the UART IS in FIFO mode, then ask
>  	 * the UART to give us an approximation of data it has RX'ed.
>  	 */
> -	if (!(ch->ch_flags & CH_FIFO_ENABLED))
> +	if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
>  		total = 0;
> -	else {
> +	}
> +		else {

This should be:

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index e980150..67e2667 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1108,9 +1108,9 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
 	 * On the other hand, if the UART IS in FIFO mode, then ask
 	 * the UART to give us an approximation of data it has RX'ed.
 	 */
-	if (!(ch->ch_flags & CH_FIFO_ENABLED))
+	if (!(ch->ch_flags & CH_FIFO_ENABLED)) {
 		total = 0;
-	else {
+	} else {
 		total = readb(&ch->ch_neo_uart->rfifo);
 
 		/*

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web