aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/csr/csr_macro.h2
-rw-r--r--drivers/staging/csr/csr_wifi_hip_xbv.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/csr/csr_macro.h b/drivers/staging/csr/csr_macro.h
index d78ac51dacc..c47f1d91b6f 100644
--- a/drivers/staging/csr/csr_macro.h
+++ b/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. */
diff --git a/drivers/staging/csr/csr_wifi_hip_xbv.c b/drivers/staging/csr/csr_wifi_hip_xbv.c
index 071f80a49f1..050a15fbadf 100644
--- a/drivers/staging/csr/csr_wifi_hip_xbv.c
+++ b/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 */