[PATCH 02/13] Staging: rt2870: rtusb_io.c: Checkpatch cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Andrea Gelmini <andrea.gelmini@xxxxxxxxx>
---
 drivers/staging/rt2870/common/rtusb_io.c |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
index cf0d2f5..cde38fe 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -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 =
-- 
1.7.0.90.g251a4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux