Skip to contentSkip to conversation

gpu: ipu-v3: wait_for_completion_timeout does not return negative status

PATCH In review Nicholas Mc Guire 2 participants 2 messages Jan 19, 2015 – Jan 22, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpu: ipu-v3: wait_for_completion_timeout does not return negative status

---

This fixes up the return value handling and the return type

Patch is against 3.19.0-rc3 -next-20150109

This patch was compiletested with imx_v6_v7_defconfig + CONFIG_RESET_CONTROLLER=y, CONFIG_IMX_IPUV3_CORE=m

Incorrect return type reported by Philipp Zabel <[email protected]>

 drivers/gpu/ipu-v3/ipu-dc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/ipu-v3/ipu-dc.c +3 -2
index 2326c75..508c81d 100644
@@ -267,7 +267,8 @@ static irqreturn_t dc_irq_handler(int irq, void *dev_id)
 void ipu_dc_disable_channel(struct ipu_dc *dc)
 {
 	struct ipu_dc_priv *priv = dc->priv;
-	int irq, ret;
+	int irq;
+	unsigned long ret;
 	u32 val;
 
 	/* TODO: Handle MEM_FG_SYNC differently from MEM_BG_SYNC */
@@ -282,7 +283,7 @@ void ipu_dc_disable_channel(struct ipu_dc *dc)
 	enable_irq(irq);
 	ret = wait_for_completion_timeout(&priv->comp, msecs_to_jiffies(50));
 	disable_irq(irq);
-	if (ret <= 0) {
+	if (ret == 0) {
 		dev_warn(priv->dev, "DC stop timeout after 50 ms\n");
 
 		val = readl(dc->base + DC_WR_CH_CONF);
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw

Am Montag, den 19.01.2015, 12:38 +0100 schrieb Nicholas Mc Guire:

Quoted 11 lines

---

This fixes up the return value handling and the return type

Patch is against 3.19.0-rc3 -next-20150109

This patch was compiletested with imx_v6_v7_defconfig + CONFIG_RESET_CONTROLLER=y, CONFIG_IMX_IPUV3_CORE=m

Incorrect return type reported by Philipp Zabel <[email protected]>

Thank you, I have queued this patch.

regards
Philipp