[RFC PATCH 13/20] xhci: use %pad for printing dma_addr_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clean up verbose (unsigned long long) casts.

Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
---
 drivers/usb/host/xhci-dbg.c   |   70 ++++++++++++++++-------------------------
 drivers/usb/host/xhci-mem.c   |   46 ++++++++++++---------------
 drivers/usb/host/xhci-ring.c  |   41 +++++++++++-------------
 drivers/usb/host/xhci-trace.h |    8 ++---
 drivers/usb/host/xhci.c       |   19 +++++------
 5 files changed, 79 insertions(+), 105 deletions(-)

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index f1230629978c..8789d930f517 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -425,10 +425,8 @@ static void dbg_rsvd64(struct xhci_hcd *xhci, u64 *ctx, dma_addr_t dma)
 {
 	int i;
 	for (i = 0; i < 4; ++i) {
-		xhci_dbg(xhci, "@%p (virt) @%08llx "
-			 "(dma) %#08llx - rsvd64[%d]\n",
-			 &ctx[4 + i], (unsigned long long)dma,
-			 ctx[4 + i], i);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08llx - rsvd64[%d]\n",
+				&ctx[4 + i], &dma, ctx[4 + i], i);
 		dma += 8;
 	}
 }
@@ -464,25 +462,21 @@ static void xhci_dbg_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *
 	int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
 
 	xhci_dbg(xhci, "Slot Context:\n");
-	xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info\n",
-			&slot_ctx->dev_info,
-			(unsigned long long)dma, slot_ctx->dev_info);
+	xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - dev_info\n",
+			&slot_ctx->dev_info, &dma, slot_ctx->dev_info);
 	dma += field_size;
-	xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_info2\n",
-			&slot_ctx->dev_info2,
-			(unsigned long long)dma, slot_ctx->dev_info2);
+	xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - dev_info2\n",
+			&slot_ctx->dev_info2, &dma, slot_ctx->dev_info2);
 	dma += field_size;
-	xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tt_info\n",
-			&slot_ctx->tt_info,
-			(unsigned long long)dma, slot_ctx->tt_info);
+	xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - tt_info\n",
+			&slot_ctx->tt_info, &dma, slot_ctx->tt_info);
 	dma += field_size;
-	xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - dev_state\n",
-			&slot_ctx->dev_state,
-			(unsigned long long)dma, slot_ctx->dev_state);
+	xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - dev_state\n",
+			&slot_ctx->dev_state, &dma, slot_ctx->dev_state);
 	dma += field_size;
 	for (i = 0; i < 4; ++i) {
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n",
-				&slot_ctx->reserved[i], (unsigned long long)dma,
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - rsvd[%d]\n",
+				&slot_ctx->reserved[i], &dma,
 				slot_ctx->reserved[i], i);
 		dma += field_size;
 	}
@@ -512,26 +506,21 @@ static void xhci_dbg_ep_ctx(struct xhci_hcd *xhci,
 		xhci_dbg(xhci, "%s Endpoint %02d Context (ep_index %02d):\n",
 				usb_endpoint_out(epaddr) ? "OUT" : "IN",
 				epaddr & USB_ENDPOINT_NUMBER_MASK, i);
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n",
-				&ep_ctx->ep_info,
-				(unsigned long long)dma, ep_ctx->ep_info);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - ep_info\n",
+				&ep_ctx->ep_info, &dma, ep_ctx->ep_info);
 		dma += field_size;
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info2\n",
-				&ep_ctx->ep_info2,
-				(unsigned long long)dma, ep_ctx->ep_info2);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - ep_info2\n",
+				&ep_ctx->ep_info2, &dma, ep_ctx->ep_info2);
 		dma += field_size;
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08llx - deq\n",
-				&ep_ctx->deq,
-				(unsigned long long)dma, ep_ctx->deq);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08llx - deq\n",
+				&ep_ctx->deq, &dma, ep_ctx->deq);
 		dma += 2*field_size;
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - tx_info\n",
-				&ep_ctx->tx_info,
-				(unsigned long long)dma, ep_ctx->tx_info);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - tx_info\n",
+				&ep_ctx->tx_info, &dma, ep_ctx->tx_info);
 		dma += field_size;
 		for (j = 0; j < 3; ++j) {
-			xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd[%d]\n",
-					&ep_ctx->reserved[j],
-					(unsigned long long)dma,
+			xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - rsvd[%d]\n",
+					&ep_ctx->reserved[j], &dma,
 					ep_ctx->reserved[j], j);
 			dma += field_size;
 		}
@@ -559,18 +548,15 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci,
 			return;
 		}
 
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - drop flags\n",
-			 &ctrl_ctx->drop_flags, (unsigned long long)dma,
-			 ctrl_ctx->drop_flags);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - drop flags\n",
+			 &ctrl_ctx->drop_flags, &dma, ctrl_ctx->drop_flags);
 		dma += field_size;
-		xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - add flags\n",
-			 &ctrl_ctx->add_flags, (unsigned long long)dma,
-			 ctrl_ctx->add_flags);
+		xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - add flags\n",
+			 &ctrl_ctx->add_flags, &dma, ctrl_ctx->add_flags);
 		dma += field_size;
 		for (i = 0; i < 6; ++i) {
-			xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - rsvd2[%d]\n",
-				 &ctrl_ctx->rsvd2[i], (unsigned long long)dma,
-				 ctrl_ctx->rsvd2[i], i);
+			xhci_dbg(xhci, "@%p (virt) @%pad (dma) %#08x - rsvd2[%d]\n",
+				 &ctrl_ctx->rsvd2[i], &dma, ctrl_ctx->rsvd2[i], i);
 			dma += field_size;
 		}
 
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 452aa75a096c..b1ba9ec79c88 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -681,8 +681,8 @@ struct xhci_stream_info *xhci_alloc_stream_info(struct xhci_hcd *xhci,
 			cur_ring->cycle_state;
 		stream_info->stream_ctx_array[cur_stream].stream_ring =
 			cpu_to_le64(addr);
-		xhci_dbg(xhci, "Setting stream %d ring ptr to 0x%08llx\n",
-				cur_stream, (unsigned long long) addr);
+		xhci_dbg(xhci, "Setting stream %d ring ptr to %pad\n",
+				cur_stream, &addr);
 
 		ret = xhci_update_stream_mapping(cur_ring, mem_flags);
 		if (ret) {
@@ -951,16 +951,16 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
 	if (!dev->out_ctx)
 		goto fail;
 
-	xhci_dbg(xhci, "Slot %d output ctx = 0x%llx (dma)\n", slot_id,
-			(unsigned long long)dev->out_ctx->dma);
+	xhci_dbg(xhci, "Slot %d output ctx = %pad (dma)\n", slot_id,
+			&dev->out_ctx->dma);
 
 	/* Allocate the (input) device context for address device command */
 	dev->in_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_INPUT, flags);
 	if (!dev->in_ctx)
 		goto fail;
 
-	xhci_dbg(xhci, "Slot %d input ctx = 0x%llx (dma)\n", slot_id,
-			(unsigned long long)dev->in_ctx->dma);
+	xhci_dbg(xhci, "Slot %d input ctx = %pad (dma)\n", slot_id,
+			&dev->in_ctx->dma);
 
 	/* Initialize the cancellation list and watchdog timers for each ep */
 	for (i = 0; i < 31; i++) {
@@ -1868,14 +1868,10 @@ static int xhci_test_trb_in_td(struct xhci_hcd *xhci,
 	if (seg != result_seg) {
 		xhci_warn(xhci, "WARN: %s TRB math test %d failed!\n",
 				test_name, test_number);
-		xhci_warn(xhci, "Tested TRB math w/ seg %p and "
-				"input DMA 0x%llx\n",
-				input_seg,
-				(unsigned long long) input_dma);
-		xhci_warn(xhci, "starting TRB %p (0x%llx DMA), "
-				"ending TRB %p (0x%llx DMA)\n",
-				start_trb, start_dma,
-				end_trb, end_dma);
+		xhci_warn(xhci, "Tested TRB math w/ seg %p and input DMA %pad\n",
+				input_seg, &input_dma);
+		xhci_warn(xhci, "starting TRB %p (%pad DMA), ending TRB %p (%pad DMA)\n",
+				start_trb, &start_dma, end_trb, &end_dma);
 		xhci_warn(xhci, "Expected seg %p, got seg %p\n",
 				result_seg, seg);
 		return -1;
@@ -2336,8 +2332,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
 	memset(xhci->dcbaa, 0, sizeof *(xhci->dcbaa));
 	xhci->dcbaa->dma = dma;
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-			"// Device context base array address = 0x%llx (DMA), %p (virt)",
-			(unsigned long long)xhci->dcbaa->dma, xhci->dcbaa);
+			"// Device context base array address = %pad (DMA), %p (virt)",
+			&xhci->dcbaa->dma, xhci->dcbaa);
 	xhci_write_64(xhci, dma, &xhci->op_regs->dcbaa_ptr);
 
 	/* See Table 46 and Note on Figure 55 */
@@ -2369,8 +2365,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
 			"Allocated command ring at %p", xhci->cmd_ring);
 	seg = xhci_ring_first_seg(xhci->cmd_ring);
-	xhci_dbg_trace(xhci, trace_xhci_dbg_init, "First segment DMA is 0x%llx",
-			(unsigned long long)seg->dma);
+	xhci_dbg_trace(xhci, trace_xhci_dbg_init, "First segment DMA is %pad",
+			&seg->dma);
 
 	/* Set the address in the Command Ring Control register */
 	val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
@@ -2421,17 +2417,15 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
 	if (!xhci->erst.entries)
 		goto fail;
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-			"// Allocated event ring segment table at 0x%llx",
-			(unsigned long long)dma);
+			"// Allocated event ring segment table at %pad", &dma);
 
 	memset(xhci->erst.entries, 0, sizeof(struct xhci_erst_entry)*ERST_NUM_SEGS);
 	xhci->erst.num_entries = ERST_NUM_SEGS;
 	xhci->erst.erst_dma_addr = dma;
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-			"Set ERST to 0; private num segs = %i, virt addr = %p, dma addr = 0x%llx",
-			xhci->erst.num_entries,
-			xhci->erst.entries,
-			(unsigned long long)xhci->erst.erst_dma_addr);
+			"Set ERST to 0; private num segs = %i, virt addr = %p, dma addr = %pad",
+			xhci->erst.num_entries, xhci->erst.entries,
+			&xhci->erst.erst_dma_addr);
 
 	/* set ring base address and size for each segment table entry */
 	val = 0;
@@ -2458,8 +2452,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
 			"// Set ERST entries to point to event ring.");
 	/* set the segment table base address */
 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
-			"// Set ERST base address for ir_set 0 = 0x%llx",
-			(unsigned long long)xhci->erst.erst_dma_addr);
+			"// Set ERST base address for ir_set 0 = %pad",
+			&xhci->erst.erst_dma_addr);
 	val_64 = xhci_read_64(xhci, &xhci->ir_set->erst_base);
 	val_64 &= ERST_PTR_MASK;
 	val_64 |= (xhci->erst.erst_dma_addr & (u64) ~ERST_PTR_MASK);
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index d364f504c1fd..ed167f17b2d2 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -674,8 +674,7 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
 			state->new_deq.seg);
 	addr = xhci_trb_virt_to_dma(&state->new_deq);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
-			"New dequeue pointer = 0x%llx (DMA)",
-			(unsigned long long) addr);
+			"New dequeue pointer = %pad (DMA)", &addr);
 }
 
 /* flip_cycle means flip the cycle bit of all but the first and last TRB.
@@ -689,6 +688,7 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
 		cur_td->first_trb };
 
 	for (; true; next_trb(ep_ring, &cur_rp)) {
+		dma_addr_t dma = xhci_trb_virt_to_dma(&cur_rp);
 		union xhci_trb *cur_trb = cur_rp.ptr;
 
 		if (TRB_TYPE_LINK_LE32(cur_trb->generic.field[3])) {
@@ -705,12 +705,9 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
 			xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
 					"Cancel (unchain) link TRB");
 			xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
-					"Address = %p (0x%llx dma); "
-					"in seg %p (0x%llx dma)",
-					cur_trb,
-					(unsigned long long)xhci_trb_virt_to_dma(&cur_rp),
-					cur_rp.seg,
-					(unsigned long long)cur_rp.seg->dma);
+					"Address = %p (%pad dma); in seg %p (%pad dma)",
+					cur_trb, &dma, cur_rp.seg,
+					&cur_rp.seg->dma);
 		} else {
 			cur_trb->generic.field[0] = 0;
 			cur_trb->generic.field[1] = 0;
@@ -725,9 +722,7 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
 			cur_trb->generic.field[3] |= cpu_to_le32(
 				TRB_TYPE(TRB_TR_NOOP));
 			xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
-					"TRB to noop at offset 0x%llx",
-					(unsigned long long)
-					xhci_trb_virt_to_dma(&cur_rp));
+					"TRB to noop at offset %pad", &dma);
 		}
 		if (cur_trb == cur_td->last_trb)
 			break;
@@ -746,14 +741,15 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
 		struct xhci_dequeue_state *deq_state)
 {
 	struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
+	dma_addr_t dma = xhci_trb_virt_to_dma(&deq_state->new_deq);
 
 	xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
-			"Set TR Deq Ptr cmd, new deq seg = %p (0x%llx dma), "
-			"new deq ptr = %p (0x%llx dma), new cycle = %u",
+			"Set TR Deq Ptr cmd, new deq seg = %p (%pad dma)",
 			deq_state->new_deq.seg,
-			(unsigned long long)deq_state->new_deq.seg->dma,
-			deq_state->new_deq.ptr,
-			(unsigned long long)xhci_trb_virt_to_dma(&deq_state->new_deq),
+			&deq_state->new_deq.seg->dma);
+	xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
+			"new deq ptr = %p (%pad dma), new cycle = %u",
+			deq_state->new_deq.ptr, &dma,
 			deq_state->new_cycle_state);
 	queue_set_tr_deq(xhci, cmd, slot_id, ep_index, stream_id,
 			&deq_state->new_deq, deq_state->new_cycle_state);
@@ -856,13 +852,15 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
 	 */
 	list_for_each(entry, &ep->cancelled_td_list) {
 		struct xhci_ring_pointer td_rp;
+		dma_addr_t dma;
 
 		cur_td = list_entry(entry, struct xhci_td, cancelled_td_list);
 		td_rp.seg = cur_td->start_seg;
 		td_rp.ptr = cur_td->first_trb;
+		dma = xhci_trb_virt_to_dma(&td_rp);
 		xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
 				"Removing canceled TD starting at 0x%llx (dma).",
-				(unsigned long long)xhci_trb_virt_to_dma(&td_rp));
+				&dma);
 		ep_ring = xhci_urb_to_transfer_ring(xhci, cur_td->urb);
 		if (!ep_ring) {
 			/* This shouldn't happen unless a driver is mucking
@@ -2413,14 +2411,13 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 	u32 trb_comp_code;
 	int ret = 0;
 	int td_num = 0;
+	dma_addr_t dma = xhci_trb_virt_to_dma(&xhci->event_ring->deq);
 
 	slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
 	xdev = xhci->devs[slot_id];
 	if (!xdev) {
 		xhci_err(xhci, "ERROR Transfer event pointed to bad slot\n");
-		xhci_err(xhci, "@%016llx %08x %08x %08x %08x\n",
-			 (unsigned long long) xhci_trb_virt_to_dma(
-				 &xhci->event_ring->deq),
+		xhci_err(xhci, "@%pad %08x %08x %08x %08x\n", &dma,
 			 lower_32_bits(le64_to_cpu(event->buffer)),
 			 upper_32_bits(le64_to_cpu(event->buffer)),
 			 le32_to_cpu(event->transfer_len),
@@ -2440,9 +2437,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 	    EP_STATE_DISABLED) {
 		xhci_err(xhci, "ERROR Transfer event for disabled endpoint "
 				"or incorrect stream ring\n");
-		xhci_err(xhci, "@%016llx %08x %08x %08x %08x\n",
-			 (unsigned long long) xhci_trb_virt_to_dma(
-				 &xhci->event_ring->deq),
+		xhci_err(xhci, "@%pad %08x %08x %08x %08x\n", &dma,
 			 lower_32_bits(le64_to_cpu(event->buffer)),
 			 upper_32_bits(le64_to_cpu(event->buffer)),
 			 le32_to_cpu(event->transfer_len),
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index fe7ee98d2a2b..999a0611e0af 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -91,9 +91,9 @@ DECLARE_EVENT_CLASS(xhci_log_ctx,
 			((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) *
 			((ctx->type == XHCI_CTX_TYPE_INPUT) + ep_num + 1));
 	),
-	TP_printk("\nctx_64=%d, ctx_type=%u, ctx_dma=@%llx, ctx_va=@%p",
+	TP_printk("\nctx_64=%d, ctx_type=%u, ctx_dma=@%pad, ctx_va=@%p",
 			__entry->ctx_64, __entry->ctx_type,
-			(unsigned long long) __entry->ctx_dma, __entry->ctx_va
+			&__entry->ctx_dma, __entry->ctx_va
 	)
 );
 
@@ -122,8 +122,8 @@ DECLARE_EVENT_CLASS(xhci_log_event,
 		memcpy(__get_dynamic_array(trb), trb_va,
 			sizeof(struct xhci_generic_trb));
 	),
-	TP_printk("\ntrb_dma=@%llx, trb_va=@%p, status=%08x, flags=%08x",
-			(unsigned long long) __entry->dma, __entry->va,
+	TP_printk("\ntrb_dma=@%pad, trb_va=@%p, status=%08x, flags=%08x",
+			&__entry->dma, __entry->va,
 			__entry->status, __entry->flags
 	)
 );
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c6ad8a69e206..082426a20e70 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1534,13 +1534,12 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
 	if (i < urb_priv->length) {
 		struct xhci_ring_pointer td_rp = { urb_priv->td[i]->start_seg,
 			urb_priv->td[i]->first_trb };
+		dma_addr_t dma = xhci_trb_virt_to_dma(&td_rp);
 
 		xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
-				"Cancel URB %p, dev %s, ep 0x%x, "
-				"starting at offset 0x%llx",
+				"Cancel URB %p, dev %s, ep 0x%x, dma %pad",
 				urb, urb->dev->devpath,
-				urb->ep->desc.bEndpointAddress,
-				(unsigned long long) xhci_trb_virt_to_dma(&td_rp));
+				urb->ep->desc.bEndpointAddress, &dma);
 	}
 
 	for (; i < urb_priv->length; i++) {
@@ -3767,6 +3766,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 	struct xhci_input_control_ctx *ctrl_ctx;
 	u64 temp_64;
 	struct xhci_command *command;
+	dma_addr_t dma;
 
 	if (!udev->slot_id) {
 		xhci_dbg_trace(xhci, trace_xhci_dbg_address,
@@ -3882,15 +3882,14 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 	temp_64 = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_address,
 			"Op regs DCBAA ptr = %#016llx", temp_64);
+	dma = le64_to_cpu(xhci->dcbaa->dev_context_ptrs[udev->slot_id]);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_address,
-		"Slot ID %d dcbaa entry @%p = %#016llx",
+		"Slot ID %d dcbaa entry @%p = %pad",
 		udev->slot_id,
-		&xhci->dcbaa->dev_context_ptrs[udev->slot_id],
-		(unsigned long long)
-		le64_to_cpu(xhci->dcbaa->dev_context_ptrs[udev->slot_id]));
+		&xhci->dcbaa->dev_context_ptrs[udev->slot_id], &dma);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_address,
-			"Output Context DMA address = %#08llx",
-			(unsigned long long)virt_dev->out_ctx->dma);
+			"Output Context DMA address = %pad",
+			&virt_dev->out_ctx->dma);
 	xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
 	xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
 	trace_xhci_address_ctx(xhci, virt_dev->in_ctx,

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux