mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
staging: bcm: Cleanup CreateInterruptUrb() and StartInterruptUrb()
Fixes checkpatch.pl warnings and errors: ERROR: that open brace { should be on the previous line + if (!psIntfAdapter->psInterruptUrb) + { WARNING: line over 80 characters + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb"); ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb"); ^ ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb"); ^ WARNING: line over 80 characters + psIntfAdapter->ulInterruptData; WARNING: line over 80 characters + sizeof(psIntfAdapter->ulInterruptData); WARNING: line over 80 characters + psIntfAdapter->sIntrIn.int_in_endpointAddr); WARNING: line over 80 characters + psIntfAdapter->psInterruptUrb->transfer_buffer, WARNING: line over 80 characters + psIntfAdapter->psInterruptUrb->transfer_buffer_length, WARNING: line over 80 characters + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n", ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n", ^ ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n", ^ ERROR: that open brace { should be on the previous line + if( false == psIntfAdapter->psAdapter->device_removed && + false == psIntfAdapter->psAdapter->bEndPointHalted && + false == psIntfAdapter->bSuspended && + false == psIntfAdapter->bPreparingForBusSuspend && + false == psIntfAdapter->psAdapter->StopAllXaction) + { ERROR: space prohibited after that open parenthesis '(' + if( false == psIntfAdapter->psAdapter->device_removed && ERROR: space required before the open parenthesis '(' + if( false == psIntfAdapter->psAdapter->device_removed && WARNING: line over 80 characters + status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC); ERROR: that open brace { should be on the previous line + if (status) + { WARNING: line over 80 characters + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status); ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status); ^ ERROR: space required after that ',' (ctx:VxV) + BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status); ^ ERROR: that open brace { should be on the previous line + if(status == -EPIPE) + { ERROR: space required before the open parenthesis '(' + if(status == -EPIPE) WARNING: line over 80 characters + psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; WARNING: space prohibited before semicolon + psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; WARNING: line over 80 characters + wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); Signed-off-by: Jade Bilkey <herself@thefumon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
94e74333d0
commit
6a259d9b7b
@ -136,28 +136,30 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
|
||||
int CreateInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
|
||||
{
|
||||
psIntfAdapter->psInterruptUrb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!psIntfAdapter->psInterruptUrb)
|
||||
{
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
|
||||
if (!psIntfAdapter->psInterruptUrb) {
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS,
|
||||
INTF_INIT, DBG_LVL_ALL,
|
||||
"Cannot allocate interrupt urb");
|
||||
return -ENOMEM;
|
||||
}
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer =
|
||||
psIntfAdapter->ulInterruptData;
|
||||
psIntfAdapter->ulInterruptData;
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer_length =
|
||||
sizeof(psIntfAdapter->ulInterruptData);
|
||||
sizeof(psIntfAdapter->ulInterruptData);
|
||||
|
||||
psIntfAdapter->sIntrIn.int_in_pipe = usb_rcvintpipe(psIntfAdapter->udev,
|
||||
psIntfAdapter->sIntrIn.int_in_endpointAddr);
|
||||
psIntfAdapter->sIntrIn.int_in_endpointAddr);
|
||||
|
||||
usb_fill_int_urb(psIntfAdapter->psInterruptUrb, psIntfAdapter->udev,
|
||||
psIntfAdapter->sIntrIn.int_in_pipe,
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer,
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer_length,
|
||||
read_int_callback, psIntfAdapter,
|
||||
psIntfAdapter->sIntrIn.int_in_interval);
|
||||
psIntfAdapter->sIntrIn.int_in_pipe,
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer,
|
||||
psIntfAdapter->psInterruptUrb->transfer_buffer_length,
|
||||
read_int_callback, psIntfAdapter,
|
||||
psIntfAdapter->sIntrIn.int_in_interval);
|
||||
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
|
||||
psIntfAdapter->sIntrIn.int_in_interval);
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, INTF_INIT,
|
||||
DBG_LVL_ALL, "Interrupt Interval: %d\n",
|
||||
psIntfAdapter->sIntrIn.int_in_interval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -166,19 +168,20 @@ INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
|
||||
{
|
||||
INT status = 0;
|
||||
|
||||
if( false == psIntfAdapter->psAdapter->device_removed &&
|
||||
false == psIntfAdapter->psAdapter->bEndPointHalted &&
|
||||
false == psIntfAdapter->bSuspended &&
|
||||
false == psIntfAdapter->bPreparingForBusSuspend &&
|
||||
false == psIntfAdapter->psAdapter->StopAllXaction)
|
||||
{
|
||||
status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
|
||||
if (status)
|
||||
{
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
|
||||
if(status == -EPIPE)
|
||||
{
|
||||
psIntfAdapter->psAdapter->bEndPointHalted = TRUE ;
|
||||
if (false == psIntfAdapter->psAdapter->device_removed &&
|
||||
false == psIntfAdapter->psAdapter->bEndPointHalted &&
|
||||
false == psIntfAdapter->bSuspended &&
|
||||
false == psIntfAdapter->bPreparingForBusSuspend &&
|
||||
false == psIntfAdapter->psAdapter->StopAllXaction) {
|
||||
status =
|
||||
usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
|
||||
if (status) {
|
||||
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
|
||||
DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,
|
||||
"Cannot send inturb %d\n", status);
|
||||
if (status == -EPIPE) {
|
||||
psIntfAdapter->psAdapter->bEndPointHalted =
|
||||
TRUE;
|
||||
wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user