mirror of https://gitee.com/openkylin/linux.git
staging: rtl8723au: hal: Remove uneeded return variable
This patch removes uneeded return variables, just using 'return _SUCCESS' or 'return HCI_STATUS_SUCCESS' instead. This fixes the following warning detected using coccinelle: Unneeded variable. It was done using the following semantic patch: @@ identifier ret; type T; expression e; @@ -T ret = e; ... when != ret when strict -return ret; +return e; Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b9b4224b13
commit
147e45d921
|
@ -1766,9 +1766,7 @@ bthci_CmdSetEventFilter(
|
|||
struct packet_irp_hcicmd_data *pHciCmd
|
||||
)
|
||||
{
|
||||
enum hci_status status = HCI_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
return HCI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* 7.3.14 */
|
||||
|
@ -2984,8 +2982,7 @@ bthci_CmdReadLinkQuality(
|
|||
|
||||
static enum hci_status bthci_CmdReadRSSI(struct rtw_adapter *padapter)
|
||||
{
|
||||
enum hci_status status = HCI_STATUS_SUCCESS;
|
||||
return status;
|
||||
return HCI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static enum hci_status
|
||||
|
@ -2994,7 +2991,6 @@ bthci_CmdCreateLogicalLink(
|
|||
struct packet_irp_hcicmd_data *pHciCmd
|
||||
)
|
||||
{
|
||||
enum hci_status status = HCI_STATUS_SUCCESS;
|
||||
struct bt_30info *pBTInfo = GET_BT_INFO(padapter);
|
||||
struct bt_dgb *pBtDbg = &pBTInfo->BtDbg;
|
||||
|
||||
|
@ -3003,7 +2999,7 @@ bthci_CmdCreateLogicalLink(
|
|||
bthci_BuildLogicalLink(padapter, pHciCmd,
|
||||
HCI_CREATE_LOGICAL_LINK);
|
||||
|
||||
return status;
|
||||
return HCI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static enum hci_status
|
||||
|
@ -3012,7 +3008,6 @@ bthci_CmdAcceptLogicalLink(
|
|||
struct packet_irp_hcicmd_data *pHciCmd
|
||||
)
|
||||
{
|
||||
enum hci_status status = HCI_STATUS_SUCCESS;
|
||||
struct bt_30info *pBTInfo = GET_BT_INFO(padapter);
|
||||
struct bt_dgb *pBtDbg = &pBTInfo->BtDbg;
|
||||
|
||||
|
@ -3021,7 +3016,7 @@ bthci_CmdAcceptLogicalLink(
|
|||
bthci_BuildLogicalLink(padapter, pHciCmd,
|
||||
HCI_ACCEPT_LOGICAL_LINK);
|
||||
|
||||
return status;
|
||||
return HCI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static enum hci_status
|
||||
|
@ -4141,9 +4136,7 @@ static enum hci_status
|
|||
bthci_CmdHostNumberOfCompletedPackets(struct rtw_adapter *padapter,
|
||||
struct packet_irp_hcicmd_data *pHciCmd)
|
||||
{
|
||||
enum hci_status status = HCI_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
return HCI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static enum hci_status
|
||||
|
|
|
@ -115,19 +115,16 @@ int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen,
|
|||
|
||||
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)
|
||||
{
|
||||
int res = _SUCCESS;
|
||||
|
||||
*((u32 *)param) = cpu_to_le32(*((u32 *)param));
|
||||
|
||||
FillH2CCmd(padapter, RSSI_SETTING_EID, 3, param);
|
||||
|
||||
return res;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg)
|
||||
{
|
||||
u8 buf[5];
|
||||
int res = _SUCCESS;
|
||||
|
||||
memset(buf, 0, 5);
|
||||
mask = cpu_to_le32(mask);
|
||||
|
@ -136,7 +133,7 @@ int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg)
|
|||
|
||||
FillH2CCmd(padapter, MACID_CONFIG_EID, 5, buf);
|
||||
|
||||
return res;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
/* bitmap[0:27] = tx_rate_bitmap */
|
||||
|
|
|
@ -1522,10 +1522,8 @@ static void _DisableAnalog(struct rtw_adapter *padapter, bool bWithoutHWSM)
|
|||
/* HW Auto state machine */
|
||||
int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU)
|
||||
{
|
||||
int rtStatus = _SUCCESS;
|
||||
|
||||
if (padapter->bSurpriseRemoved) {
|
||||
return rtStatus;
|
||||
return _SUCCESS;
|
||||
}
|
||||
/* RF Off Sequence ==== */
|
||||
_DisableRFAFEAndResetBB(padapter);
|
||||
|
@ -1542,18 +1540,14 @@ int CardDisableHWSM(struct rtw_adapter *padapter, u8 resetMCU)
|
|||
RT_TRACE(_module_hci_hal_init_c_, _drv_info_,
|
||||
("======> Card disable finished.\n"));
|
||||
|
||||
return rtStatus;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
/* without HW Auto state machine */
|
||||
int CardDisableWithoutHWSM(struct rtw_adapter *padapter)
|
||||
{
|
||||
int rtStatus = _SUCCESS;
|
||||
|
||||
/* RT_TRACE(COMP_INIT, DBG_LOUD,
|
||||
("======> Card Disable Without HWSM .\n")); */
|
||||
if (padapter->bSurpriseRemoved) {
|
||||
return rtStatus;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
/* RF Off Sequence ==== */
|
||||
|
@ -1573,7 +1567,7 @@ int CardDisableWithoutHWSM(struct rtw_adapter *padapter)
|
|||
|
||||
/* RT_TRACE(COMP_INIT, DBG_LOUD,
|
||||
("<====== Card Disable Without HWSM .\n")); */
|
||||
return rtStatus;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void Hal_InitPGData(struct rtw_adapter *padapter, u8 *PROMContent)
|
||||
|
|
|
@ -418,7 +418,6 @@ PHY_SetRFReg(struct rtw_adapter *Adapter, enum RF_RADIO_PATH eRFPath,
|
|||
*---------------------------------------------------------------------------*/
|
||||
int PHY_MACConfig8723A(struct rtw_adapter *Adapter)
|
||||
{
|
||||
int rtStatus = _SUCCESS;
|
||||
struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter);
|
||||
bool is92C = IS_92C_SERIAL(pHalData->VersionID);
|
||||
|
||||
|
@ -433,7 +432,7 @@ int PHY_MACConfig8723A(struct rtw_adapter *Adapter)
|
|||
if (is92C && (BOARD_USB_DONGLE == pHalData->BoardType))
|
||||
rtl8723au_write8(Adapter, 0x40, 0x04);
|
||||
|
||||
return rtStatus;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue