From a77fdefd7c16cb6077d4f27ec5094e52457fcde5 Mon Sep 17 00:00:00 2001
From: James Munns <james@onevariable.com>
Date: Mon, 27 Mar 2023 15:37:12 +0200
Subject: [PATCH] Correct copy/paste errors

---
 embassy-usb/src/builder.rs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs
index 6649cd5b6..cad1ecda9 100644
--- a/embassy-usb/src/builder.rs
+++ b/embassy-usb/src/builder.rs
@@ -201,19 +201,21 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
         self.config_descriptor.end_configuration();
         self.bos_descriptor.end_bos();
 
+        // Log the number of allocator bytes actually used in descriptor buffers
         info!("USB: device_descriptor used: {}", self.device_descriptor.position());
         info!("USB: config_descriptor used: {}", self.config_descriptor.position());
-        info!("USB: bos_descriptor_buf used: {}", self.bos_descriptor.writer.position());
+        info!("USB: bos_descriptor used: {}", self.bos_descriptor.writer.position());
         #[cfg(feature = "msos-descriptor")]
-        info!("USB: device_descriptor used: {}", msos_descriptor.len());
+        info!("USB: msos_descriptor used: {}", msos_descriptor.len());
         if self.control_buf.len() != self.config.max_packet_size_0.into() {
             warn!(
-                "Mismatch in control buf and max packet size! buf len: {}, max ep0 size: {}",
+                "USB: Mismatch in control buf and max packet size! buf len: {}, max ep0 size: {}",
                 self.control_buf.len(),
                 self.config.max_packet_size_0,
             );
+        } else {
+            info!("USB: control_buf size: {}", self.control_buf.len());
         }
-        info!("USB: device_descriptor used: {}", self.config_descriptor.position());
 
         UsbDevice::build(
             self.driver,