Skip to contentSkip to conversation

staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c

PATCH In review Lisa Nguyen 3 participants 3 messages Dec 11, 2013

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

PATCH v3 1/1 staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c

Rewrite the return statement in vpfe_video.c. This will prevent the checkpatch.pl script from generating a warning saying to remove () from this particular return statement.

---
Changes since v3:
- Removed () from return statement per Laurent Pinchart's suggestion

 drivers/staging/media/davinci_vpfe/vpfe_video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/davinci_vpfe/vpfe_video.c +1 -1
index 24d98a6..3b036be 100644
@@ -346,7 +346,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe)
 	}
 	mutex_unlock(&mdev->graph_mutex);
 
-	return (ret == 0) ? ret : -ETIMEDOUT ;
+	return ret ? -ETIMEDOUT : 0;
 }
 
 /*
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Lisa,

Thank you for the patch.

Quoted 5 lines · On Tuesday 10 December 2013 22:09:22 Lisa Nguyen wrote:

Rewrite the return statement in vpfe_video.c. This will prevent the checkpatch.pl script from generating a warning saying to remove () from this particular return statement.

Acked-by; Laurent Pinchart <[email protected]>

Quoted 21 lines

---
Changes since v3:
- Removed () from return statement per Laurent Pinchart's suggestion

 drivers/staging/media/davinci_vpfe/vpfe_video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 24d98a6..3b036be 100644

drivers/staging/media/davinci_vpfe/vpfe_video.c +1 -1
@@ -346,7 +346,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline
 *pipe) }
 	mutex_unlock(&mdev->graph_mutex);
 
-	return (ret == 0) ? ret : -ETIMEDOUT ;
+	return ret ? -ETIMEDOUT : 0;
 }
 
 /*
Signature · 3 lines
Regards,

Laurent Pinchart
Acked-by on v3 1/1
#2 lore raw
In reply to Lisa Nguyen

Hi Lisa,

Thanks for the patch.

Quoted 5 lines · Lisa Nguyen

Rewrite the return statement in vpfe_video.c. This will prevent the checkpatch.pl script from generating a warning saying to remove () from this particular return statement.

Will be queueing it for 3.14.

Regrads,
--Prabhakar Lad

Quoted 23 lines

---
Changes since v3:
- Removed () from return statement per Laurent Pinchart's suggestion

 drivers/staging/media/davinci_vpfe/vpfe_video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/davinci_vpfe/vpfe_video.c +1 -2
index 24d98a6..3b036be 100644
@@ -346,7 +346,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe)
        }
        mutex_unlock(&mdev->graph_mutex);
 
-       return (ret == 0) ? ret : -ETIMEDOUT ;
+       return ret ? -ETIMEDOUT : 0;
 }
 
 /*
--

1.7.9.5