Commit c41cd503 authored by Santha Meena Ramamoorthy's avatar Santha Meena Ramamoorthy Committed by Greg Kroah-Hartman

staging: rtl8188eu: place constant on the right side of test

Place constants on the right side of the test during comparisons to
conform to the Linux kernel coding style. Issue found using checkpatch.
Signed-off-by: default avatarSantha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2dcce8ed
...@@ -36,7 +36,7 @@ static u8 _is_fw_read_cmd_down(struct adapter *adapt, u8 msgbox_num) ...@@ -36,7 +36,7 @@ static u8 _is_fw_read_cmd_down(struct adapter *adapt, u8 msgbox_num)
do { do {
valid = usb_read8(adapt, REG_HMETFR) & BIT(msgbox_num); valid = usb_read8(adapt, REG_HMETFR) & BIT(msgbox_num);
if (0 == valid) if (valid == 0)
read_down = true; read_down = true;
} while ((!read_down) && (retry_cnts--)); } while ((!read_down) && (retry_cnts--));
......
...@@ -182,7 +182,7 @@ void rtw_hal_dm_init(struct adapter *Adapter) ...@@ -182,7 +182,7 @@ void rtw_hal_dm_init(struct adapter *Adapter)
/* Compare RSSI for deciding antenna */ /* Compare RSSI for deciding antenna */
void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src) void rtw_hal_antdiv_rssi_compared(struct adapter *Adapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src)
{ {
if (0 != Adapter->HalData->AntDivCfg) { if (Adapter->HalData->AntDivCfg != 0) {
/* select optimum_antenna for before linked =>For antenna diversity */ /* select optimum_antenna for before linked =>For antenna diversity */
if (dst->Rssi >= src->Rssi) {/* keep org parameter */ if (dst->Rssi >= src->Rssi) {/* keep org parameter */
src->Rssi = dst->Rssi; src->Rssi = dst->Rssi;
......
...@@ -221,13 +221,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) ...@@ -221,13 +221,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
} else { } else {
for (i = 0; i < (txpktbuf_bndy - 1); i++) { for (i = 0; i < (txpktbuf_bndy - 1); i++) {
status = _LLTWrite(padapter, i, i + 1); status = _LLTWrite(padapter, i, i + 1);
if (_SUCCESS != status) if (status != _SUCCESS)
return status; return status;
} }
/* end of list */ /* end of list */
status = _LLTWrite(padapter, (txpktbuf_bndy - 1), 0xFF); status = _LLTWrite(padapter, (txpktbuf_bndy - 1), 0xFF);
if (_SUCCESS != status) if (status != _SUCCESS)
return status; return status;
/* Make the other pages as ring buffer */ /* Make the other pages as ring buffer */
...@@ -235,13 +235,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) ...@@ -235,13 +235,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
/* Otherwise used as local loopback buffer. */ /* Otherwise used as local loopback buffer. */
for (i = txpktbuf_bndy; i < Last_Entry_Of_TxPktBuf; i++) { for (i = txpktbuf_bndy; i < Last_Entry_Of_TxPktBuf; i++) {
status = _LLTWrite(padapter, i, (i + 1)); status = _LLTWrite(padapter, i, (i + 1));
if (_SUCCESS != status) if (status != _SUCCESS)
return status; return status;
} }
/* Let last entry point to the start entry of ring buffer */ /* Let last entry point to the start entry of ring buffer */
status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy); status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy);
if (_SUCCESS != status) { if (status != _SUCCESS) {
return status; return status;
} }
} }
......
...@@ -552,7 +552,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp ...@@ -552,7 +552,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
pbuf = round_up(pbuf_tail, 8); pbuf = round_up(pbuf_tail, 8);
pfirstframe->agg_num++; pfirstframe->agg_num++;
if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num) if (pfirstframe->agg_num == MAX_TX_AGG_PACKET_NUMBER)
break; break;
if (pbuf < bulkptr) { if (pbuf < bulkptr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment