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


Groups > linux.kernel > #1578594 > unrolled thread

[PATCH] staging: bcm2835-audio: fix trailing statements

Started byAbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
First post2017-02-10 17:20 +0100
Last post2017-02-10 18:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: bcm2835-audio: fix trailing statements AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com> - 2017-02-10 17:20 +0100
    Re: [PATCH] staging: bcm2835-audio: fix trailing statements Joe Perches <joe@perches.com> - 2017-02-10 18:30 +0100

#1578594 — [PATCH] staging: bcm2835-audio: fix trailing statements

FromAbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
Date2017-02-10 17:20 +0100
Subject[PATCH] staging: bcm2835-audio: fix trailing statements
Message-ID<t9m5s-5JI-23@gated-at.bofh.it>
Trailing statements should be on next line.

Signed-off-by: AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
---
 drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
index 6578246..95ad58c 100644
--- a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
@@ -563,7 +563,8 @@ int bcm2835_audio_set_ctls(struct bcm2835_chip *chip)
 			} else if (bcm2835_audio_set_ctls_chan(chip->alsa_stream[i], chip) != 0) {
 				LOG_ERR("Couldn't set the controls for stream %d\n", i);
 				ret = -1;
-			} else LOG_DBG(" Controls set for stream %d\n", i);
+			} else
+				LOG_DBG(" Controls set for stream %d\n", i);
 		}
 	}
 	LOG_DBG(" .. OUT ret=%d\n", ret);
-- 
2.9.3

[toc] | [next] | [standalone]


#1578637

FromJoe Perches <joe@perches.com>
Date2017-02-10 18:30 +0100
Message-ID<t9nbb-6qo-11@gated-at.bofh.it>
In reply to#1578594
On Fri, 2017-02-10 at 17:14 +0100, AbdAllah-MEZITI wrote:
> Trailing statements should be on next line.
[]
> diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/bcm2835-audio/bcm2835-vchiq.c
[]
> @@ -563,7 +563,8 @@ int bcm2835_audio_set_ctls(struct bcm2835_chip *chip)
>  			} else if (bcm2835_audio_set_ctls_chan(chip->alsa_stream[i], chip) != 0) {
>  				LOG_ERR("Couldn't set the controls for stream %d\n", i);
>  				ret = -1;
> -			} else LOG_DBG(" Controls set for stream %d\n", i);
> +			} else
> +				LOG_DBG(" Controls set for stream %d\n", i);
>  		}
>  	}
>  	LOG_DBG(" .. OUT ret=%d\n", ret);

It's curious that checkpatch doesn't catch this and
ideally this would also use braces for the last else.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web