diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-26 20:11:23 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-26 20:11:23 -0400 |
| commit | d9ff3934171b5cf1ac17e5fcd39f3f324b4724ce (patch) | |
| tree | fe5c4779c0f78ca182080a4c0f7a6e000299dd9f | |
| parent | eaadf9a76e80b00dfac31ee7ee0a5ca8fb284baf (diff) | |
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>
| -rw-r--r-- | drivers/staging/csr/csr_macro.h | 2 | ||||
| -rw-r--r-- | drivers/staging/csr/csr_wifi_hip_xbv.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/csr/csr_macro.h b/drivers/staging/csr/csr_macro.h index d78ac51daccd..c47f1d91b6fa 100644 --- a/drivers/staging/csr/csr_macro.h +++ b/drivers/staging/csr/csr_macro.h | |||
| @@ -31,8 +31,6 @@ | |||
| 31 | /*------------------------------------------------------------------*/ | 31 | /*------------------------------------------------------------------*/ |
| 32 | /* Misc */ | 32 | /* Misc */ |
| 33 | /*------------------------------------------------------------------*/ | 33 | /*------------------------------------------------------------------*/ |
| 34 | #define CSRMIN(a, b) (((a) < (b)) ? (a) : (b)) | ||
| 35 | |||
| 36 | /* Use this macro on unused local variables that cannot be removed (such as | 34 | /* Use this macro on unused local variables that cannot be removed (such as |
| 37 | unused function parameters). This will quell warnings from certain compilers | 35 | unused function parameters). This will quell warnings from certain compilers |
| 38 | and static code analysis tools like Lint and Valgrind. */ | 36 | 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 071f80a49f19..050a15fbadf9 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, | |||
| 758 | while (left) | 758 | while (left) |
| 759 | { | 759 | { |
| 760 | /* Calculate amount to be transferred */ | 760 | /* Calculate amount to be transferred */ |
| 761 | sec_data_len = CSRMIN(left, PTDL_MAX_SIZE - PTDL_HDR_SIZE); | 761 | sec_data_len = min_t(u32, left, PTDL_MAX_SIZE - PTDL_HDR_SIZE); |
| 762 | sec_len = sec_data_len + PTDL_HDR_SIZE; | 762 | sec_len = sec_data_len + PTDL_HDR_SIZE; |
| 763 | 763 | ||
| 764 | /* Write PTDL header + entire PTDL size */ | 764 | /* Write PTDL header + entire PTDL size */ |
