Type of 'probe_rsp->rawData[1]' is 'hcf_8' which is 'u8', it will
compare with 'int', so use min_t() to cast to 'u8' to avoid related
warning.
If use min(), it has '(void) (&_min1 == &_min2);', so if no type cast,
the compiler will report 'pointer types lacks a cast':
drivers/staging/wlags49_h2/wl_main.c:3174:122: warning: comparison of distinct pointer types lacks a cast [enabled by default]
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
memset( ssid, 0, sizeof( ssid ));
strncpy( ssid, &probe_rsp->rawData[2],
- min(probe_rsp->rawData[1],
+ min_t(u8,
+ probe_rsp->rawData[1],
HCF_MAX_NAME_LEN - 1));
DBG_TRACE( DbgInfo, "(%s) SSID : %s\n",