diff mbox

[OPW,kernel,7/7] staging: imx-drm: use true and false for bool variables

Message ID 1382644953-3662-1-git-send-email-valentina.manea.m@gmail.com
State New, archived
Headers show

Commit Message

Valentina Manea Oct. 24, 2013, 8:02 p.m. UTC
This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
---
 drivers/staging/imx-drm/imx-tve.c           | 4 ++--
 drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c     | 4 ++--
 drivers/staging/imx-drm/ipu-v3/ipu-dp.c     | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

Comments

Rusty Russell Oct. 25, 2013, 12:54 a.m. UTC | #1
Valentina Manea <valentina.manea.m@gmail.com> writes:

> This patch fixes coccinelle errors for bool variables
> initialized with 1 or 0 instead of true and false.
>
> Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/imx-drm/imx-tve.c           | 4 ++--
>  drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
>  drivers/staging/imx-drm/ipu-v3/ipu-dc.c     | 4 ++--
>  drivers/staging/imx-drm/ipu-v3/ipu-dp.c     | 2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
> index 33d6525..dd9efdd 100644
> --- a/drivers/staging/imx-drm/imx-tve.c
> +++ b/drivers/staging/imx-drm/imx-tve.c
> @@ -151,7 +151,7 @@ static void tve_enable(struct imx_tve *tve)
>  
>  	spin_lock_irqsave(&tve->enable_lock, flags);
>  	if (!tve->enabled) {
> -		tve->enabled = 1;
> +		tve->enabled = true;
>  		clk_prepare_enable(tve->clk);
>  		ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
>  					 TVE_IPU_CLK_EN | TVE_EN,
> @@ -180,7 +180,7 @@ static void tve_disable(struct imx_tve *tve)
>  
>  	spin_lock_irqsave(&tve->enable_lock, flags);
>  	if (tve->enabled) {
> -		tve->enabled = 0;
> +		tve->enabled = false;
>  		ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
>  					 TVE_IPU_CLK_EN | TVE_EN, 0);
>  		clk_disable_unprepare(tve->clk);
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> index ba464e5..1a6bfc1 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
> @@ -476,7 +476,7 @@ struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num)
>  		goto out;
>  	}
>  
> -	channel->busy = 1;
> +	channel->busy = true;
>  	channel->num = num;
>  
>  out:
> @@ -494,7 +494,7 @@ void ipu_idmac_put(struct ipuv3_channel *channel)
>  
>  	mutex_lock(&ipu->channel_lock);
>  
> -	channel->busy = 0;
> +	channel->busy = false;
>  
>  	mutex_unlock(&ipu->channel_lock);
>  }
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> index 21bf1c8..0b26854 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> @@ -313,7 +313,7 @@ struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel)
>  		return ERR_PTR(-EBUSY);
>  	}
>  
> -	dc->in_use = 1;
> +	dc->in_use = true;
>  
>  	mutex_unlock(&priv->mutex);
>  
> @@ -326,7 +326,7 @@ void ipu_dc_put(struct ipu_dc *dc)
>  	struct ipu_dc_priv *priv = dc->priv;
>  
>  	mutex_lock(&priv->mutex);
> -	dc->in_use = 0;
> +	dc->in_use = false;
>  	mutex_unlock(&priv->mutex);
>  }
>  EXPORT_SYMBOL_GPL(ipu_dc_put);
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
> index 231afd6..58f87c8 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
> @@ -325,7 +325,7 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
>  	mutex_init(&priv->mutex);
>  
>  	for (i = 0; i < IPUV3_NUM_FLOWS; i++) {
> -		priv->flow[i].foreground.foreground = 1;
> +		priv->flow[i].foreground.foreground = true;
>  		priv->flow[i].base = priv->base + ipu_dp_flow_base[i];
>  		priv->flow[i].priv = priv;
>  	}
> -- 
> 1.8.1.2
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index 33d6525..dd9efdd 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -151,7 +151,7 @@  static void tve_enable(struct imx_tve *tve)
 
 	spin_lock_irqsave(&tve->enable_lock, flags);
 	if (!tve->enabled) {
-		tve->enabled = 1;
+		tve->enabled = true;
 		clk_prepare_enable(tve->clk);
 		ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
 					 TVE_IPU_CLK_EN | TVE_EN,
@@ -180,7 +180,7 @@  static void tve_disable(struct imx_tve *tve)
 
 	spin_lock_irqsave(&tve->enable_lock, flags);
 	if (tve->enabled) {
-		tve->enabled = 0;
+		tve->enabled = false;
 		ret = regmap_update_bits(tve->regmap, TVE_COM_CONF_REG,
 					 TVE_IPU_CLK_EN | TVE_EN, 0);
 		clk_disable_unprepare(tve->clk);
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
index ba464e5..1a6bfc1 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
@@ -476,7 +476,7 @@  struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num)
 		goto out;
 	}
 
-	channel->busy = 1;
+	channel->busy = true;
 	channel->num = num;
 
 out:
@@ -494,7 +494,7 @@  void ipu_idmac_put(struct ipuv3_channel *channel)
 
 	mutex_lock(&ipu->channel_lock);
 
-	channel->busy = 0;
+	channel->busy = false;
 
 	mutex_unlock(&ipu->channel_lock);
 }
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
index 21bf1c8..0b26854 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
@@ -313,7 +313,7 @@  struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel)
 		return ERR_PTR(-EBUSY);
 	}
 
-	dc->in_use = 1;
+	dc->in_use = true;
 
 	mutex_unlock(&priv->mutex);
 
@@ -326,7 +326,7 @@  void ipu_dc_put(struct ipu_dc *dc)
 	struct ipu_dc_priv *priv = dc->priv;
 
 	mutex_lock(&priv->mutex);
-	dc->in_use = 0;
+	dc->in_use = false;
 	mutex_unlock(&priv->mutex);
 }
 EXPORT_SYMBOL_GPL(ipu_dc_put);
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
index 231afd6..58f87c8 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
@@ -325,7 +325,7 @@  int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
 	mutex_init(&priv->mutex);
 
 	for (i = 0; i < IPUV3_NUM_FLOWS; i++) {
-		priv->flow[i].foreground.foreground = 1;
+		priv->flow[i].foreground.foreground = true;
 		priv->flow[i].base = priv->base + ipu_dp_flow_base[i];
 		priv->flow[i].priv = priv;
 	}