Skip to content

Commit 81702d4

Browse files
xndcngregkh
authored andcommitted
usbip: Correct format specifier for seqnum from %d to %u
The seqnum field in USBIP protocol is an unsigned value. So we fix the format specifier from %d to %u to correctly display the value. Signed-off-by: Xiong Nandi <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 15b93f3 commit 81702d4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

drivers/usb/usbip/stub_rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
269269
return 0;
270270
}
271271

272-
usbip_dbg_stub_rx("seqnum %d is not pending\n",
272+
usbip_dbg_stub_rx("seqnum %u is not pending\n",
273273
pdu->u.cmd_unlink.seqnum);
274274

275275
/*

drivers/usb/usbip/stub_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static int stub_send_ret_submit(struct stub_device *sdev)
201201

202202
/* 1. setup usbip_header */
203203
setup_ret_submit_pdu(&pdu_header, urb);
204-
usbip_dbg_stub_tx("setup txdata seqnum: %d\n",
204+
usbip_dbg_stub_tx("setup txdata seqnum: %u\n",
205205
pdu_header.base.seqnum);
206206

207207
if (priv->sgl) {

drivers/usb/usbip/vhci_rx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
6666
spin_unlock_irqrestore(&vdev->priv_lock, flags);
6767

6868
if (!urb) {
69-
pr_err("cannot find a urb of seqnum %u max seqnum %d\n",
69+
pr_err("cannot find a urb of seqnum %u max seqnum %u\n",
7070
pdu->base.seqnum,
7171
atomic_read(&vhci_hcd->seqnum));
7272
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
@@ -162,10 +162,10 @@ static void vhci_recv_ret_unlink(struct vhci_device *vdev,
162162
* already received the result of its submit result and gave
163163
* back the URB.
164164
*/
165-
pr_info("the urb (seqnum %d) was already given back\n",
165+
pr_info("the urb (seqnum %u) was already given back\n",
166166
pdu->base.seqnum);
167167
} else {
168-
usbip_dbg_vhci_rx("now giveback urb %d\n", pdu->base.seqnum);
168+
usbip_dbg_vhci_rx("now giveback urb %u\n", pdu->base.seqnum);
169169

170170
/* If unlink is successful, status is -ECONNRESET */
171171
urb->status = pdu->u.ret_unlink.status;

drivers/usb/usbip/vudc_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int v_send_ret_submit(struct vudc *udc, struct urbp *urb_p)
107107

108108
/* 1. setup usbip_header */
109109
setup_ret_submit_pdu(&pdu_header, urb_p);
110-
usbip_dbg_stub_tx("setup txdata seqnum: %d\n",
110+
usbip_dbg_stub_tx("setup txdata seqnum: %u\n",
111111
pdu_header.base.seqnum);
112112
usbip_header_correct_endian(&pdu_header, 1);
113113

0 commit comments

Comments
 (0)