Commit d9ff3934 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: csr: remove CSRMIN() macro

Use the in-kernel min_t() macro for the one place it was being used.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eaadf9a7
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* Misc */ /* Misc */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#define CSRMIN(a, b) (((a) < (b)) ? (a) : (b))
/* Use this macro on unused local variables that cannot be removed (such as /* Use this macro on unused local variables that cannot be removed (such as
unused function parameters). This will quell warnings from certain compilers unused function parameters). This will quell warnings from certain compilers
and static code analysis tools like Lint and Valgrind. */ and static code analysis tools like Lint and Valgrind. */
......
...@@ -758,7 +758,7 @@ static u32 write_fwdl_to_ptdl(void *buf, const u32 offset, fwreadfn_t readfn, ...@@ -758,7 +758,7 @@ static u32 write_fwdl_to_ptdl(void *buf, const u32 offset, fwreadfn_t readfn,
while (left) while (left)
{ {
/* Calculate amount to be transferred */ /* 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; sec_len = sec_data_len + PTDL_HDR_SIZE;
/* Write PTDL header + entire PTDL size */ /* Write PTDL header + entire PTDL size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment