浏览代码

Staging: csr: remove CSRMIN() macro

Use the in-kernel min_t() macro for the one place it was being used.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman 13 年之前
父节点
当前提交
d9ff393417
共有 2 个文件被更改,包括 1 次插入3 次删除
  1. 0 2
      drivers/staging/csr/csr_macro.h
  2. 1 1
      drivers/staging/csr/csr_wifi_hip_xbv.c

+ 0 - 2
drivers/staging/csr/csr_macro.h

@@ -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. */

+ 1 - 1
drivers/staging/csr/csr_wifi_hip_xbv.c

@@ -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 */