staging: most: simplify expression
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 22 Dec 2015 09:52:44 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
This patch replaces the ternary ?-operator with a way simpler subtraction.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c

index bff891f..b293078 100644 (file)
@@ -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;