Skip to contentSkip to conversation

usb: xhci: Replace terrible formatting with different terrible formatting

PATCH In review Marek Vasut 2 participants 3 messages Nov 22, 2023 – Dec 3, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: xhci: Replace terrible formatting with different terrible formatting

Replace one type of terrible code formatting with a different type of terrible code formatting. No functional change.

---
Cc: Bin Meng <[email protected]>
Cc: Hector Martin <[email protected]>

---
 drivers/usb/host/xhci-ring.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
drivers/usb/host/xhci-ring.c +7 -11
index dabe6cf86af..be3e35102d6 100644
@@ -543,9 +543,8 @@ static void reset_ep(struct usb_device *udev, int ep_index)
 	if (!event)
 		return;
 
-	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || GET_COMP_CODE(le32_to_cpu(
-		event->event_cmd.status)) != COMP_SUCCESS);
+	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+	       GET_COMP_CODE(le32_to_cpu(event->event_cmd.status)) != COMP_SUCCESS);
 	xhci_acknowledge_event(ctrl);
 }
 
@@ -578,8 +577,7 @@ static void abort_td(struct usb_device *udev, int ep_index)
 		field = le32_to_cpu(event->trans_event.flags);
 		BUG_ON(TRB_TO_SLOT_ID(field) != udev->slot_id);
 		BUG_ON(TRB_TO_EP_INDEX(field) != ep_index);
-		BUG_ON(GET_COMP_CODE(le32_to_cpu(event->trans_event.transfer_len
-			!= COMP_STOP)));
+		BUG_ON(GET_COMP_CODE(le32_to_cpu(event->trans_event.transfer_len != COMP_STOP)));
 		xhci_acknowledge_event(ctrl);
 
 		event = xhci_wait_for_event(ctrl, TRB_COMPLETION);
@@ -593,9 +591,8 @@ static void abort_td(struct usb_device *udev, int ep_index)
 
 	comp = GET_COMP_CODE(le32_to_cpu(event->event_cmd.status));
 	BUG_ON(type != TRB_COMPLETION ||
-		TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || (comp != COMP_SUCCESS && comp
-		!= COMP_CTX_STATE));
+		TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+		(comp != COMP_SUCCESS && comp != COMP_CTX_STATE));
 	xhci_acknowledge_event(ctrl);
 
 	addr = xhci_trb_virt_to_dma(ring->enq_seg,
@@ -605,9 +602,8 @@ static void abort_td(struct usb_device *udev, int ep_index)
 	if (!event)
 		return;
 
-	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || GET_COMP_CODE(le32_to_cpu(
-		event->event_cmd.status)) != COMP_SUCCESS);
+	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+	       GET_COMP_CODE(le32_to_cpu(event->event_cmd.status)) != COMP_SUCCESS);
 	xhci_acknowledge_event(ctrl);
 }
 
Signature · 1 line
2.42.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Marek Vasut

Replace one type of terrible code formatting with a different type of terrible code formatting. No functional change.

---
Cc: Bin Meng <[email protected]>
Cc: Hector Martin <[email protected]>

---
 drivers/usb/host/xhci-ring.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

Lol.

Quoted 40 lines
drivers/usb/host/xhci-ring.c +5 -8
index dabe6cf86af..be3e35102d6 100644
@@ -543,9 +543,8 @@ static void reset_ep(struct usb_device *udev, int ep_index)
 	if (!event)
 		return;
 
-	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || GET_COMP_CODE(le32_to_cpu(
-		event->event_cmd.status)) != COMP_SUCCESS);
+	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+	       GET_COMP_CODE(le32_to_cpu(event->event_cmd.status)) != COMP_SUCCESS);
 	xhci_acknowledge_event(ctrl);
 }
 
@@ -578,8 +577,7 @@ static void abort_td(struct usb_device *udev, int ep_index)
 		field = le32_to_cpu(event->trans_event.flags);
 		BUG_ON(TRB_TO_SLOT_ID(field) != udev->slot_id);
 		BUG_ON(TRB_TO_EP_INDEX(field) != ep_index);
-		BUG_ON(GET_COMP_CODE(le32_to_cpu(event->trans_event.transfer_len
-			!= COMP_STOP)));
+		BUG_ON(GET_COMP_CODE(le32_to_cpu(event->trans_event.transfer_len != COMP_STOP)));
 		xhci_acknowledge_event(ctrl);
 
 		event = xhci_wait_for_event(ctrl, TRB_COMPLETION);
@@ -593,9 +591,8 @@ static void abort_td(struct usb_device *udev, int ep_index)
 
 	comp = GET_COMP_CODE(le32_to_cpu(event->event_cmd.status));
 	BUG_ON(type != TRB_COMPLETION ||
-		TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || (comp != COMP_SUCCESS && comp
-		!= COMP_CTX_STATE));
+		TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+		(comp != COMP_SUCCESS && comp != COMP_CTX_STATE));
 	xhci_acknowledge_event(ctrl);
 
 	addr = xhci_trb_virt_to_dma(ring->enq_seg,
@@ -605,9 +602,8 @@ static void abort_td(struct usb_device *udev, int ep_index)
 	if (!event)

drivers/usb/host/xhci-ring.c static void abort_td(struct usb_device *udev, int ep_index) · line 609

Quoted 10 lines
drivers/usb/host/xhci-ring.c +2 -3
 		return;
 
-	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags))
-		!= udev->slot_id || GET_COMP_CODE(le32_to_cpu(
-		event->event_cmd.status)) != COMP_SUCCESS);
+	BUG_ON(TRB_TO_SLOT_ID(le32_to_cpu(event->event_cmd.flags)) != udev->slot_id ||
+	       GET_COMP_CODE(le32_to_cpu(event->event_cmd.status)) != COMP_SUCCESS);
 	xhci_acknowledge_event(ctrl);
 }
 

- Hector

#2 lore raw
Quoted 13 lines · Hector Martin
Quoted 11 lines · Marek Vasut

Replace one type of terrible code formatting with a different type of terrible code formatting. No functional change.

---
Cc: Bin Meng <[email protected]>
Cc: Hector Martin <[email protected]>

---
  drivers/usb/host/xhci-ring.c | 18 +++++++-----------
  1 file changed, 7 insertions(+), 11 deletions(-)
Quoted 3 lines

Lol.

Thanks