Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

beeceem: Fix position of braces in conditional statements in InterfaceTx.c

This corrects the position of (opening) braces in if-conditionals to make checkpatch shut up.

Signed-off-by: Ralph Mueck <linux-kernel@rmueck.de>
Signed-off-by: Matthias Oefelein <ma.oefelein@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ralph Mueck and committed by
Greg Kroah-Hartman
d1c6c9ca 5bbf5e66

+20 -43
+20 -43
drivers/staging/bcm/InterfaceTx.c
··· 13 13 if (unlikely(netif_msg_tx_done(Adapter))) 14 14 pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status); 15 15 16 - if (urb->status != STATUS_SUCCESS) 17 - { 18 - if (urb->status == -EPIPE) 19 - { 16 + if (urb->status != STATUS_SUCCESS) { 17 + if (urb->status == -EPIPE) { 20 18 psIntfAdapter->psAdapter->bEndPointHalted = TRUE; 21 19 wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); 22 - } 23 - else 24 - { 20 + } else { 25 21 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Tx URB has got cancelled. status :%d", urb->status); 26 22 } 27 23 } ··· 27 31 28 32 29 33 30 - if (TRUE == psAdapter->bPreparingForLowPowerMode) 31 - { 34 + if (TRUE == psAdapter->bPreparingForLowPowerMode) { 32 35 33 36 if (((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && 34 - (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) 35 - 36 - { 37 + (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { 37 38 bpowerDownMsg = TRUE; 38 39 //This covers the bus err while Idle Request msg sent down. 39 - if (urb->status != STATUS_SUCCESS) 40 - { 40 + if (urb->status != STATUS_SUCCESS) { 41 41 psAdapter->bPreparingForLowPowerMode = false; 42 42 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Idle Mode Request msg failed to reach to Modem"); 43 43 //Signalling the cntrl pkt path in Ioctl ··· 42 50 goto err_exit; 43 51 } 44 52 45 - if (psAdapter->bDoSuspend == false) 46 - { 53 + if (psAdapter->bDoSuspend == false) { 47 54 psAdapter->IdleMode = TRUE; 48 55 //since going in Idle mode completed hence making this var false; 49 56 psAdapter->bPreparingForLowPowerMode = false; ··· 52 61 wake_up(&psAdapter->lowpower_mode_wait_queue); 53 62 } 54 63 55 - } 56 - else if ((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && 64 + } else if ((pControlMsg->Leader.Status == LINK_UP_CONTROL_REQ) && 57 65 (pControlMsg->szData[0] == LINK_UP_ACK) && 58 66 (pControlMsg->szData[1] == LINK_SHUTDOWN_REQ_FROM_FIRMWARE) && 59 - (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) 60 - { 67 + (pControlMsg->szData[2] == SHUTDOWN_ACK_FROM_DRIVER)) { 61 68 //This covers the bus err while shutdown Request msg sent down. 62 - if (urb->status != STATUS_SUCCESS) 63 - { 69 + if (urb->status != STATUS_SUCCESS) { 64 70 psAdapter->bPreparingForLowPowerMode = false; 65 71 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Shutdown Request Msg failed to reach to Modem"); 66 72 //Signalling the cntrl pkt path in Ioctl ··· 67 79 } 68 80 69 81 bpowerDownMsg = TRUE; 70 - if (psAdapter->bDoSuspend == false) 71 - { 82 + if (psAdapter->bDoSuspend == false) { 72 83 psAdapter->bShutStatus = TRUE; 73 84 //since going in shutdown mode completed hence making this var false; 74 85 psAdapter->bPreparingForLowPowerMode = false; ··· 77 90 } 78 91 } 79 92 80 - if (psAdapter->bDoSuspend && bpowerDownMsg) 81 - { 93 + if (psAdapter->bDoSuspend && bpowerDownMsg) { 82 94 //issuing bus suspend request 83 95 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Issuing the Bus suspend request to USB stack"); 84 96 psIntfAdapter->bPreparingForBusSuspend = TRUE; ··· 99 113 UINT index = 0; 100 114 101 115 if ((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) && 102 - (psIntfAdapter->psAdapter->StopAllXaction == false)) 103 - { 116 + (psIntfAdapter->psAdapter->StopAllXaction == false)) { 104 117 index = atomic_read(&psIntfAdapter->uCurrTcb); 105 118 pTcb = &psIntfAdapter->asUsbTcb[index]; 106 119 pTcb->bUsed = TRUE; ··· 121 136 122 137 urb->transfer_buffer = usb_alloc_coherent(psIntfAdapter->udev, len, 123 138 GFP_ATOMIC, &urb->transfer_dma); 124 - if (!urb->transfer_buffer) 125 - { 139 + if (!urb->transfer_buffer) { 126 140 BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Error allocating memory\n"); 127 141 return -ENOMEM; 128 142 } ··· 130 146 131 147 BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Sending Bulk out packet\n"); 132 148 //For T3B,INT OUT end point will be used as bulk out end point 133 - if ((psIntfAdapter->psAdapter->chip_id == T3B) && (psIntfAdapter->bHighSpeedDevice == TRUE)) 134 - { 149 + if ((psIntfAdapter->psAdapter->chip_id == T3B) && (psIntfAdapter->bHighSpeedDevice == TRUE)) { 135 150 usb_fill_int_urb(urb, psIntfAdapter->udev, 136 151 psIntfAdapter->sBulkOut.bulk_out_pipe, 137 152 urb->transfer_buffer, len, write_bulk_callback, pTcb, 138 153 psIntfAdapter->sBulkOut.int_out_interval); 139 - } 140 - else 141 - { 154 + } else { 142 155 usb_fill_bulk_urb(urb, psIntfAdapter->udev, 143 156 psIntfAdapter->sBulkOut.bulk_out_pipe, 144 157 urb->transfer_buffer, len, write_bulk_callback, pTcb); ··· 145 164 if (false == psIntfAdapter->psAdapter->device_removed && 146 165 false == psIntfAdapter->psAdapter->bEndPointHalted && 147 166 false == psIntfAdapter->bSuspended && 148 - false == psIntfAdapter->bPreparingForBusSuspend) 149 - { 167 + false == psIntfAdapter->bPreparingForBusSuspend) { 150 168 retval = usb_submit_urb(urb, GFP_ATOMIC); 151 - if (retval) 152 - { 169 + if (retval) { 153 170 BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "failed submitting write urb, error %d", retval); 154 - if (retval == -EPIPE) 155 - { 171 + if (retval == -EPIPE) { 156 172 psIntfAdapter->psAdapter->bEndPointHalted = TRUE; 157 173 wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); 158 174 } ··· 164 186 165 187 struct bcm_interface_adapter *psIntfAdapter = arg; 166 188 pTcb = GetBulkOutTcb(psIntfAdapter); 167 - if (pTcb == NULL) 168 - { 189 + if (pTcb == NULL) { 169 190 BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "No URB to transmit packet, dropping packet"); 170 191 return -EFAULT; 171 192 }