|
From: openocd-gerrit <ope...@us...> - 2026-07-25 10:46:00
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 2285b2bca63f39a3db0a01fb2bbec66df2006aaa (commit)
via 5466b23015c9e334a7f68454782a11735c8e765c (commit)
from 13d93bf6d1ef5542cc5e742f8010529c814b4aaa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2285b2bca63f39a3db0a01fb2bbec66df2006aaa
Author: Antonio Borneo <bor...@gm...>
Date: Sun Jul 12 23:49:22 2026 +0200
checkpatch: add list of OpenOCD attributes
The script checkpatch gets confused by function attributes that it
does not understand, e.g.:
tools/scripts/checkpatch.pl --types SPACING \
-f src/jtag/drivers/OpenULINK/src/main.c
produces
ERROR:SPACING: No space is necessary after a cast
#14: FILE: src/jtag/drivers/OpenULINK/src/main.c:14:
+extern void sudav_isr(void) __interrupt(SUDAV_ISR);
because it interprets '(void)' as a cast for the rest of the line.
Add the attribute '__interrupt' in the list of known attributes.
Change-Id: I70f1ebe21e14922d13323a22b970034d406b6fbf
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9783
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index f77f364d1..010b7f43d 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -512,9 +512,14 @@ our $InitAttributeConst = qr{$InitAttributePrefix(?:initconst\b)};
our $InitAttributeInit = qr{$InitAttributePrefix(?:init\b)};
our $InitAttribute = qr{$InitAttributeData|$InitAttributeConst|$InitAttributeInit};
+# OpenOCD specific: Begin: list of attributes
+our $OpenOCD_Attribute = qr{__interrupt};
+# OpenOCD specific: End
+
# Notes to $Attribute:
# We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
our $Attribute = qr{
+ $OpenOCD_Attribute|
const|
volatile|
__percpu|
commit 5466b23015c9e334a7f68454782a11735c8e765c
Author: Charles Mirabile <cmi...@re...>
Date: Thu Mar 12 21:05:22 2026 -0400
OpenULINK firmware: fix build with sdcc versions >= 4.2.3
Since sdcc 4.2.3 the numeric parameter to `__interrupt` must be between
parentheses.
Check patch does not recognize the interrupt keyword as a function
attribute, it thinks that they are casts and gets confused, hence:
Checkpatch-ignore: SPACING
Change-Id: I57a84f8cc2ef0bcc6def7e673bb52236d4725dda
Signed-off-by: Charles Mirabile <cmi...@re...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9514
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Adrien Charruel <adr...@gm...>
Tested-by: jenkins
Reviewed-by: zapb <de...@za...>
diff --git a/src/jtag/drivers/OpenULINK/src/main.c b/src/jtag/drivers/OpenULINK/src/main.c
index 51d3a3b94..032f41c0c 100644
--- a/src/jtag/drivers/OpenULINK/src/main.c
+++ b/src/jtag/drivers/OpenULINK/src/main.c
@@ -11,7 +11,7 @@
#include "usb.h"
#include "protocol.h"
-extern void sudav_isr(void) __interrupt SUDAV_ISR;
+extern void sudav_isr(void) __interrupt(SUDAV_ISR);
extern void sof_isr(void) __interrupt;
extern void sutok_isr(void) __interrupt;
extern void suspend_isr(void) __interrupt;
diff --git a/src/jtag/drivers/OpenULINK/src/usb.c b/src/jtag/drivers/OpenULINK/src/usb.c
index 408e21217..39d166ef2 100644
--- a/src/jtag/drivers/OpenULINK/src/usb.c
+++ b/src/jtag/drivers/OpenULINK/src/usb.c
@@ -118,7 +118,7 @@ __code struct usb_string_descriptor *__code en_string_descriptors[4] = {
&strConfigDescr
};
-void sudav_isr(void) __interrupt SUDAV_ISR
+void sudav_isr(void) __interrupt(SUDAV_ISR)
{
CLEAR_IRQ();
@@ -128,39 +128,39 @@ void sudav_isr(void) __interrupt SUDAV_ISR
EP0CS |= HSNAK;
}
-void sof_isr(void) __interrupt SOF_ISR
+void sof_isr(void) __interrupt(SOF_ISR)
{
}
-void sutok_isr(void) __interrupt SUTOK_ISR
+void sutok_isr(void) __interrupt(SUTOK_ISR)
{
}
-void suspend_isr(void) __interrupt SUSPEND_ISR
+void suspend_isr(void) __interrupt(SUSPEND_ISR)
{
}
-void usbreset_isr(void) __interrupt USBRESET_ISR
+void usbreset_isr(void) __interrupt(USBRESET_ISR)
{
}
-void ibn_isr(void) __interrupt IBN_ISR
+void ibn_isr(void) __interrupt(IBN_ISR)
{
}
-void ep0in_isr(void) __interrupt EP0IN_ISR
+void ep0in_isr(void) __interrupt(EP0IN_ISR)
{
}
-void ep0out_isr(void) __interrupt EP0OUT_ISR
+void ep0out_isr(void) __interrupt(EP0OUT_ISR)
{
}
-void ep1in_isr(void) __interrupt EP1IN_ISR
+void ep1in_isr(void) __interrupt(EP1IN_ISR)
{
}
-void ep1out_isr(void) __interrupt EP1OUT_ISR
+void ep1out_isr(void) __interrupt(EP1OUT_ISR)
{
}
/**
* EP2 IN: called after the transfer from uC->Host has finished: we sent data
*/
-void ep2in_isr(void) __interrupt EP2IN_ISR
+void ep2in_isr(void) __interrupt(EP2IN_ISR)
{
EP2_in = 1;
@@ -171,7 +171,7 @@ void ep2in_isr(void) __interrupt EP2IN_ISR
/**
* EP2 OUT: called after the transfer from Host->uC has finished: we got data
*/
-void ep2out_isr(void) __interrupt EP2OUT_ISR
+void ep2out_isr(void) __interrupt(EP2OUT_ISR)
{
EP2_out = 1;
@@ -179,34 +179,34 @@ void ep2out_isr(void) __interrupt EP2OUT_ISR
OUT07IRQ = OUT2IR; /* Clear OUT2 IRQ */
}
-void ep3in_isr(void) __interrupt EP3IN_ISR
+void ep3in_isr(void) __interrupt(EP3IN_ISR)
{
}
-void ep3out_isr(void) __interrupt EP3OUT_ISR
+void ep3out_isr(void) __interrupt(EP3OUT_ISR)
{
}
-void ep4in_isr(void) __interrupt EP4IN_ISR
+void ep4in_isr(void) __interrupt(EP4IN_ISR)
{
}
-void ep4out_isr(void) __interrupt EP4OUT_ISR
+void ep4out_isr(void) __interrupt(EP4OUT_ISR)
{
}
-void ep5in_isr(void) __interrupt EP5IN_ISR
+void ep5in_isr(void) __interrupt(EP5IN_ISR)
{
}
-void ep5out_isr(void) __interrupt EP5OUT_ISR
+void ep5out_isr(void) __interrupt(EP5OUT_ISR)
{
}
-void ep6in_isr(void) __interrupt EP6IN_ISR
+void ep6in_isr(void) __interrupt(EP6IN_ISR)
{
}
-void ep6out_isr(void) __interrupt EP6OUT_ISR
+void ep6out_isr(void) __interrupt(EP6OUT_ISR)
{
}
-void ep7in_isr(void) __interrupt EP7IN_ISR
+void ep7in_isr(void) __interrupt(EP7IN_ISR)
{
}
-void ep7out_isr(void) __interrupt EP7OUT_ISR
+void ep7out_isr(void) __interrupt(EP7OUT_ISR)
{
}
-----------------------------------------------------------------------
Summary of changes:
src/jtag/drivers/OpenULINK/src/main.c | 2 +-
src/jtag/drivers/OpenULINK/src/usb.c | 44 +++++++++++++++++------------------
tools/scripts/checkpatch.pl | 5 ++++
3 files changed, 28 insertions(+), 23 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|