Skip to content
Commit f541335e authored by Deepak R Varma's avatar Deepak R Varma Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Use min_t/max_t macros for variable comparison



Simplify code by using min_t and max_t helper macros in place of lengthy
if/else block oriented logical evaluation and value assignment. This
issue is identified by coccicheck using the minmax.cocci file.

Use the *_t variants of min/max macros to avoid compiler warnings about
data typecast.
Also, use u32 as type for min_t macro to avoid any truncation of data
associated with enum constant HT_AGG_SIZE_32K.

Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/Y2LxC2kziM1TznhO@qemulion


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96a53586
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment