Skip to content

Commit

Permalink
Staging: csr: remove CSRMIN() macro
Browse files Browse the repository at this point in the history
Use the in-kernel min_t() macro for the one place it was being used.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Oct 27, 2012
1 parent eaadf9a commit d9ff393
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/csr/csr_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/csr/csr_wifi_hip_xbv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit d9ff393

Please sign in to comment.