From: Santha Meena Ramamoorthy Date: Mon, 5 Mar 2018 18:37:59 +0000 (-0800) Subject: staging: rtl8188eu: place constant on the right side of test X-Git-Tag: Ubuntu-5.2.0-15.16~4692^2~266 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c41cd503d70df654672a1e9a1b50ca8220f8a174;p=mirror_ubuntu-eoan-kernel.git 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: Santha Meena Ramamoorthy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 1ab2e5586ef0..8d242adae4b3 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -36,7 +36,7 @@ static u8 _is_fw_read_cmd_down(struct adapter *adapt, u8 msgbox_num) do { valid = usb_read8(adapt, REG_HMETFR) & BIT(msgbox_num); - if (0 == valid) + if (valid == 0) read_down = true; } while ((!read_down) && (retry_cnts--)); diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c index d04b7fbb71e1..ff227c8b98ca 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c @@ -182,7 +182,7 @@ void rtw_hal_dm_init(struct adapter *Adapter) /* Compare RSSI for deciding antenna */ 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 */ if (dst->Rssi >= src->Rssi) {/* keep org parameter */ src->Rssi = dst->Rssi; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 3673f573ac3d..54ede4baa0c9 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -221,13 +221,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) } else { for (i = 0; i < (txpktbuf_bndy - 1); i++) { status = _LLTWrite(padapter, i, i + 1); - if (_SUCCESS != status) + if (status != _SUCCESS) return status; } /* end of list */ status = _LLTWrite(padapter, (txpktbuf_bndy - 1), 0xFF); - if (_SUCCESS != status) + if (status != _SUCCESS) return status; /* Make the other pages as ring buffer */ @@ -235,13 +235,13 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy) /* Otherwise used as local loopback buffer. */ for (i = txpktbuf_bndy; i < Last_Entry_Of_TxPktBuf; i++) { status = _LLTWrite(padapter, i, (i + 1)); - if (_SUCCESS != status) + if (status != _SUCCESS) return status; } /* Let last entry point to the start entry of ring buffer */ status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy); - if (_SUCCESS != status) { + if (status != _SUCCESS) { return status; } } diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index a9912b60eb59..4f0f512f303c 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -552,7 +552,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp pbuf = round_up(pbuf_tail, 8); pfirstframe->agg_num++; - if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num) + if (pfirstframe->agg_num == MAX_TX_AGG_PACKET_NUMBER) break; if (pbuf < bulkptr) {