diff mbox

[1/2] ASoC: fsl: fsl_dma: Use true/false for boolean init

Message ID 1431186353-7331-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Commit d0657fe8c645e3963d2a134d2a110c0b8cf08a9d
Headers show

Commit Message

Fabio Estevam May 9, 2015, 3:45 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Bool initializations should use true and false.  Bool tests don't need
comparisons.  Based on contributions from Joe Perches, Rusty Russell
and Bruce W Allan.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/boolinit.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/fsl/fsl_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Timur Tabi May 9, 2015, 3:47 p.m. UTC | #1
Fabio Estevam wrote:
> From: Fabio Estevam<fabio.estevam@freescale.com>
>
> Bool initializations should use true and false.  Bool tests don't need
> comparisons.  Based on contributions from Joe Perches, Rusty Russell
> and Bruce W Allan.
>
> The semantic patch that makes this change is available
> in scripts/coccinelle/misc/boolinit.cocci.
>
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/
>
> Signed-off-by: Fabio Estevam<fabio.estevam@freescale.com>

Acked-by: Timur Tabi <timur@tabi.org>
Mark Brown May 11, 2015, 3:14 p.m. UTC | #2
On Sat, May 09, 2015 at 12:45:52PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Bool initializations should use true and false.  Bool tests don't need
> comparisons.  Based on contributions from Joe Perches, Rusty Russell
> and Bruce W Allan.

Applied both, thanks.
diff mbox

Patch

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 93d7e56..ccadefc 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -445,7 +445,7 @@  static int fsl_dma_open(struct snd_pcm_substream *substream)
 		return ret;
 	}
 
-	dma->assigned = 1;
+	dma->assigned = true;
 
 	snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
 	snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware);
@@ -814,7 +814,7 @@  static int fsl_dma_close(struct snd_pcm_substream *substream)
 		substream->runtime->private_data = NULL;
 	}
 
-	dma->assigned = 0;
+	dma->assigned = false;
 
 	return 0;
 }