Adhere to Linux kernel coding style. Reported by checkpatch: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses Signed-off-by: Artur Bujdoso <artur.bujdoso@xxxxxxxxx> --- drivers/staging/octeon-usb/octeon-hcd.c | 62 ++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index a1cd81d4a114..32bcd6c582f5 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -1101,9 +1101,9 @@ static struct cvmx_usb_pipe *cvmx_usb_open_pipe(struct octeon_hcd *usb, pipe = kzalloc(sizeof(*pipe), GFP_ATOMIC); if (!pipe) return NULL; - if ((device_speed == CVMX_USB_SPEED_HIGH) && - (transfer_dir == CVMX_USB_DIRECTION_OUT) && - (transfer_type == CVMX_USB_TRANSFER_BULK)) + if (device_speed == CVMX_USB_SPEED_HIGH && + transfer_dir == CVMX_USB_DIRECTION_OUT && + transfer_type == CVMX_USB_TRANSFER_BULK) pipe->flags |= CVMX_USB_PIPE_FLAGS_NEED_PING; pipe->device_addr = device_addr; pipe->endpoint_num = endpoint_num; @@ -1319,8 +1319,8 @@ static void cvmx_usb_fill_tx_fifo(struct octeon_hcd *usb, int channel) if (!usbc_hctsiz.s.xfersize) return; - if ((hcchar.s.eptype == CVMX_USB_TRANSFER_INTERRUPT) || - (hcchar.s.eptype == CVMX_USB_TRANSFER_ISOCHRONOUS)) + if (hcchar.s.eptype == CVMX_USB_TRANSFER_INTERRUPT || + hcchar.s.eptype == CVMX_USB_TRANSFER_ISOCHRONOUS) fifo = &usb->periodic; else fifo = &usb->nonperiodic; @@ -1637,9 +1637,9 @@ static void cvmx_usb_start_channel(struct octeon_hcd *usb, int channel, * begin/middle/end of the data or all */ if (!usbc_hcsplt.s.compsplt && - (pipe->transfer_dir == CVMX_USB_DIRECTION_OUT) && - (pipe->transfer_type == - CVMX_USB_TRANSFER_ISOCHRONOUS)) { + pipe->transfer_dir == CVMX_USB_DIRECTION_OUT && + pipe->transfer_type == + CVMX_USB_TRANSFER_ISOCHRONOUS) { /* * Clear the split complete frame number as * there isn't going to be a split complete @@ -1813,7 +1813,7 @@ static void cvmx_usb_start_channel(struct octeon_hcd *usb, int channel, break; } { - union cvmx_usbcx_hctsizx usbc_hctsiz = { .u32 = + union cvmx_usbcx_hctsizx usbc_hctsiz = { .u32 = cvmx_usb_read_csr32(usb, CVMX_USBCX_HCTSIZX(channel, usb->index)) @@ -1849,11 +1849,11 @@ static struct cvmx_usb_pipe *cvmx_usb_find_ready_pipe(struct octeon_hcd *usb, list_first_entry(&pipe->transactions, typeof(*t), node); if (!(pipe->flags & CVMX_USB_PIPE_FLAGS_SCHEDULED) && t && - (pipe->next_tx_frame <= current_frame) && - ((pipe->split_sc_frame == -1) || - ((((int)current_frame - pipe->split_sc_frame) & 0x7f) < + pipe->next_tx_frame <= current_frame && + (pipe->split_sc_frame == -1 || + (((int)current_frame - pipe->split_sc_frame) & 0x7f < 0x40)) && - (!usb->active_split || (usb->active_split == t))) { + !usb->active_split || (usb->active_split == t)) { prefetch(t); return pipe; } @@ -2075,8 +2075,8 @@ static void cvmx_usb_complete(struct octeon_hcd *usb, * If there are more ISOs pending and we succeeded, schedule the * next one */ - if ((transaction->iso_number_packets > 1) && - (complete_code == CVMX_USB_STATUS_OK)) { + if (transaction->iso_number_packets > 1 && + complete_code == CVMX_USB_STATUS_OK) { /* No bytes transferred for this packet as of yet */ transaction->actual_bytes = 0; /* One less ISO waiting to transfer */ @@ -2454,8 +2454,8 @@ static void cvmx_usb_transfer_control(struct octeon_hcd *usb, } break; case CVMX_USB_STAGE_DATA_SPLIT_COMPLETE: - if ((buffer_space_left == 0) || - (bytes_in_last_packet < pipe->max_packet)) { + if (buffer_space_left == 0 || + bytes_in_last_packet < pipe->max_packet) { pipe->pid_toggle = 1; transaction->stage = CVMX_USB_STAGE_STATUS; } else { @@ -2499,12 +2499,12 @@ static void cvmx_usb_transfer_bulk(struct octeon_hcd *usb, cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK); } else { - if ((pipe->device_speed == CVMX_USB_SPEED_HIGH) && - (pipe->transfer_dir == CVMX_USB_DIRECTION_OUT) && - (usbc_hcint.s.nak)) + if (pipe->device_speed == CVMX_USB_SPEED_HIGH && + pipe->transfer_dir == CVMX_USB_DIRECTION_OUT && + usbc_hcint.s.nak) pipe->flags |= CVMX_USB_PIPE_FLAGS_NEED_PING; if (!buffer_space_left || - (bytes_in_last_packet < pipe->max_packet)) + bytes_in_last_packet < pipe->max_packet) cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK); } @@ -2555,7 +2555,7 @@ static void cvmx_usb_transfer_isoc(struct octeon_hcd *usb, * then this transfer is complete. Otherwise start it * again to send the next 188 bytes */ - if (!buffer_space_left || (bytes_this_transfer < 188)) { + if (!buffer_space_left || bytes_this_transfer < 188) { pipe->next_tx_frame += pipe->interval; cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK); @@ -2568,8 +2568,8 @@ static void cvmx_usb_transfer_isoc(struct octeon_hcd *usb, * We are in the incoming data phase. Keep getting data * until we run out of space or get a small packet */ - if ((buffer_space_left == 0) || - (bytes_in_last_packet < pipe->max_packet)) { + if (buffer_space_left == 0 || + bytes_in_last_packet < pipe->max_packet) { pipe->next_tx_frame += pipe->interval; cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK); @@ -2737,8 +2737,8 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel) * the user's data. For this reason we don't count setup data as bytes * transferred */ - if ((transaction->stage == CVMX_USB_STAGE_SETUP) || - (transaction->stage == CVMX_USB_STAGE_SETUP_SPLIT_COMPLETE)) + if (transaction->stage == CVMX_USB_STAGE_SETUP || + transaction->stage == CVMX_USB_STAGE_SETUP_SPLIT_COMPLETE) bytes_this_transfer = 0; /* @@ -2765,9 +2765,9 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel) * a ping before proceeding. If this isn't true the ACK processing below * will clear this flag */ - if ((pipe->device_speed == CVMX_USB_SPEED_HIGH) && - (pipe->transfer_type == CVMX_USB_TRANSFER_BULK) && - (pipe->transfer_dir == CVMX_USB_DIRECTION_OUT)) + if (pipe->device_speed == CVMX_USB_SPEED_HIGH && + pipe->transfer_type == CVMX_USB_TRANSFER_BULK && + pipe->transfer_dir == CVMX_USB_DIRECTION_OUT) pipe->flags |= CVMX_USB_PIPE_FLAGS_NEED_PING; if (WARN_ON_ONCE(bytes_this_transfer < 0)) { @@ -2820,8 +2820,8 @@ static int cvmx_usb_poll_channel(struct octeon_hcd *usb, int channel) * If there is more data to go then we need to try * again. Otherwise this transaction is complete */ - if ((buffer_space_left == 0) || - (bytes_in_last_packet < pipe->max_packet)) + if (buffer_space_left == 0 || + bytes_in_last_packet < pipe->max_packet) cvmx_usb_complete(usb, pipe, transaction, CVMX_USB_STATUS_OK); -- 2.30.2