rtl8188eu: Fix some gcc12 compiler warnings

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-07-15 13:51:36 -05:00
parent 903b6fcb82
commit a36cfdfdb6
2 changed files with 34 additions and 83 deletions

View file

@ -2270,10 +2270,8 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
#ifdef CONFIG_P2P
if (pwdinfo->driver_interface == DRIVER_CFG80211) {
if (ssids->ssid != NULL
&& !memcmp(ssids->ssid, "DIRECT-", 7)
&& rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)
) {
if (!memcmp(ssids->ssid, "DIRECT-", 7) &&
rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)) {
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
else {

View file

@ -1489,12 +1489,8 @@ phydm_cmd_parser(
case PHYDM_RA:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
/*PHYDM_SNPRINTF((output + used, out_len - used, "new SET, RA_var[%d]= (( %d ))\n", i, var1[i]));*/
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1512,12 +1508,8 @@ phydm_cmd_parser(
case PHYDM_ANTDIV:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i, var1[i]));*/
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1532,12 +1524,8 @@ phydm_cmd_parser(
case PHYDM_PATHDIV:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i, var1[i]));*/
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1552,12 +1540,8 @@ phydm_cmd_parser(
case PHYDM_DEBUG:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, Debug_var[%d]= (( %d ))\n", i, var1[i]));*/
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1571,10 +1555,8 @@ phydm_cmd_parser(
case PHYDM_FW_DEBUG:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1)
@ -1585,12 +1567,8 @@ phydm_cmd_parser(
case PHYDM_SUPPORT_ABILITY:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
/*PHYDM_SNPRINTF((output+used, out_len-used, "new SET, support ablity_var[%d]= (( %d ))\n", i, var1[i]));*/
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1603,10 +1581,8 @@ phydm_cmd_parser(
case PHYDM_SMART_ANT:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1633,10 +1609,8 @@ phydm_cmd_parser(
bool is_enable_dbg_mode;
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
if ((strcmp(input[1], help) == 0)) {
@ -1661,8 +1635,7 @@ phydm_cmd_parser(
case PHYDM_TRX_PATH:
for (i = 0; i < 4; i++) {
if (input[i + 1])
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
}
phydm_config_trx_path(p_dm_odm, (u32 *)var1, &used, output, &out_len);
break;
@ -1683,10 +1656,8 @@ phydm_cmd_parser(
{
u8 type = 0;
if (input[1]) {
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
type = (u8)var1[0];
}
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
type = (u8)var1[0];
if (type == 0)
phydm_dump_bb_reg(p_dm_odm, &used, output, &out_len);
@ -1707,10 +1678,8 @@ phydm_cmd_parser(
break;
case PHYDM_NBI_EN:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1718,17 +1687,13 @@ phydm_cmd_parser(
phydm_api_debug(p_dm_odm, PHYDM_API_NBI, (u32 *)var1, &used, output, &out_len);
/**/
}
break;
case PHYDM_CSI_MASK_EN:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {
@ -1745,10 +1710,8 @@ phydm_cmd_parser(
u32 var[6] = {0};
for (i = 0; i < 6; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var[i]);
input_idx++;
}
if (input_idx >= 1)
@ -1908,7 +1871,7 @@ phydm_cmd_parser(
phydm_bb_debug_info(p_dm_odm, &used, output, &out_len);
if (p_dm_odm->support_ic_type & ODM_RTL8822B && input[1]) {
if (p_dm_odm->support_ic_type & ODM_RTL8822B) {
PHYDM_SSCANF(input[1], DCMD_DECIMAL, &var1[0]);
odm_set_bb_reg(p_dm_odm, 0x1988, 0x003fff00, var1[0]);
value32 = odm_get_bb_reg(p_dm_odm, 0xf84, MASKDWORD);
@ -1942,14 +1905,8 @@ phydm_cmd_parser(
break;
case PHYDM_PAUSE_DIG_EN:
for (i = 0; i < 5; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
if (input_idx >= 1) {
if (var1[0] == 0) {
@ -1967,10 +1924,8 @@ phydm_cmd_parser(
case PHYDM_H2C:
for (i = 0; i < 8; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_HEX, &var1[i]);
input_idx++;
}
if (input_idx >= 1)
@ -1982,10 +1937,8 @@ phydm_cmd_parser(
case PHYDM_ANT_SWITCH:
for (i = 0; i < 8; i++) {
if (input[i + 1]) {
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
PHYDM_SSCANF(input[i + 1], DCMD_DECIMAL, &var1[i]);
input_idx++;
}
if (input_idx >= 1) {