On Mon, Oct 28, 2013 at 01:19:29PM -0700, Lisa Nguyen wrote:
--- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
@@ -346,7 +346,10 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline
*pipe)
}
On Tue, Oct 29, 2013 at 12:14:14AM +0100, Andi Shyti wrote:
Hi Greg,
If you write it like this:
return !ret ? ret : -ETIMEDOUT;
checkpatch shouldn't complain.
No, but I will.
That's horrid code, please be specific and readable, no one should ever
use ?: syntax
Rewrite the return statement in vpfe_video.c to eliminate the
use of a ternary operator. This will prevent the checkpatch.pl
script from generating a warning saying to remove () from
this particular return statement.
Signed-off-by: Lisa Nguyen l...@xenapiadmin.com
---
On Mon, Oct 28, 2013 at 3:11 PM, Greg KH gre...@linuxfoundation.org wrote:
On Mon, Oct 28, 2013 at 10:51:38PM +0100, Andi Shyti wrote:
- return (ret == 0) ? ret : -ETIMEDOUT ;
+ if (ret == 0)
+ return ret;
+ else
+ return -ETIMEDOUT;
I actually like more the
Hi Greg,
If you write it like this:
return !ret ? ret : -ETIMEDOUT;
checkpatch shouldn't complain.
No, but I will.
That's horrid code, please be specific and readable, no one should ever
use ?: syntax except within function parameters.
why then don't we define it in the