From 61e4e9f6b4f9ca791d9493e58dfd9a6e35f40a36 Mon Sep 17 00:00:00 2001 From: skllii Date: Thu, 18 Jun 2026 09:06:25 +0800 Subject: [PATCH 1/2] [components/drivers/usb/cherryusb/common] modify macro-define: __USED for IAR --- components/drivers/usb/cherryusb/common/usb_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/usb/cherryusb/common/usb_util.h b/components/drivers/usb/cherryusb/common/usb_util.h index 521bf27f567..a0007e6e217 100644 --- a/components/drivers/usb/cherryusb/common/usb_util.h +++ b/components/drivers/usb/cherryusb/common/usb_util.h @@ -52,7 +52,7 @@ #endif #ifndef __USED -#if defined(__ICCARM_V8) || defined(__ICCRISCV__) +#if defined(__ICCRISCV__) #define __USED __attribute__((used)) #else #define __USED __root From 088cc2c6b609309a6a997e7b491afab80b176531 Mon Sep 17 00:00:00 2001 From: skllii Date: Thu, 18 Jun 2026 01:35:17 +0000 Subject: [PATCH 2/2] style: format code with clang-format [skip ci] --- components/drivers/usb/cherryusb/common/usb_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/drivers/usb/cherryusb/common/usb_util.h b/components/drivers/usb/cherryusb/common/usb_util.h index a0007e6e217..d3b8c3c43e8 100644 --- a/components/drivers/usb/cherryusb/common/usb_util.h +++ b/components/drivers/usb/cherryusb/common/usb_util.h @@ -46,9 +46,9 @@ #endif #elif defined(__ICCARM__) || defined(__ICCRX__) || defined(__ICCRISCV__) #if (__VER__ >= 8000000) - #define __ICCARM_V8 1 +#define __ICCARM_V8 1 #else - #define __ICCARM_V8 0 +#define __ICCARM_V8 0 #endif #ifndef __USED @@ -228,8 +228,8 @@ #define USB_MEM_ALIGNX __attribute__((aligned(CONFIG_USB_ALIGN_SIZE))) -#define USB_ALIGN_UP(size, align) (((size) + (align)-1) & ~((align)-1)) -#define USB_ALIGN_DOWN(size, align) ((size) & ~((align)-1)) +#define USB_ALIGN_UP(size, align) (((size) + (align) - 1) & ~((align) - 1)) +#define USB_ALIGN_DOWN(size, align) ((size) & ~((align) - 1)) #ifndef usb_phyaddr2ramaddr #define usb_phyaddr2ramaddr(addr) (addr)