Commit 2c300f2a authored by Andrea Gelmini's avatar Andrea Gelmini Committed by Greg Kroah-Hartman

Staging: rt2870: rtusb_io.c: Checkpatch cleanup

drivers/staging/rt2870/common/rtusb_io.c:27: ERROR: code indent should use tabs where possible
drivers/staging/rt2870/common/rtusb_io.c:404: ERROR: while should follow close brace '}'
drivers/staging/rt2870/common/rtusb_io.c:459: ERROR: while should follow close brace '}'
drivers/staging/rt2870/common/rtusb_io.c:655: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:659: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:669: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:701: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:729: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:739: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:770: ERROR: return is not a function, parentheses are not required
drivers/staging/rt2870/common/rtusb_io.c:1412: ERROR: that open brace { should be on the previous line
drivers/staging/rt2870/common/rtusb_io.c:1434: ERROR: that open brace { should be on the previous line
Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f681d552
......@@ -24,7 +24,7 @@
* *
*************************************************************************
Module Name:
Module Name:
rtusb_io.c
Abstract:
......@@ -400,8 +400,7 @@ int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd,
("RTUSBWriteBBPRegister(BBP_CSR_CFG):retry count=%d!\n",
i));
i++;
}
while ((i < RETRY_LIMIT)
} while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));
if ((i == RETRY_LIMIT)
......@@ -455,8 +454,7 @@ int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value)
("RTUSBWriteRFRegister(RF_CSR_CFG0):retry count=%d!\n",
i));
i++;
}
while ((i < RETRY_LIMIT)
} while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));
if ((i == RETRY_LIMIT)
......@@ -652,11 +650,11 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
}
else
#endif
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
cmdqelmt->buffer = NULL;
if (pInformationBuffer != NULL) {
......@@ -666,7 +664,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) {
kfree(cmdqelmt);
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
} else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength);
......@@ -698,7 +696,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
} else
RTUSBCMDUp(pAd);
return (NDIS_STATUS_SUCCESS);
return NDIS_STATUS_SUCCESS;
}
/*
......@@ -726,7 +724,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
NdisZeroMemory(cmdqelmt, sizeof(struct rt_cmdqelmt));
if (InformationBufferLength > 0) {
......@@ -736,7 +734,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) {
os_free_mem(pAd, cmdqelmt);
return (NDIS_STATUS_RESOURCES);
return NDIS_STATUS_RESOURCES;
} else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength);
......@@ -767,7 +765,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
} else
RTUSBCMDUp(pAd);
}
return (NDIS_STATUS_SUCCESS);
return NDIS_STATUS_SUCCESS;
}
/*
......@@ -1071,7 +1069,7 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
TXRXQ_PCNT,
&MACValue);
if ((MACValue & 0xf00000
/*0x800000 */ ) == 0)
/*0x800000 */) == 0)
break;
Index++;
RTMPusecDelay(10000);
......@@ -1406,15 +1404,13 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
/* All transfers must be aborted or cancelled before attempting to reset the pipe. */
{
u32 MACValue;
{
/*while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) */
if ((pAd->PendingRx > 0)
&&
(!RTMP_TEST_FLAG
(pAd,
fRTMP_ADAPTER_NIC_NOT_EXIST)))
{
fRTMP_ADAPTER_NIC_NOT_EXIST))) {
DBGPRINT_RAW
(RT_DEBUG_ERROR,
("BulkIn IRP Pending!!!\n"));
......@@ -1424,7 +1420,6 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
pAd->PendingRx = 0;
}
}
/* Wait 10ms before reading register. */
RTMPusecDelay(10000);
ntStatus =
......
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