Staging: rdma: Use min macro instead of ternary operator
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 26 Feb 2016 10:04:31 +0000 (15:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commitc754db403d740827e49f5f9dedd9594ff55ccbe7
treef7f15fad0e832e32094057f0e00e69b6732507db
parent16ccad0475796c0acc084a51a49c9a86051586db
Staging: rdma: Use min macro instead of ternary operator

This patch replaces ternary operator with macro min as it shorter and
thus increases code readability. Macro min return the minimum of the
two compared values.
Made a semantic patch for changes:

@@
type T;
T x;
T y;
@@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/pio_copy.c