Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -3
-2
drivers/staging/csr/csr_macro.h
··· 31 31 /*------------------------------------------------------------------*/ 32 32 /* Misc */ 33 33 /*------------------------------------------------------------------*/ 34 - #define CSRMIN(a, b) (((a) < (b)) ? (a) : (b)) 35 - 36 34 /* Use this macro on unused local variables that cannot be removed (such as 37 35 unused function parameters). This will quell warnings from certain compilers 38 36 and static code analysis tools like Lint and Valgrind. */
+1 -1
drivers/staging/csr/csr_wifi_hip_xbv.c
··· 758 758 while (left) 759 759 { 760 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 762 sec_len = sec_data_len + PTDL_HDR_SIZE; 763 763 764 764 /* Write PTDL header + entire PTDL size */