From dcdeeeff458d93a651bdae2ac9a3a703192da22a Mon Sep 17 00:00:00 2001 From: "igor.masar" Date: Tue, 20 May 2025 16:27:27 +0200 Subject: [PATCH] fix(usb/hcd): Use PRIu32 in FIFO config log for portability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ESP_LOGD message that prints FIFO line sizes used %u for uint32_t, which may cause incorrect output on some architectures (e.g., ESP32-P4 where uint32_t maps to unsigned long). To ensure portable and correct logging across all supported platforms, this patch replaces %u with %" PRIu32 ", defined in . No functional behavior is affected — this is a formatting correction for debug output only. --- components/usb/hcd_dwc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/usb/hcd_dwc.c b/components/usb/hcd_dwc.c index ecc4711d60..dd77d27cd2 100644 --- a/components/usb/hcd_dwc.c +++ b/components/usb/hcd_dwc.c @@ -1421,7 +1421,7 @@ esp_err_t hcd_port_init(int port_number, const hcd_port_config_t *port_config, h esp_intr_enable(port_obj->isr_hdl); *port_hdl = (hcd_port_handle_t)port_obj; HCD_EXIT_CRITICAL(); - ESP_LOGD(HCD_DWC_TAG, "FIFO config lines: RX=%u, PTX=%u, NPTX=%u", + ESP_LOGD(HCD_DWC_TAG, "FIFO config lines: RX=%" PRIu32 ", PTX=%" PRIu32 ", NPTX=%" PRIu32, port_obj->fifo_config.rx_fifo_lines, port_obj->fifo_config.ptx_fifo_lines, port_obj->fifo_config.nptx_fifo_lines);