]> www.infradead.org Git - users/hch/misc.git/commitdiff
usb: gadget: udc: renesas_usb3: Fix compiler warning
authorGuo Ren <guoren@linux.alibaba.com>
Wed, 22 Jan 2025 08:12:31 +0000 (03:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Feb 2025 15:41:11 +0000 (16:41 +0100)
drivers/usb/gadget/udc/renesas_usb3.c: In function 'renesas_usb3_probe':
drivers/usb/gadget/udc/renesas_usb3.c:2638:73: warning: '%d'
directive output may be truncated writing between 1 and 11 bytes into a
region of size 6 [-Wformat-truncation=]
2638 |   snprintf(usb3_ep->ep_name, sizeof(usb3_ep->ep_name), "ep%d", i);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~     ^~   ^

Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501201409.BIQPtkeB-lkp@intel.com/
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250122081231.47594-1-guoren@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/renesas_usb3.c

index fce5c41d9f298ba58899e90a2d4f9f7d078f1d41..89b304cf6d032f5162abfd1b8c60a930f3a12694 100644 (file)
@@ -310,7 +310,7 @@ struct renesas_usb3_request {
        struct list_head        queue;
 };
 
-#define USB3_EP_NAME_SIZE      8
+#define USB3_EP_NAME_SIZE      16
 struct renesas_usb3_ep {
        struct usb_ep ep;
        struct renesas_usb3 *usb3;