[OPW,kernel] Staging: Fix incorrect brace placement
diff mbox

Message ID 20131005123032.GA4735@gmail.com
State Changes Requested
Headers show

Commit Message

Rashika Oct. 5, 2013, 12:30 p.m. UTC
The patch fixes the WARNING: braces {} are not necessary for single
statement blocks detected by checkpatch.pl

Signed-off-by: Rashika <rashika.kheria@gmail.com>
---
 drivers/staging/btmtk_usb/btmtk_usb.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Josh Triplett Oct. 5, 2013, 6:55 p.m. UTC | #1
On Sat, Oct 05, 2013 at 06:00:32PM +0530, Rashika wrote:
> The patch fixes the WARNING: braces {} are not necessary for single
> statement blocks detected by checkpatch.pl
> 
> Signed-off-by: Rashika <rashika.kheria@gmail.com>

You should fix the Signed-off-by and From to use your full name, but
otherwise this looks fine.

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

> ---
>  drivers/staging/btmtk_usb/btmtk_usb.c |   12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/btmtk_usb/btmtk_usb.c b/drivers/staging/btmtk_usb/btmtk_usb.c
> index 0b3e593..9386b93 100644
> --- a/drivers/staging/btmtk_usb/btmtk_usb.c
> +++ b/drivers/staging/btmtk_usb/btmtk_usb.c
> @@ -251,9 +251,8 @@ static u16 checksume16(u8 *pData, int len)
>  	if (len)
>  		sum += *((u8 *)pData);
>  
> -	while (sum >> 16) {
> +	while (sum >> 16)
>  		sum = (sum & 0xFFFF) + (sum >> 16);
> -	}
>  
>  	return ~sum;
>  }
> @@ -272,9 +271,8 @@ static int btmtk_usb_chk_crc(struct btmtk_usb_data *data, u32 checksum_len)
>  			DEVICE_VENDOR_REQUEST_IN, 0x20, 0x00, data->io_buf, 8,
>  						  CONTROL_TIMEOUT_JIFFIES);
>  
> -	if (ret < 0) {
> +	if (ret < 0)
>  		BT_ERR("%s error(%d)\n", __func__, ret);
> -	}
>  
>  	return ret;
>  }
> @@ -694,9 +692,8 @@ loadfw_protect:
>  			/* U2M_PDMA descriptor */
>  			btmtk_usb_io_write32(data, 0x230, cur_len);
>  
> -			while ((sent_len % 4) != 0) {
> +			while ((sent_len % 4) != 0)
>  				sent_len++;
> -			}
>  
>  			/* U2M_PDMA length */
>  			btmtk_usb_io_write32(data, 0x234, sent_len << 16);
> @@ -949,9 +946,8 @@ static void btmtk_usb_bulk_in_complete(struct urb *urb)
>  	BT_DBG("%s:%s urb %p status %d count %d", __func__, hdev->name,
>  					urb, urb->status, urb->actual_length);
>  
> -	if (!test_bit(HCI_RUNNING, &hdev->flags)) {
> +	if (!test_bit(HCI_RUNNING, &hdev->flags))
>  		return;
> -	}
>  
>  	if (urb->status == 0) {
>  		hdev->stat.byte_rx += urb->actual_length;
> -- 
> 1.7.9.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/btmtk_usb/btmtk_usb.c b/drivers/staging/btmtk_usb/btmtk_usb.c
index 0b3e593..9386b93 100644
--- a/drivers/staging/btmtk_usb/btmtk_usb.c
+++ b/drivers/staging/btmtk_usb/btmtk_usb.c
@@ -251,9 +251,8 @@  static u16 checksume16(u8 *pData, int len)
 	if (len)
 		sum += *((u8 *)pData);
 
-	while (sum >> 16) {
+	while (sum >> 16)
 		sum = (sum & 0xFFFF) + (sum >> 16);
-	}
 
 	return ~sum;
 }
@@ -272,9 +271,8 @@  static int btmtk_usb_chk_crc(struct btmtk_usb_data *data, u32 checksum_len)
 			DEVICE_VENDOR_REQUEST_IN, 0x20, 0x00, data->io_buf, 8,
 						  CONTROL_TIMEOUT_JIFFIES);
 
-	if (ret < 0) {
+	if (ret < 0)
 		BT_ERR("%s error(%d)\n", __func__, ret);
-	}
 
 	return ret;
 }
@@ -694,9 +692,8 @@  loadfw_protect:
 			/* U2M_PDMA descriptor */
 			btmtk_usb_io_write32(data, 0x230, cur_len);
 
-			while ((sent_len % 4) != 0) {
+			while ((sent_len % 4) != 0)
 				sent_len++;
-			}
 
 			/* U2M_PDMA length */
 			btmtk_usb_io_write32(data, 0x234, sent_len << 16);
@@ -949,9 +946,8 @@  static void btmtk_usb_bulk_in_complete(struct urb *urb)
 	BT_DBG("%s:%s urb %p status %d count %d", __func__, hdev->name,
 					urb, urb->status, urb->actual_length);
 
-	if (!test_bit(HCI_RUNNING, &hdev->flags)) {
+	if (!test_bit(HCI_RUNNING, &hdev->flags))
 		return;
-	}
 
 	if (urb->status == 0) {
 		hdev->stat.byte_rx += urb->actual_length;