]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: replace MIN/MAX with min_t/max_t
authorJeremiah Mahler <jmmahler@gmail.com>
Fri, 26 Dec 2014 00:04:43 +0000 (16:04 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 23:49:21 +0000 (15:49 -0800)
Switch from MIN/MAX to min_t/max_t with a size_t type.  The size_t type
was chosen because one operand is a size_t and all the others are
immediate integer values.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/router_proc.c

index 46cde7036f1d46d5f2d61199a216a7fd890f5907..c055afc86eb44f0653310c971d91a73f7b5ba8a6 100644 (file)
@@ -49,7 +49,7 @@ enum {
  */
 #define LNET_PROC_CPT_BITS     (LNET_CPT_BITS + 1)
 /* change version, 16 bits or 8 bits */
-#define LNET_PROC_VER_BITS     MAX(((MIN(LNET_LOFFT_BITS, 64)) / 4), 8)
+#define LNET_PROC_VER_BITS     max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
 
 #define LNET_PROC_HASH_BITS    LNET_PEER_HASH_BITS
 /*