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 @@ ...@@ -24,7 +24,7 @@
* * * *
************************************************************************* *************************************************************************
Module Name: Module Name:
rtusb_io.c rtusb_io.c
Abstract: Abstract:
...@@ -400,8 +400,7 @@ int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd, ...@@ -400,8 +400,7 @@ int RTUSBWriteBBPRegister(struct rt_rtmp_adapter *pAd,
("RTUSBWriteBBPRegister(BBP_CSR_CFG):retry count=%d!\n", ("RTUSBWriteBBPRegister(BBP_CSR_CFG):retry count=%d!\n",
i)); i));
i++; i++;
} } while ((i < RETRY_LIMIT)
while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))); && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));
if ((i == RETRY_LIMIT) if ((i == RETRY_LIMIT)
...@@ -455,8 +454,7 @@ int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value) ...@@ -455,8 +454,7 @@ int RTUSBWriteRFRegister(struct rt_rtmp_adapter *pAd, u32 Value)
("RTUSBWriteRFRegister(RF_CSR_CFG0):retry count=%d!\n", ("RTUSBWriteRFRegister(RF_CSR_CFG0):retry count=%d!\n",
i)); i));
i++; i++;
} } while ((i < RETRY_LIMIT)
while ((i < RETRY_LIMIT)
&& (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))); && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)));
if ((i == RETRY_LIMIT) if ((i == RETRY_LIMIT)
...@@ -652,11 +650,11 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd, ...@@ -652,11 +650,11 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
} }
else else
#endif #endif
return (NDIS_STATUS_RESOURCES); return NDIS_STATUS_RESOURCES;
status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(struct rt_cmdqelmt)); status = os_alloc_mem(pAd, (u8 **) (&cmdqelmt), sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL)) if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES); return NDIS_STATUS_RESOURCES;
cmdqelmt->buffer = NULL; cmdqelmt->buffer = NULL;
if (pInformationBuffer != NULL) { if (pInformationBuffer != NULL) {
...@@ -666,7 +664,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd, ...@@ -666,7 +664,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS) if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) { || (cmdqelmt->buffer == NULL)) {
kfree(cmdqelmt); kfree(cmdqelmt);
return (NDIS_STATUS_RESOURCES); return NDIS_STATUS_RESOURCES;
} else { } else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer, NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength); InformationBufferLength);
...@@ -698,7 +696,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd, ...@@ -698,7 +696,7 @@ int RTUSBEnqueueCmdFromNdis(struct rt_rtmp_adapter *pAd,
} else } else
RTUSBCMDUp(pAd); RTUSBCMDUp(pAd);
return (NDIS_STATUS_SUCCESS); return NDIS_STATUS_SUCCESS;
} }
/* /*
...@@ -726,7 +724,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd, ...@@ -726,7 +724,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(struct rt_cmdqelmt)); status = os_alloc_mem(pAd, (u8 **) & cmdqelmt, sizeof(struct rt_cmdqelmt));
if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL)) if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL))
return (NDIS_STATUS_RESOURCES); return NDIS_STATUS_RESOURCES;
NdisZeroMemory(cmdqelmt, sizeof(struct rt_cmdqelmt)); NdisZeroMemory(cmdqelmt, sizeof(struct rt_cmdqelmt));
if (InformationBufferLength > 0) { if (InformationBufferLength > 0) {
...@@ -736,7 +734,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd, ...@@ -736,7 +734,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
if ((status != NDIS_STATUS_SUCCESS) if ((status != NDIS_STATUS_SUCCESS)
|| (cmdqelmt->buffer == NULL)) { || (cmdqelmt->buffer == NULL)) {
os_free_mem(pAd, cmdqelmt); os_free_mem(pAd, cmdqelmt);
return (NDIS_STATUS_RESOURCES); return NDIS_STATUS_RESOURCES;
} else { } else {
NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer, NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer,
InformationBufferLength); InformationBufferLength);
...@@ -767,7 +765,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd, ...@@ -767,7 +765,7 @@ int RTUSBEnqueueInternalCmd(struct rt_rtmp_adapter *pAd,
} else } else
RTUSBCMDUp(pAd); RTUSBCMDUp(pAd);
} }
return (NDIS_STATUS_SUCCESS); return NDIS_STATUS_SUCCESS;
} }
/* /*
...@@ -1071,7 +1069,7 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) ...@@ -1071,7 +1069,7 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
TXRXQ_PCNT, TXRXQ_PCNT,
&MACValue); &MACValue);
if ((MACValue & 0xf00000 if ((MACValue & 0xf00000
/*0x800000 */ ) == 0) /*0x800000 */) == 0)
break; break;
Index++; Index++;
RTMPusecDelay(10000); RTMPusecDelay(10000);
...@@ -1406,15 +1404,13 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) ...@@ -1406,15 +1404,13 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
/* All transfers must be aborted or cancelled before attempting to reset the pipe. */ /* All transfers must be aborted or cancelled before attempting to reset the pipe. */
{ {
u32 MACValue; u32 MACValue;
{ {
/*while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) */ /*while ((atomic_read(&pAd->PendingRx) > 0) && (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) */
if ((pAd->PendingRx > 0) if ((pAd->PendingRx > 0)
&& &&
(!RTMP_TEST_FLAG (!RTMP_TEST_FLAG
(pAd, (pAd,
fRTMP_ADAPTER_NIC_NOT_EXIST))) fRTMP_ADAPTER_NIC_NOT_EXIST))) {
{
DBGPRINT_RAW DBGPRINT_RAW
(RT_DEBUG_ERROR, (RT_DEBUG_ERROR,
("BulkIn IRP Pending!!!\n")); ("BulkIn IRP Pending!!!\n"));
...@@ -1424,7 +1420,6 @@ void CMDHandler(struct rt_rtmp_adapter *pAd) ...@@ -1424,7 +1420,6 @@ void CMDHandler(struct rt_rtmp_adapter *pAd)
pAd->PendingRx = 0; pAd->PendingRx = 0;
} }
} }
/* Wait 10ms before reading register. */ /* Wait 10ms before reading register. */
RTMPusecDelay(10000); RTMPusecDelay(10000);
ntStatus = 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