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 bff891fc0a5dd18291446ede0138a564202de367..b29307820eda7bb6d3b2151f6ee4df2702542653 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;