[PATCH 03/28] staging: most: simplify expression

Christian Gromm christian.gromm at microchip.com
Tue Dec 22 09:52:44 UTC 2015


This patch replaces the ternary ?-operator with a way simpler subtraction.

Signed-off-by: Christian Gromm <christian.gromm at microchip.com>
---
This patch has been resent on behalf of Greg Kroah-Hartman <gregkh at linuxfoundation.org>

 drivers/staging/most/aim-cdev/cdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index bff891f..b293078 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -254,7 +254,7 @@ start_copy:
 				  mbo->virt_address + channel->mbo_offs,
 				  to_copy);
 
-	copied = not_copied ? to_copy - not_copied : to_copy;
+	copied = to_copy - not_copied;
 
 	if (count < mbo->processed_length) {
 		channel->mbo_offs = copied;
-- 
1.7.9.5



More information about the devel mailing list