[PATCH 15/45] staging: unisys: use the kernel min define
David Kershner
david.kershner at unisys.com
Tue Aug 1 14:40:37 UTC 2017
The kernel already provides a min function, we should be using that
instead of creating our own MINNUM.
Reviewed-by: Sameer Wadgaonkar <sameer.wadgaonkar at unisys.com>
Signed-off-by: David Kershner <david.kershner at unisys.com>
Reviewed-by: Tim Sell <timothy.sell at unisys.com>
---
drivers/staging/unisys/include/iochannel.h | 3 ---
drivers/staging/unisys/visornic/visornic_main.c | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 9e4fcce..b4f8a3e 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -46,9 +46,6 @@
* IO Partition is defined below.
*/
-/* Defines and enums. */
-#define MINNUM(a, b) (((a) < (b)) ? (a) : (b))
-
/* Define the two queues per data channel between iopart and ioguestparts. */
/* Used by ioguestpart to 'insert' signals to iopart. */
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 16907a6..fe3f72e 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -221,7 +221,7 @@ static u16 add_physinfo_entries(u64 inp_pfn, u16 inp_off, u32 inp_len,
} else {
pi_arr[index + i].pi_off = 0;
pi_arr[index + i].pi_len =
- (u16)MINNUM(len, (u32)PI_PAGE_SIZE);
+ (u16)min_t(u32, len, (u32)PI_PAGE_SIZE);
}
}
return index + i;
--
git-series 0.9.1
More information about the devel
mailing list