]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: csr: remove CSRMIN() macro
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Oct 2012 00:11:23 +0000 (17:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Oct 2012 00:11:23 +0000 (17:11 -0700)
Use the in-kernel min_t() macro for the one place it was being used.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/csr/csr_macro.h
drivers/staging/csr/csr_wifi_hip_xbv.c

index d78ac51daccddddb97bbc9f9b7416c03fbba6442..c47f1d91b6fa216c9b30af06bb09cbbbe0fa62b5 100644 (file)
@@ -31,8 +31,6 @@
 /*------------------------------------------------------------------*/
 /* Misc */
 /*------------------------------------------------------------------*/
-#define CSRMIN(a, b)    (((a) < (b)) ? (a) : (b))
-
 /* Use this macro on unused local variables that cannot be removed (such as
    unused function parameters). This will quell warnings from certain compilers
    and static code analysis tools like Lint and Valgrind. */
index 071f80a49f1983c757107fbdaf75eab100d0adde..050a15fbadf9a1b07a34d70f34f53108c26cbfe8 100644 (file)
@@ -758,7 +758,7 @@ static u32 write_fwdl_to_ptdl(void *buf, const u32 offset, fwreadfn_t readfn,
     while (left)
     {
         /* Calculate amount to be transferred */
-        sec_data_len = CSRMIN(left, PTDL_MAX_SIZE - PTDL_HDR_SIZE);
+        sec_data_len = min_t(u32, left, PTDL_MAX_SIZE - PTDL_HDR_SIZE);
         sec_len = sec_data_len + PTDL_HDR_SIZE;
 
         /* Write PTDL header + entire PTDL size */