staging: most: use min_t
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 22 Dec 2015 09:52:46 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
This patch replaces min with min_t.

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 4bf0322a99ebcbe731ea20d6c101168f1feb28a7..6ee4eb2177bd00b77d33990acf4cdf51be39ae16 100644 (file)
@@ -246,7 +246,9 @@ start_copy:
                return -EIO;
        }
 
-       to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs);
+       to_copy = min_t(size_t,
+                       count,
+                       mbo->processed_length - channel->mbo_offs);
 
        not_copied = copy_to_user(buf,
                                  mbo->virt_address + channel->mbo_offs,