The kernel already provides a min function, we should be using that
instead of creating our own MINNUM.

Reviewed-by: Sameer Wadgaonkar <sameer.wadgaon...@unisys.com>
Signed-off-by: David Kershner <david.kersh...@unisys.com>
Reviewed-by: Tim Sell <timothy.s...@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 ca9d6f9..e6f1d55 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 135d37c..7856ed1 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
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to