Skip to contentSkip to conversation

staging: wilc1000: Removed unwanted curly braces

PATCH In review Aparna Karuthodi 2 participants 2 messages Sep 16, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: Removed unwanted curly braces

Removed unwanted curly braces of a single statement if-else block to remove a coding style warning detected by checkpatch. The warning is given below:

58: WARNING: braces {} are not necessary for any arm of this statement

---
 drivers/staging/wilc1000/fifo_buffer.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/fifo_buffer.c +2 -3
index b6c07cf..4fbac3d 100644
@@ -52,11 +52,10 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By
 		if (pstrFifoHandler->u32TotalBytes) {
 			down(&pstrFifoHandler->SemBuffer);
 
-			if (u32BytesToRead > pstrFifoHandler->u32TotalBytes) {
+			if (u32BytesToRead > pstrFifoHandler->u32TotalBytes)
 				*pu32BytesRead = pstrFifoHandler->u32TotalBytes;
-			} else {
+			 else
 				*pu32BytesRead = u32BytesToRead;
-			}
 			if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) {
 				WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
 					    *pu32BytesRead);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 16 lines · Aparna Karuthodi

Removed unwanted curly braces of a single statement if-else block to remove a coding style warning detected by checkpatch. The warning is given below:

58: WARNING: braces {} are not necessary for any arm of this statement

---
 drivers/staging/wilc1000/fifo_buffer.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/fifo_buffer.c +0 -0
index b6c07cf..4fbac3d 100644

drivers/staging/wilc1000/fifo_buffer.c u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By · line 57

Quoted 8 lines
drivers/staging/wilc1000/fifo_buffer.c +2 -2
@@ -52,11 +52,10 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By
 		if (pstrFifoHandler->u32TotalBytes) {
 			down(&pstrFifoHandler->SemBuffer);
 
-			if (u32BytesToRead > pstrFifoHandler->u32TotalBytes) {
+			if (u32BytesToRead > pstrFifoHandler->u32TotalBytes)
 				*pu32BytesRead = pstrFifoHandler->u32TotalBytes;
-			} else {
+			 else

The indenting is wrong here. There is an extra space char.

regards,
dan carpenter