Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <xndchn@gmail.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20241231161539.20192-3-xndchn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Xiong Nandi and committed by
Greg Kroah-Hartman
81702d41 15b93f34

+6 -6
+1 -1
drivers/usb/usbip/stub_rx.c
··· 269 269 return 0; 270 270 } 271 271 272 - usbip_dbg_stub_rx("seqnum %d is not pending\n", 272 + usbip_dbg_stub_rx("seqnum %u is not pending\n", 273 273 pdu->u.cmd_unlink.seqnum); 274 274 275 275 /*
+1 -1
drivers/usb/usbip/stub_tx.c
··· 201 201 202 202 /* 1. setup usbip_header */ 203 203 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", 205 205 pdu_header.base.seqnum); 206 206 207 207 if (priv->sgl) {
+3 -3
drivers/usb/usbip/vhci_rx.c
··· 66 66 spin_unlock_irqrestore(&vdev->priv_lock, flags); 67 67 68 68 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", 70 70 pdu->base.seqnum, 71 71 atomic_read(&vhci_hcd->seqnum)); 72 72 usbip_event_add(ud, VDEV_EVENT_ERROR_TCP); ··· 162 162 * already received the result of its submit result and gave 163 163 * back the URB. 164 164 */ 165 - pr_info("the urb (seqnum %d) was already given back\n", 165 + pr_info("the urb (seqnum %u) was already given back\n", 166 166 pdu->base.seqnum); 167 167 } 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); 169 169 170 170 /* If unlink is successful, status is -ECONNRESET */ 171 171 urb->status = pdu->u.ret_unlink.status;
+1 -1
drivers/usb/usbip/vudc_tx.c
··· 107 107 108 108 /* 1. setup usbip_header */ 109 109 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", 111 111 pdu_header.base.seqnum); 112 112 usbip_header_correct_endian(&pdu_header, 1); 113 113