Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 168a2c10 authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: braces should be used on all arms



Fix all instances of the following checkpatch.pl check:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ca96884
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -191,9 +191,9 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
		imem_sz = fwhdr.img_IMEM_size;
		do {
			memset(ptx_desc, 0, TXDESC_SIZE);
			if (imem_sz >  MAX_DUMP_FWSZ/*49152*/)
			if (imem_sz >  MAX_DUMP_FWSZ/*49152*/) {
				dump_imem_sz = MAX_DUMP_FWSZ;
			else {
			} else {
				dump_imem_sz = imem_sz;
				ptx_desc->txdw0 |= cpu_to_le32(BIT(28));
			}
@@ -309,8 +309,9 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
		}
		if (i == 0)
			goto exit_fail;
	} else
	} else {
		goto exit_fail;
	}
	ret = _SUCCESS;

exit_fail:
@@ -386,9 +387,9 @@ uint rtl871x_hal_init(struct _adapter *padapter)
		return _FAIL;
	if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
		return _FAIL;
	if (rtl8712_hal_init(padapter) == _SUCCESS)
	if (rtl8712_hal_init(padapter) == _SUCCESS) {
		padapter->hw_init_completed = true;
	else {
	} else {
		padapter->hw_init_completed = false;
		return _FAIL;
	}
+10 −5
Original line number Diff line number Diff line
@@ -304,8 +304,9 @@ int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
		*group_cipher = r8712_get_wpa_cipher_suite(pos);
		pos += WPA_SELECTOR_LEN;
		left -= WPA_SELECTOR_LEN;
	} else if (left > 0)
	} else if (left > 0) {
		return _FAIL;
	}
	/*pairwise_cipher*/
	if (left >= 2) {
		count = le16_to_cpu(*(u16 *)pos);
@@ -318,8 +319,9 @@ int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
			pos += WPA_SELECTOR_LEN;
			left -= WPA_SELECTOR_LEN;
		}
	} else if (left == 1)
	} else if (left == 1) {
		return _FAIL;
	}
	return _SUCCESS;
}

@@ -344,8 +346,9 @@ int r8712_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
		*group_cipher = r8712_get_wpa2_cipher_suite(pos);
		pos += RSN_SELECTOR_LEN;
		left -= RSN_SELECTOR_LEN;
	} else if (left > 0)
	} else if (left > 0) {
		return _FAIL;
	}
	/*pairwise_cipher*/
	if (left >= 2) {
		count = le16_to_cpu(*(u16 *)pos);
@@ -358,8 +361,9 @@ int r8712_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
			pos += RSN_SELECTOR_LEN;
			left -= RSN_SELECTOR_LEN;
		}
	} else if (left == 1)
	} else if (left == 1) {
		return _FAIL;
	}
	return _SUCCESS;
}

@@ -385,10 +389,11 @@ int r8712_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
					in_ie[cnt + 1] + 2);
				*rsn_len = in_ie[cnt+1] + 2;
				cnt += in_ie[cnt+1] + 2;  /*get next*/
			} else
			} else {
				cnt += in_ie[cnt+1] + 2;   /*get next*/
			}
		}
	}
	return *rsn_len + *wpa_len;
}

+4 −2
Original line number Diff line number Diff line
@@ -405,10 +405,12 @@ int r8712_cmd_thread(void *context)
			if (list_empty(&pcmdpriv->cmd_queue.queue)) {
				r8712_unregister_cmd_alive(padapter);
				continue;
			} else
			} else {
				goto _next;
		} else
			}
		} else {
			goto _next;
		}
		flush_signals_thread();
	}
	/* free all cmd_obj resources */
+12 −8
Original line number Diff line number Diff line
@@ -163,8 +163,9 @@ static u8 efuse_is_empty(struct _adapter *padapter, u8 *empty)
			*empty = true;
		else
			*empty = false;
	} else
	} else {
		ret = false;
	}
	return ret;
}

@@ -229,9 +230,10 @@ u16 r8712_efuse_get_current_size(struct _adapter *padapter)
			word_cnts = calculate_word_cnts(hworden);
			/* read next header */
			efuse_addr = efuse_addr + (word_cnts * 2) + 1;
		} else
		} else {
			bContinual = false;
		}
	}
	return efuse_addr;
}

@@ -263,9 +265,10 @@ u8 r8712_efuse_pg_packet_read(struct _adapter *padapter, u8 offset, u8 *data)
					if (efuse_one_byte_read(padapter,
					    efuse_addr+1+tmpidx, &efuse_data)) {
						tmpdata[tmpidx] = efuse_data;
					} else
					} else {
						ret = false;
					}
				}
				pgpacket_copy_data(hworden, tmpdata, data);
			}
			efuse_addr += 1 + (word_cnts*2);
@@ -335,17 +338,17 @@ static u8 fix_header(struct _adapter *padapter, u8 header, u16 header_addr)
			efuse_one_byte_write(padapter, addr+1,
					pkt.data[i*2 + 1]);
			/* additional check */
			if (!efuse_one_byte_read(padapter, addr, &value))
			if (!efuse_one_byte_read(padapter, addr, &value)) {
				ret = false;
			else if (pkt.data[i*2] != value) {
			} else if (pkt.data[i*2] != value) {
				ret = false;
				if (0xFF == value) /* write again */
					efuse_one_byte_write(padapter, addr,
							pkt.data[i * 2]);
			}
			if (!efuse_one_byte_read(padapter, addr+1, &value))
			if (!efuse_one_byte_read(padapter, addr+1, &value)) {
				ret = false;
			else if (pkt.data[i*2 + 1] != value) {
			} else if (pkt.data[i*2 + 1] != value) {
				ret = false;
				if (0xFF == value) /* write again */
					efuse_one_byte_write(padapter, addr+1,
@@ -503,8 +506,9 @@ u8 r8712_efuse_map_write(struct _adapter *padapter, u16 addr, u16 cnts,
	if (efuse_is_empty(padapter, &empty)) {
		if (empty)
			memset(pktdata, 0xFF, PGPKT_DATA_SIZE);
	} else
	} else {
		return false;
	}
	offset = (addr >> 3) & 0xF;
	if (!empty)
		if (!r8712_efuse_pg_packet_read(padapter, offset, pktdata))
+10 −5
Original line number Diff line number Diff line
@@ -297,16 +297,18 @@ static void SwLedBlink1(struct LED_871x *pLed)
			if (!pLed1->bSWLedCtrl) {
				SwLedOn(padapter, pLed1);
				pLed1->bSWLedCtrl = true;
			} else if (!pLed1->bLedOn)
			} else if (!pLed1->bLedOn) {
				SwLedOn(padapter, pLed1);
			}
		} else {
			if (!pLed1->bSWLedCtrl) {
				SwLedOff(padapter, pLed1);
				pLed1->bSWLedCtrl = true;
			} else if (pLed1->bLedOn)
			} else if (pLed1->bLedOn) {
				SwLedOff(padapter, pLed1);
			}
		}
	}
	switch (pLed->CurrLedState) {
	case LED_BLINK_SLOWLY:
		if (pLed->bLedOn)
@@ -407,8 +409,9 @@ static void SwLedBlink1(struct LED_871x *pLed)
			mod_timer(&pLed->BlinkTimer, jiffies +
				  msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
			bStopBlinking = false;
		} else
		} else {
			bStopBlinking = true;
		}
		if (bStopBlinking) {
			pLed->bLedLinkBlinkInProgress = true;
			pLed->CurrLedState = LED_BLINK_NORMAL;
@@ -570,8 +573,9 @@ static void SwLedBlink3(struct LED_871x *pLed)
			mod_timer(&pLed->BlinkTimer, jiffies +
				  msecs_to_jiffies(LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA));
			bStopBlinking = false;
		} else
		} else {
			bStopBlinking = true;
		}
		if (bStopBlinking) {
			pLed->CurrLedState = LED_ON;
			pLed->BlinkingLedState = LED_ON;
@@ -1317,8 +1321,9 @@ static void SwLedControlMode3(struct _adapter *padapter,
		if (pLed->bLedWPSBlinkInProgress) {
			del_timer(&pLed->BlinkTimer);
			pLed->bLedWPSBlinkInProgress = false;
		} else
		} else {
			pLed->bLedWPSBlinkInProgress = true;
		}
		pLed->CurrLedState = LED_BLINK_WPS_STOP;
		if (pLed->bLedOn) {
			pLed->BlinkingLedState = LED_OFF;
Loading