You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(61) |
Dec
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:26:02
|
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 53d17e790128803a0fed453c4945c07b3377c4d3 (commit)
from 44ed26a1db3b9e0ca9dc1000e967533b1c371ee3 (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 53d17e790128803a0fed453c4945c07b3377c4d3
Author: Ian Thompson <ia...@ca...>
Date: Mon Sep 19 12:39:50 2022 -0700
target/xtensa: fix final clang analyzer warning
Reworked xtensa_read_memory() logic to always allocate
and initialize working buffer with sufficient padding.
Signed-off-by: Ian Thompson <ia...@ca...>
Change-Id: Ia9ab53336537adebf99f8156f481ca8279a7cd5d
Reviewed-on: https://review.openocd.org/c/openocd/+/7211
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Erhan Kurubas <erh...@es...>
diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c
index 1691deeeb..4dfff6ab4 100644
--- a/src/target/xtensa/xtensa.c
+++ b/src/target/xtensa/xtensa.c
@@ -1738,15 +1738,12 @@ int xtensa_read_memory(struct target *target, target_addr_t address, uint32_t si
}
}
- if (addrstart_al == address && addrend_al == address + (size * count)) {
- albuff = buffer;
- } else {
- albuff = malloc(addrend_al - addrstart_al);
- if (!albuff) {
- LOG_TARGET_ERROR(target, "Out of memory allocating %" TARGET_PRIdADDR " bytes!",
- addrend_al - addrstart_al);
- return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
- }
+ unsigned int alloc_bytes = ALIGN_UP(addrend_al - addrstart_al, sizeof(uint32_t));
+ albuff = calloc(alloc_bytes, 1);
+ if (!albuff) {
+ LOG_TARGET_ERROR(target, "Out of memory allocating %" PRId64 " bytes!",
+ addrend_al - addrstart_al);
+ return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
/* We're going to use A3 here */
@@ -1795,11 +1792,8 @@ int xtensa_read_memory(struct target *target, target_addr_t address, uint32_t si
if (bswap)
buf_bswap32(albuff, albuff, addrend_al - addrstart_al);
- if (albuff != buffer) {
- memcpy(buffer, albuff + (address & 3), (size * count));
- free(albuff);
- }
-
+ memcpy(buffer, albuff + (address & 3), (size * count));
+ free(albuff);
return res;
}
@@ -1855,7 +1849,7 @@ int xtensa_write_memory(struct target *target,
albuff = malloc(addrend_al - addrstart_al);
}
if (!albuff) {
- LOG_TARGET_ERROR(target, "Out of memory allocating %" TARGET_PRIdADDR " bytes!",
+ LOG_TARGET_ERROR(target, "Out of memory allocating %" PRId64 " bytes!",
addrend_al - addrstart_al);
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}
-----------------------------------------------------------------------
Summary of changes:
src/target/xtensa/xtensa.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:25:34
|
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 44ed26a1db3b9e0ca9dc1000e967533b1c371ee3 (commit)
from fd2a44ab55e7c54ee9e594717aba72d04e85e716 (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 44ed26a1db3b9e0ca9dc1000e967533b1c371ee3
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 15:39:50 2022 +0200
target/riscv: fix use of uninitialized value
Scan-build reports:
Logic error: Uninitialized argument value
riscv.c:2688 2nd function call argument is an uninitialized value
This is a real error cause by running the command "riscv
authdata_write" without arguments. In such case 'value' is not
initialized and is passed to and used by r->authdata_write().
Reorganize the code to:
- detect the correct amount or command's arguments;
- drop the LOG_ERROR() on ERROR_COMMAND_SYNTAX_ERROR;
- drop the 'else' after 'return'.
Change-Id: I62e031220593b8308bc674b753e15d16d4c5c9ac
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7210
Tested-by: jenkins
Reviewed-by: Jan Matyas <ma...@co...>
Reviewed-by: Tim Newsome <ti...@si...>
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index dfd6a3e3d..ae0a7375d 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -2666,27 +2666,25 @@ COMMAND_HANDLER(riscv_authdata_write)
uint32_t value;
unsigned int index = 0;
- if (CMD_ARGC == 0) {
- /* nop */
- } else if (CMD_ARGC == 1) {
+ if (CMD_ARGC == 0 || CMD_ARGC > 2)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+
+ if (CMD_ARGC == 1) {
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], value);
- } else if (CMD_ARGC == 2) {
+ } else {
COMMAND_PARSE_NUMBER(uint, CMD_ARGV[0], index);
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], value);
- } else {
- LOG_ERROR("Command takes at most 2 arguments");
- return ERROR_COMMAND_SYNTAX_ERROR;
}
struct target *target = get_current_target(CMD_CTX);
RISCV_INFO(r);
- if (r->authdata_write) {
- return r->authdata_write(target, value, index);
- } else {
+ if (!r->authdata_write) {
LOG_ERROR("authdata_write is not implemented for this target.");
return ERROR_FAIL;
}
+
+ return r->authdata_write(target, value, index);
}
COMMAND_HANDLER(riscv_dmi_read)
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:25:16
|
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 fd2a44ab55e7c54ee9e594717aba72d04e85e716 (commit)
from aff48a6a31019af17959a7da33909d1cea6de61a (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 fd2a44ab55e7c54ee9e594717aba72d04e85e716
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 15:28:15 2022 +0200
target/riscv: fix undefined operation
Scan-build reports:
Logic error: Result of operation is garbage or undefined
riscv.c:1614 The result of the left shift is undefined due
to shifting by '4294967281', which is greater or
equal to the width of type 'target_addr_t'
This is a false warning due to clang that considers the impossible
case of 32 bits hart (xlen = 32) in SATP_MODE_SV48 mode
(info->va_bits = 48).
Under such case:
riscv.c:1614 ... ((target_addr_t)1 << (xlen - (info->va_bits - 1))) ...
the shift amount wraps around the unsigned type and assumes the
value 4294967281 (0xfffffff1).
Use assert() to prevent clang from complaining.
Change-Id: I08fdd2a806c350d061641e28cf15a51b397db099
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7209
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <ma...@co...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 5444fca01..dfd6a3e3d 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1607,6 +1607,7 @@ static int riscv_address_translate(struct target *target,
LOG_DEBUG("virtual=0x%" TARGET_PRIxADDR "; mode=%s", virtual, info->name);
/* verify bits xlen-1:va_bits-1 are all equal */
+ assert(xlen >= info->va_bits);
target_addr_t mask = ((target_addr_t)1 << (xlen - (info->va_bits - 1))) - 1;
target_addr_t masked_msbs = (virtual >> (info->va_bits - 1)) & mask;
if (masked_msbs != 0 && masked_msbs != mask) {
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv.c | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:25:02
|
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 aff48a6a31019af17959a7da33909d1cea6de61a (commit)
via ea9089944e509ba301f5a2ca14b30eb5d7a90f44 (commit)
from aa57890554cb4f8b4ccf35a69598238a12a79069 (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 aff48a6a31019af17959a7da33909d1cea6de61a
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 15:02:36 2022 +0200
target/riscv: fix dead assignment
Scan-build reports:
Unused code: Dead nested assignment
riscv.c:459 Although the value stored to 'ir_user4_raw' is
used in the enclosing expression, the value is
never actually read from 'ir_user4_raw'
This is caused by the value reassigned in 'ir_user4_raw':
riscv.c:459 ir_user4[3] = (uint8_t)(ir_user4_raw >>= 8);
but never used.
Drop the DIY conversion in favor of h_u32_to_le() that does not
reassign the input value.
Change-Id: Ifad29f4c46d4a2d0a2f5a5c4104d768cc3db2794
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7208
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <ma...@co...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index c25efcde9..5444fca01 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -453,10 +453,7 @@ static int riscv_init_target(struct command_context *cmd_ctx,
if (bscan_tunnel_ir_width != 0) {
assert(target->tap->ir_length >= 6);
uint32_t ir_user4_raw = 0x23 << (target->tap->ir_length - 6);
- ir_user4[0] = (uint8_t)ir_user4_raw;
- ir_user4[1] = (uint8_t)(ir_user4_raw >>= 8);
- ir_user4[2] = (uint8_t)(ir_user4_raw >>= 8);
- ir_user4[3] = (uint8_t)(ir_user4_raw >>= 8);
+ h_u32_to_le(ir_user4, ir_user4_raw);
select_user4.num_bits = target->tap->ir_length;
bscan_tunneled_ir_width[0] = bscan_tunnel_ir_width;
if (bscan_tunnel_type == BSCAN_TUNNEL_DATA_REGISTER)
commit ea9089944e509ba301f5a2ca14b30eb5d7a90f44
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 14:55:55 2022 +0200
target/riscv: fix unused initialization
Scan-build reports:
Unused code: Dead assignment
riscv.c:716 Value stored to 'result' is never read
Remove the initialization of variable 'result'.
Change-Id: Ied67bb4fcfa5bace186522074247ead43a5d5cd5
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7207
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <ma...@co...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index dde3d7e69..c25efcde9 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -713,7 +713,6 @@ static int add_trigger(struct target *target, struct trigger *trigger)
return result;
int type = get_field(tdata1, MCONTROL_TYPE(riscv_xlen(target)));
- result = ERROR_OK;
switch (type) {
case 1:
result = maybe_add_trigger_t1(target, trigger, tdata1);
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:23:11
|
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 aa57890554cb4f8b4ccf35a69598238a12a79069 (commit)
via 8db6dff333c2803d339086c7d5694eac4da11d0a (commit)
from 8683526af7a9ca23115d26deb5b4835cd6be05d8 (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 aa57890554cb4f8b4ccf35a69598238a12a79069
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 14:50:26 2022 +0200
target/riscv-013: fix unused initialization
Scan-build reports:
Unused code: Dead initialization
riscv-013.c:2362 Value stored to 'control' during its
initialization is never read
Remove the initialization of variable 'control'.
Change-Id: I548f8175530b9a2aa4c1788549d6467bf9824584
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7206
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <ma...@co...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 1f4c34346..99d3873de 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -2359,9 +2359,7 @@ static int assert_reset(struct target *target)
/* TODO: Try to use hasel in dmcontrol */
/* Set haltreq for each hart. */
- uint32_t control = control_base;
-
- control = set_hartsel(control_base, target->coreid);
+ uint32_t control = set_hartsel(control_base, target->coreid);
control = set_field(control, DM_DMCONTROL_HALTREQ,
target->reset_halt ? 1 : 0);
dmi_write(target, DM_DMCONTROL, control);
commit 8db6dff333c2803d339086c7d5694eac4da11d0a
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 14:37:24 2022 +0200
target/riscv-013: fix unchecked return code
Scan-build complains about variable 'sbcs_orig' that can be used
not initialized.
Logic error: Assigned value is garbage or undefined
riscv-013.c:4468 Assigned value is garbage or undefined
This is caused by not checking the return value of the call
riscv-013.c:4466 dmi_read(target, &sbcs_orig, DM_SBCS);
In fact when dmi_read() returns error, the variable 'sbcs_orig' is
not assigned.
Check the returned value.
Change-Id: Ia9032a0229aa243138f95f4e13f765726a4ceae9
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7205
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <ma...@co...>
Tested-by: jenkins
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 2c762e337..1f4c34346 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -4463,7 +4463,9 @@ static int riscv013_test_sba_config_reg(struct target *target,
uint32_t rd_val;
uint32_t sbcs_orig;
- dmi_read(target, &sbcs_orig, DM_SBCS);
+ int retval = dmi_read(target, &sbcs_orig, DM_SBCS);
+ if (retval != ERROR_OK)
+ return retval;
uint32_t sbcs = sbcs_orig;
bool test_passed;
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv-013.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:22:41
|
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 8683526af7a9ca23115d26deb5b4835cd6be05d8 (commit)
from cde944fd8b9cd5eb67617aa3b68dc13eb49b1d10 (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 8683526af7a9ca23115d26deb5b4835cd6be05d8
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 11:36:06 2022 +0200
target/dsp563xx: fix scan-build warning
Scan-build triggers a warning:
Unix API: Allocator sizeof operand mismatch
dsp563xx.c:2143 Result of 'calloc' is converted to a pointer
of type 'uint8_t', which is incompatible with sizeof
operand type 'uint32_t'
It's a false positive because calloc() is properly used in this
case, as the uint8_t array is used in blocks of 4 elements to read
or write uint32_t values.
Either
calloc(sizeof(uint32_t), count);
and
malloc(count * sizeof(uint32_t));
keep triggering the same warning.
Drop the warning by using the constant '4' as size of uint32_t, as
already used few lines below.
Change-Id: I5bb1ece177774eefdc5d9cd049338f8f2be87cd7
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7203
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <and...@gm...>
diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c
index 3702cfb4c..36ee85371 100644
--- a/src/target/dsp563xx.c
+++ b/src/target/dsp563xx.c
@@ -2140,7 +2140,7 @@ COMMAND_HANDLER(dsp563xx_mem_command)
COMMAND_PARSE_NUMBER(u32, CMD_ARGV[1], count);
}
- buffer = calloc(count, sizeof(uint32_t));
+ buffer = calloc(count, 4);
if (read_mem == 1) {
err = dsp563xx_read_memory(target, mem_type, address, sizeof(uint32_t),
-----------------------------------------------------------------------
Summary of changes:
src/target/dsp563xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:21:03
|
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 cde944fd8b9cd5eb67617aa3b68dc13eb49b1d10 (commit)
via eb3d5c1a945fb09a76d9d4cb20aba903fc6e53c2 (commit)
from bb8d37ddf12a2ad76ede129b63522bfa2940d34e (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 cde944fd8b9cd5eb67617aa3b68dc13eb49b1d10
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 10:31:30 2022 +0200
jtag/adapter: fix doxygen warning
Doxygen complains about:
adapter.h:120: warning: Unsupported xml/html tag <signal_name> found
Move the text in double quote to remove the warning.
Change-Id: Ia4ead5caa83c84e10ee2b2359048c282892170b0
Signed-off-by: Antonio Borneo <bor...@gm...>
Fixes: 82fd4005427b ("jtag/adapter: Add command 'adapter gpio'")
Reviewed-on: https://review.openocd.org/c/openocd/+/7202
Tested-by: jenkins
diff --git a/src/jtag/adapter.h b/src/jtag/adapter.h
index 625a0b269..682fc10ae 100644
--- a/src/jtag/adapter.h
+++ b/src/jtag/adapter.h
@@ -117,7 +117,7 @@ const char *adapter_get_required_serial(void);
const char *adapter_gpio_get_name(enum adapter_gpio_config_index idx);
/**
- * Retrieves gpio configuration set with command 'adapter gpio <signal_name>'
+ * Retrieves gpio configuration set with command "adapter gpio <signal_name>"
*/
const struct adapter_gpio_config *adapter_gpio_get_config(void);
commit eb3d5c1a945fb09a76d9d4cb20aba903fc6e53c2
Author: Antonio Borneo <bor...@gm...>
Date: Mon Sep 19 10:29:20 2022 +0200
doc: fix copyright dates
The copyright date for OpenOCD project has never been updated.
Add the range till current year.
Change-Id: I42c7e3b2bf2e3a486bf836d063460dfa7b40d24d
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7201
Tested-by: jenkins
diff --git a/doc/openocd.texi b/doc/openocd.texi
index fc86429d1..2a8626b80 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -19,7 +19,7 @@ dated @value{UPDATED},
of the Open On-Chip Debugger (OpenOCD).
@itemize @bullet
-@item Copyright @copyright{} 2008 The OpenOCD Project
+@item Copyright @copyright{} 2008-2022 The OpenOCD Project
@item Copyright @copyright{} 2007-2008 Spencer Oliver @email{spen@@spen-soft.co.uk}
@item Copyright @copyright{} 2008-2010 Oyvind Harboe @email{oyvind.harboe@@zylin.com}
@item Copyright @copyright{} 2008 Duane Ellis @email{openocd@@duaneellis.com}
-----------------------------------------------------------------------
Summary of changes:
doc/openocd.texi | 2 +-
src/jtag/adapter.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-23 21:20:56
|
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 bb8d37ddf12a2ad76ede129b63522bfa2940d34e (commit)
from b89cf71e2b5e4dc2c31cf085aec7a19515e2a9d6 (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 bb8d37ddf12a2ad76ede129b63522bfa2940d34e
Author: Antonio Borneo <bor...@gm...>
Date: Tue Sep 20 12:08:55 2022 +0200
checkpatch: fix for flag --no-tree
When checkpatch is run with command line flag --no-tree, it cannot
find local 'companion' files and has to skip loading them.
This has caused issues with change https://review.openocd.org/7211
on jenkins.
Skip loading 'tools/scripts/camelcase.txt' with flag --no-tree.
While there, rewrite the associated error message.
Change-Id: I6ede7b16f9ccd77b9118fd9be7ada07a1ac96952
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7212
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 10b0b8c25..9dda61cde 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -995,8 +995,10 @@ sub read_words {
# OpenOCD specific: Begin: Load list of allowed CamelCase symbols
if (show_type("CAMELCASE")) {
- my $allowed_camelcase_file = "$root/tools/scripts/camelcase.txt";
- if (open(my $words, '<', $allowed_camelcase_file)) {
+ my $allowed_camelcase_file = "tools/scripts/camelcase.txt";
+ if (!$root) {
+ warn "Ignore list of allowed camelcase symbols.\n";
+ } elsif (open(my $words, '<', "$root/$allowed_camelcase_file")) {
while (<$words>) {
my $line = $_;
@@ -1012,9 +1014,9 @@ if (show_type("CAMELCASE")) {
$camelcase{$line} = 1;
}
- close($allowed_camelcase_file);
+ close("$root/$allowed_camelcase_file");
} else {
- warn "No camelcase symbols to ignore - file '$allowed_camelcase_file': $!\n";
+ warn "Failed opening file '$root/$allowed_camelcase_file': $!\n";
}
}
# OpenOCD specific: End
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 17:54:23
|
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 annotated tag, v0.12.0-rc1 has been created
at f3624a23da875fbdc9acb3c968103aae1f914a91 (tag)
tagging 5e7612eb4c87e8e7a7000b42ff5d0f7e5c70fc42 (commit)
replaces v0.11.0
tagged by Paul Fertser
on Sun Sep 18 16:55:46 2022 +0300
- Log -----------------------------------------------------------------
The openocd-0.12.0-rc1 release.
Adrian Negreanu (4):
cmsis_dap: remove DAP_MAX_CLOCK
armv7m_trace_itm_config: wait for ITMBusy to be cleared
cmsis-dap: don't update the packet size across backends.
cmsis_dap: add support for swo commands
Adrien Grassein (2):
jtag: Add an option to ignore the bypass bit
tcl: ngultra: add target config file
Alex Crawford (2):
driver/linuxgpiod: add support for opendrain srst
drivers/linuxgpiod: add support for opendrain trst
Alvin Å ipraga (1):
tcl/target/imx8m: use hwthread rtos
Andreas Bolsch (1):
Update jtagspi driver for 1-, 2- and 4-byte addresses
Andreas Fritiofson (4):
contrib: add an example of using list.h
config/ftdi: Add tristate capability to sheevaplug config
Remove remaining references to FTD2XX driver
cortex_m: Restore fast register reads if no polling is needed
Andreas Sandberg (2):
hla: Increase HLA_MAX_USB_IDS
stlink: Add PID for V3 device without MSD
Andrew Wesie (2):
tcl/interface/ftdi: Add miniWiggler debugger config
tcl/interface/ftdi: Add PLS SPC5 debugger config
Anthony Ferranti (1):
eMAG: Add Ampere eMAG config files
Antonio Borneo (373):
drivers/rlink: switch to libusb1
stlink: fix execution order in stlink_config_trace()
itm: rework itm commands before 'init'
arm_tpiu_swo: add support for independent TPIU and SWO
tcl/target: start using the new TPIU/SWO support
armv7m_trace: get rid of the old tpiu code
server: revert commit 7e6556b3cad8
jtag/nulink: add a space after PRIx32
stlink: swo: use completely the available buffer
jimtcl: update to version 0.80 (2020-10-29)
configure.ac: switch to autoconf 2.69
target/arm720t: remove command 'arm720t cp15' deprecated in v0.4.0
target/arm920t: remove command 'arm920t cp15i' deprecated in v0.4.0
openocd: remove command line flag -p/--pipe deprecated in v0.5.0
startup.tcl: remove commands already deprecated in v0.7.0
target: remove target names already deprecated in v0.8.0
target: remove handling of target's deprecated_name
oocd_trace: drop the code, deprecated in v0.10.0
ioutil: drop the code, deprecated in v0.10.0
zy1000: drop the code, deprecated in v0.10.0
jtag: remove minidriver code and minidriver-dummy
README: update requested autoconf version 2.69
jimtcl: add temporary workaround for memory leak in jimtcl 0.80
udev rules: add missing ftdi USB VID/PID
udev rules: add missing Altera USB Blaster devices
drivers/usbprog: switch to libusb1
drivers/arm-jtag-ew: switch to libusb1
openocd: drop dependency from libusb0
LICENSES: move the GPL-2.0 license as required by checkpatch
LICENSES: add the GPL-3.0 license for stand-alone code
LICENSES: add the GFDL-1.2 license
LICENSES: add the BSD 1-clause license
LICENSES: add 'license-rules.txt'
mem_ap: allow GDB connections
doc: [1/3] uniform the texinfo syntax for commands definition
doc: [2/3] uniform the texinfo syntax for commands definition
doc: [3/3] uniform the texinfo syntax for commands definition
helper/command: always pass struct command as jim private data
helper/command: use one single handler for all the commands
helper/command: get current target from dedicated API
helper/command: override target only on target prefixed cmds
helper/command: pass command prefix to command registration
command mode: return "any" for tcl proc
help: re-implement 'help' independent from tree of struct command
helper/command: register full-name commands in jim
helper/command: simplify run_command()
helper/command: simplify jim_command_mode()
helper/command: unregister commands through their full-name
helper/command: get rid of the tree of struct command
helper/command: make script_debug() static
helper/command: rename s/command_unknown/jim_command_dispatch/
smp: move command deprecation to startup.tcl
doc: annotate configuration commands
doc: do not document commands that are already deprecated
doc: command 'ftdi_layout_signal' can run after config
board: imx53: fix l2 cache initialization
tcl/at91/sam9_smc: fix syntax errors
helper/command: fix build with jimtcl 0.79 or older
libusb: don't use typedef's
helper/replacements: remove unused typedef's
helper/types: remove type '_Bool'
helper/jim-nvp: remove unused function Jim_nvpInit()
helper/command: fix memory leak on malloc() fail
helper/command: drop the TCL variable 'ocd_HOSTOS'
jtag: simplify the calls to Jim_SetResultFormatted()
telnet: allow hiding selected commands during auto-completion
telnet/auto-complete: hide deprecated and internal commands
startup.tcl: prepare for jimtcl 0.81 'expr' syntax change
tcl: [1/3] prepare for jimtcl 0.81 'expr' syntax change
tcl: [2/3] prepare for jimtcl 0.81 'expr' syntax change
tcl: [3/3] prepare for jimtcl 0.81 'expr' syntax change
coding-style: additional style for C code
jimtcl: restrict memory leak workaround on Linux only
cmsis_dap: fix build on macOS
target/arm_dpm: rename 'wp_pc' as 'wp_addr'
target/aarch64: fix watchpoint management
tcl/rp2040: remove empty line at end of file
tcl: fix some minor typo
flash: fix some minor typo
jtag: fix some minor typo
target: fix some minor typo
openocd: fix some minor typo
helper/command: silent debug msg on command register/unregister
mem_ap: fix target arch_info type
riscv: drop unused variable
riscv: replace macro DIM() with ARRAY_SIZE()
drivers/versaloon: use ARRAY_SIZE()
openocd: use macro ARRAY_SIZE()
rtos: use ARRAY_SIZE() and simplify rtos_type.create()
tcl: remove remaining deprecated commands
help text: remove trailing space
help: fix line size in 'usage' output
stlink: add comment of firmware version for each flag bit
stlink: reorder the flag macro by firmware release
target/cortex_a: fix number of watchpoints
target/cortex_a: add support for watchpoint length of 1, 2 and 4 bytes
target/cortex_a: fix memory leak on watchpoints
helper/jim-nvp: comply with coding style [1/2]
helper/jim-nvp: comply with coding style [2/2]
server/telnet: fix autocomplete for jimtcl commands
helper/list.h: align file to Linux v5.12
helper/list.h: add mention to the example in contrib
armv7m: replace flag 'stlink' with 'is_hla_target'
stlink: fix SIGSEGV with libusb v1.0.24-33-g32a2206 (11618)
flash/nor/cfi: fix CamelCase symbols in cfi_spansion_pri_ext
flash: rename CamelCase symbols
helper: rename camelcase symbols
jtag: rename CamelCase symbols
jtag/swd: rename CamelCase macros
server: rename CamelCase symbols
rtos: convert CamelCase enum in uppercase
rtos: rename CamelCase symbols
rtos/eCos: rename CamelCase symbols
target/arm: rename CamelCase symbols
target/cortex_m: rename CamelCase symbol
target/arm: opcodes: rename CamelCase symbols and uppercase variables
target/mips: rename CamelCase symbols
target/nds32: rename CamelCase symbols
svf: rename CamelCase label
jtag/aice: use macros in place of const variables
drivers/buspirate: use macros in place of const variables
flash: use lowercase for C variables
target/nds32: use lowercase for C variables
flash/nor: convert enum in uppercase
openocd: fix simple cases of Yoda condition
openocd: manually fix Yoda conditions
target: rename CamelCase symbols
openocd: fix simple cases of NULL comparison
openocd: remove NULL comparisons with checkpatch [1/2]
openocd: remove NULL comparisons with checkpatch [2/2]
openocd: manually remove NULL comparisons
openocd: fix Yoda conditions with checkpatch
jtag/aice: fix build with clang on MacOS
helper: add align.h
helper/align.h: use it
arm_adi_v5: fix signed offset in Class 0x1 ROM tables
arm_adi_v5: fix access to 64-bit MEM-AP
openocd: fix cleanup order: cti before dap
arm_adi_v5: use macro DP_APSEL_MAX in place of magic number
jtag/mpsse: fix SIGSEGV for use after free
stlink: fix SWIM mode on stlink-v3
cortex_m: fix command 'step address'
command: log the command only when it is executed
arm_adi_v5: update coresight class names
jep106: use packed jedec manufacturer code
cortex_a: use the ap number specified at target create
helper: remove fix for libusb pre-v1.0.9
Makefile: drop warning suppression on win build
openocd: prepare for jimtcl 0.81 'expr' syntax change
jimtcl: update to master branch 20210715
openocd: remove last NULL comparisons
target: do not cast NULL in assignment
armv7m.h: relax dependency from 'arm_adi_v5.h'
arm_coresight: add include file and use it
arm_adi_v5: simplify handling of AP type
arm_adi_v5: add helper to search for part number
arm_adi_v5: add arm SoC-600 part numbers
arm_adi_v5: add arm Cortex-R52 part numbers
arm_adi_v5: add arm Neoverse N2 part numbers
arm_adi_v5: drop ANY_ID from table dap_part_nums
arm_tpiu_swo: fix support for deprecated 'tpiu' command before 'init'
openocd: prevent jimtcl error message while testing commands
udev: add ASIX Presto programmer
stlink-dap: add 'cmd' to send arbitrary commands
jtag/core: fix unused assignment
arm_tpiu_swo: fix two dead assignments
arm_semihosting: fix two dead assignments
armv8: fix five dead assignments
target/lakemont: fix dead assignment
mips64_pracc: fix three dead assignments
command: document enum command_mode
flash/nor/psoc6: fix doxygen comment
tcl/stm32mp15x: freeze watchdog, recover SWD after power cycle
openocd: remove 'src' prefix from #include path
riscv: use relative path to include contrib's data
hla: improve readability of struct hl_interface_s initialization
jtag/aice: remove unused exported struct aice_interface_param_s
jtag/core: remove unused variable
stlink: check buffer size on 16 and 32 bit memory transfer
stlink: add queue in dap-direct mode
stlink: expose ap number and csw in memory r/w
stlink: detect mem_ap R/W and dequeue set TAR and CSW
stlink: collapse consecutive mem AP r/w in a single command
stlink: add support for native no_addr_incr commands
stlink: dequeue CSW write only if it doesn't change csw_default
stlink: add support for rw-misc commands
stlink: skip rw-misc commands with TCP server
Makefile: remove workaround for jimtcl 0.80
jimtcl: revert temporary workaround for memory leak in jimtcl 0.80
jtag/core: get rid of variable 'jtag'
jtag/adapter: move 'usb location' code in adapter.c
jtag: move adapter init/quit and speed to adapter.c
jtag/adapter: move config vars in struct adapter_config
jtag: move prototype of adapter init/quit and speed to adapter.h
jtag: align adapter speed code to new structure
jtag: remove file driver.h
jtag/adapter: fix memory leak on usb location
jtagspi: fix build on MacOS
cortex_m: poll S_REGRDY on register r/w
arm_adi_v5: add missing enum DORMANT_TO_JTAG
cmsis_dap: add support for dormant-to-jtag
drivers/bitbang: add support to switch to/from dormant state
jlink: add support to switch to/from dormant state
ftdi: add support to switch to/from dormant state
adi_v5_swd: add comment to describe debug flag 'do_sync'
jimtcl: update to master branch 20211108
openocd: use single line for register_commands*()
openocd: use unique name for struct command_registration
openocd: declare struct command_registration in a single line
flash/rp2040: don't initialize to NULL fields in struct
flash/psoc6: initialize usage field
doc: remove non-existing command riscv set_scratch_ram
doc: remove non-existing command swd wcr
doc: remove non-existing command readgroup
doc: fix typos in commands definition
jtag/adapter: add command 'adapter serial'
jtag/aice: switch to command 'adapter serial'
jtag/cmsis_dap: switch to command 'adapter serial'
jtag/ft232r: switch to command 'adapter serial'
jtag/ftdi: switch to command 'adapter serial'
jtag/kitprog: switch to command 'adapter serial'
jtag/presto: switch to command 'adapter serial'
jtag/vsllink: switch to command 'adapter serial'
jtag/xds110: switch to command 'adapter serial'
jtag/jlink: switch to command 'adapter serial'
jtag/hla, jtag/stlink: switch to command 'adapter serial'
drivers: call adapter_get_required_serial() in jtag_libusb_open()
jimtcl: update to version 0.81 (2021-11-28)
tcl: stm32mp13x: add target and board config files
cortex_m: remove last references to debugport_init()
adi_v5_swd: add jtag-to-swd through dormant
openocd: add keep_alive during command sleep
gdb_server: fix a comment in gdb_new_connection()
semihosting: use macro COMMAND_HANDLER
doc: use the new jimtcl syntax for 'expr'
aarch64: dump a message when CTI is missing
log: fix memory leak when log to file is enabled
target: use target_event_name()
target/smp: use a struct list_head to hold the smp targets
helper/list: add list_for_each_entry_direction()
doxygen: fix some function prototype description
server: remove remaining crust from dropped eCos code
.gitmodules: switch away from repo.or.cz
gdb_server: fix double free
gdb_server: check target examined while combining reg list
tcl: don't use 'set' to retrieve the value of a variable
jimtcl: add configure flag for build maintainer mode
server: fix: remove kept_alive() from server loop
log: drop global current_time
server: change prototype of add_service()
gdb_server: simplify logic to enable/disable gdb_log_callback()
keep-alive: drop link with log framework
breakpoints: fix build on -fno-inline
semihosting: fix mode flags for local host open()
arm_tpiu_swo: fix autodetection of SWO pin frequency
openocd: include config.h in every file .c
helper/bits: add BIT_ULL and GENMASK macros
nds32: deprecate it, together with aice adapter driver
server/gdb: fix return of gdb remote monitor command
smp: deprecate legacy SMP core switching support
server/gdb: fix gdb remote monitor cmd on multi-target
target: fix build with jimtcl 0.79
arm_coresight: define ARM_CS_CIDR_CLASS()
adi_v5_jtag: reduce verbosity on persistent WAIT
arm_adi_v5: describe Class 0x9 Device Architecture register
arm_adi_v5: rework dap_read_part_id()
arm_adi_v5: split ROM table loop from generic coresight
arm_adi_v5: report sysmem on class 0x9 ROM tables
arm_adi_v5: handle faulting entry in ROM table
arm_adi_v5: separate ROM table parsing from command output [1/3]
arm_adi_v5: separate ROM table parsing from command output [2/3]
arm_adi_v5: separate ROM table parsing from command output [3/3]
arm_adi_v5: abstract actions during ROM table parsing
arm_adi_v5: let dap_lookup_cs_component() to get AP dbgbase
arm_adi_v5: replace dap_lookup_cs_component()
arm_adi_v5: add support for 64bit Class 0x9 ROM tables
aarch64: don't wait for smp targets halted in deassert reset
openocd: add post-init and pre-shutdown helpers
.gitignore: add cross-compile *-libtool
arm_adi_v5: fix scan-build warning [1/3]
arm_adi_v5: fix scan-build warning [2/3]
arm_adi_v5: fix scan-build warning [3/3]
drivers/bitbang: silence scan-build warning
arm_adi_v5: check for calloc() return value
arm_adi_v5: add ap refcount and add get/put around ap use
adi_v5_jtag: clear sticky overrun error
adiv6: add low level swd transport
adiv6: use struct adiv5_ap->ap_num to contain the AP base address
arm_adi_v5: add option 'root' to 'dap info' command
adiv6: prepare for AP level ROM tables
adiv6: add support for ROM tables in AP
adiv6: stay in same AP during dap_lookup_cs_component()
arm_adi_v5: parse ROM tables behind SoC-600 APv1 adapter
aarch64: fix handling of 'reset halt'
drivers/linuxgpiod: release gpio at exit
drivers/linuxgpiod: simplify gpio release
semihosting: remove comparison with NULL
tcl/interface/vdebug: add newline to file's last line
tcl/board/steval-idb012v1: fix SPDX tag
tcl: replace FSF boilerplate with SPDX tag
tcl: move SPDX tag as first line
tcl/target: add SPDX tag
tcl/board: add SPDX tag
tcl/interface: add SPDX tag
tcl: add SPDX tag
helper: fix build with mingw gcc 12.1.0
target: esp_xtensa_smp: fix clang report
openocd: build: add SPDX tag
openocd: src: remove duplicated GPL license tag
openocd: src: add GPL license tag on files that miss it
openocd: src: replace the BSD-3-Clause license tag
openocd: src: replace the BSD-2-Clause-Views license tag
openocd: src: replace the GPL with eCos exception 2.0 license tag
openocd: src: replace the GPL and BSD-Source-Code license tags
openocd: src: replace the incomplete GPL-2.0-or-later license tag
openocd: src: replace the GPL-2.0-only license tag
openocd: src: fix incorrect GPL license tag
openocd: src: fix incorrect SPDX tags
openocd: src/flash: replace the GPL-2.0-or-later license tag
openocd: src/helper: replace the GPL-2.0-or-later license tag
openocd: src/jtag: replace the GPL-2.0-or-later license tag
openocd: src/rtos: replace the GPL-2.0-or-later license tag
openocd: src/target: replace the GPL-2.0-or-later license tag
openocd: src: replace the GPL-2.0-or-later license tag
openocd: src: replace SPDX to remaining files
helper/jim-nvp: avoid camelcase error by deprecated API
target: add API to temporarily mask target polling
openocd: prevent target polling during 'init'
tcl/target: replace event trace-config
tcl/target: stm32[fl]4x: document the settings for trace
doc: how to use QEMU to test big-endian build
flash/nor: remove empty command definitions
jtag/vdebug: remove BSD-2-Clause boilerplate
jep106: add SPDX tag and JEDEC copyright
jep106: update to revision JEP106BE Jan 2022
openocd: remove recently added CamelCase symbols
openocd: remove CamelCase symbols *xPSR*
openocd: fix syntax of SPDX tags
contrib: replace the GPLv3-or-later license tag
contrib: replace the BSD-3-Clause license tag
contrib: replace the GPLv2-or-later license tag
contrib: add GPL license tag on files that miss it
.gitignore: remove cross-compile *-libtool
log: remove unused set_log_output()
jtag: make local symbols static
riscv: make local symbols static
xtensa: make local symbols static
target: make local symbols static
flash/nor/npcx: make local symbols static
riscv: don't export local symbols
usbprog: remove unused variable
flash/nor: move variable's declaration in C file
target: don't export local symbols
openocd: fix for polling during "expr" computation
configure.ac: drop unneeded dependency check
src/jtag/drivers/ep93xx: fix GCC 12 warning
tcl/interface: replace last deprecated commands
mips64: remove empty mips_mips64_soft_reset_halt()
checkpatch: import new script version from kernel v6.0-rc3
checkpatch: add OpenOCD specific config flags
checkpatch: add variable $OpenOCD
checkpatch: don't spell-check the spelling file
checkpatch: add list of typedef used in OpenOCD
checkpatch: check for SPDX tags of licenses in use
checkpatch: adapt shell script to the tool's new version
checkpatch: increase the max indentation level
checkpatch: add commit-message field to ignore some check
checkpatch: enable CAMELCASE test
checkpatch: extend check for camel[0-9_]*CASE
checkpatch: fix path of documentation
HACKING: add chapter on checkpatch
openocd: fix SPDX tag format for files .c
The openocd-0.12.0-rc1 release candidate
Antony Pavlov (1):
checkpatch: check for OpenOCD tree, not for kernel tree
Asier Llano (1):
rtos: Support for "none" rtos
Ben Bender (1):
arm_adi_v5: Adding Nuvoton NPCX quirk
Ben McMorran (2):
gdb_server: Include thread name as XML attribute
rtos: threadx: Add hla_target support for ThreadX
Bohdan Tymkiv (1):
target/arm_jtag.h: fix wrong comparison in arm_jtag_set_instr
Cheng-Shiun Tsai (1):
Aarch64:Switch to EL1 from EL0 before manipulate MMU
Chengyu Zheng (1):
target/cortex_a: add support for watchpoints
Christian Hoff (2):
aarch64: add support for "reset halt"
target/image: report error if ELF file contains no loadable sections
Daniel Anselmi (1):
Add IPDBG JtagHost functionality to OpenOCD
Daniel Goehring (2):
target: add 64-bit address array command support
target/board: Add Ampere QS|MQ config files
Diego Herranz (1):
contrib/itmdump.c: fix implicit declaration warning
Doug Brunner (2):
flash/nor/efm32: fixed BG1x identification
flash/nor/efr32: fixed lockbits and user data
Erhan Kurubas (26):
flash: fix clang static analyzer build errors
semihosting: add semihosting_basedir command
configure: build jimtcl with json extension
target: add Espressif ESP32-S2 basic support
telnet_server: fix valgrind error
tcl: add get_bit & get_bitfield memory helper functions
semihosting: fix accessing memory outside the bounds of the fn array
target: add Espressif ESP32 basic support
target: add Espressif ESP32-S3 basic support
esp32s2: convert counted timeout to timeval_ms
semihosting: add custom user command handler
jtag: add esp_usb_jtag driver
tcl/esp32s2: check memory protection on gdb attach
tcl/esp32s3: check memory protection on gdb attach
semihosting: move semihosting_result_t from riscv.h to the semihosting_common.h
target/semihosting: export semihosting_common_handlers[] from header file
adapter: run at default speed when clock speed not specified
loaders/reset/espressif: replace the GPL-2.0-or-later license tag
target/espressif: remove author lines from esp32xx and xtensa files
target/semihosting: drop type casting from semihosting->result
target/xtensa: fix clang analyzer warnings and gcc12 build errors
flash/nor/kinetis: fix clang scan-build error format-truncation
target/espressif: add semihosting support
server: add function to get openocd shutdown status
tcl/board: add ESP32 config for ESP USB Bridge board
tcl/board: add ESP32-S3 config for ESP USB Bridge board
Evgeniy Didin (2):
target/arc: refactor ARC register numbers defines
rtos: Add support for Zephyr RTOS
Felipe Balbi (1):
Add configuration file for Olimex H405
Florian Fainelli (4):
tcl: Update Flyswatter product links
arm_adi_v5: Provide Brahma-B53 identifiers
arm_adi_v5: Added Cortex-A76 identifiers
arm_adi_v5: add support for display Class 0x9 ROM tables
Florian Meister (1):
target/image: allow loading of 64-bit ELF files
Florian Zaruba (1):
jep106.inc: Update to revision JEP106BC
Frank Dischner (3):
FreeRTOS: Fix current thread ID when no threads are active
FreeRTOS: Always show current execution before scheduler is started
FreeRTOS: Fix thread reg list for Cortex-M7
Gabor Csapo (1):
libusb_helper.h: Increase USB timeout
Hans-Erik Floryd (2):
flash/nor/atsame5: add LAN9255 devices
tcl/board: Add EVB-LAN9255 config
Ian Thompson (14):
gdb_server: add "not supported" Z-packet reply
gdb_server: support sparse register maps
gdb_server: custom target-specific GDB queries
target: add generic Xtensa LX support
Generic Xtensa target config files
target/xtensa: fix clang analyzer warnings
target/xtensa: virtualize XDM registers
target/xtensa: enable DAP/SWD for generic xtensa
target/xtensa: DAP-based Xtensa config files
target/xtensa: fix step state transition
target/xtensa: fully initialize buffers for PWRSTAT read
target/xtensa: populate PS correctly during fetch
target/xtensa: fix clang analyzer warning
target/xtensa: invalidate register cache on reset
Jacek Wuwer (2):
Cadence virtual debug interface (vdebug) integration
drivers/vdebug: add support for DAP level interface
Jae Hyun Yoo (2):
tcl/fpga: add Lattice MachXO3 family support
tcl/interface: add linuxgpiod cfg for Aspeed AST2600
Jaehoon Park (1):
flash/nor/spi: add micron MT25QU01G
Jan Matyas (18):
gdb_server: Log both incoming and outgoing GDB packets
flash/nor: improved API of flash_driver.info & fixed buffer overruns
target: check return value of register get/set callbacks
target/semihosting: Capture errno in SEMIHOSTING_SYS_ISTTY
target/semihosting: Fix of close(): Never close standard streams
target: add support for 64bit data in mem2array and array2mem
.github/workflows: Add missing 'apt-get update' to the snapshot workflow
flash/nor/atsamv: fixed "maybe uninitialized" compiler warning
rtos: add debug prints for qSymbol lookup
helper/log: Add macros for target-related errors/warnings/...
riscv: Regenerated debug_defines.h and encoding.h
drivers/jtag_vpi: Added "jtag_vpi:" prefixes to log messages
gdb_server: added and improved several debug prints
doc: Update doc for commands "riscv expose_csrs" and "riscv expose_custom"
doc: Updated RISC-V memory-related cmds in documentation
jtag_vpi: Minor cleanup in jtag_vpi driver
gdb_server: Improve logging of GDB-remote packets
target/image: fix - p_flags field in ELF64 segment headers is 64 bits wide
Janco Kock (1):
flash/nor/at91samd: Add SAMR35J18B support
Jesse Sheridan (1):
target/riscv: Implement get_gdb_arch()
Jian-Hong Pan (2):
tcl/board: Add Raspberry Pi 3 board
tcl/board: Add Raspberry Pi 4 model B board
Jimmy (1):
flash/nor/stm32lx: fixed writes at high adapter speeds
Jiri Kastner (2):
tcl/target: add Rockchip RK3399 target
udev rules: add OSBDM device
Joerg Wunsch (1):
Add Microchip SAME51 Curiosity Nano board
Julien Massot (3):
rtos: zephyr: add zephyr_params for cortex r4
aarch64: support for aarch32 ARM_MODE_UND
rtos: zephyr: do not use deprecated symbols name
Kevin Burke (8):
target/adiv5: Large Physical Address Extension
arm_adi_v5: move in a separate function devtype decode/display
arm_adi_v5: add arm Neoverse N1 part numbers
adiv6: add dap flags -adiv5 and -adiv6
adiv6: re-organize mem_ap registers definition
adiv6: read ROM Table address size
adiv6: add low level jtag transport
adi_v5_jtag: extend memaccess_tck to every AP access
Laszlo Sitzer (1):
linuxgpiod: Allow using multiple GPIO chips.
Leonard Crestez (1):
target/imx8qm: Initial support
Liming Sun (1):
target/aarch64: Add watchpoint support
Luis de Arquer (1):
drivers/ftdi: drscan: Skip DR-PAUSE when endstate == IDLE
MadSquirrel (1):
server/gdb_server: Add support for default thread, use by IDA debugger
Marc Schink (75):
rtos: Remove typedef'd struct
flash/nand/lpc32xx: Remove typedef'd struct
target/mips: Remove typedef'd struct
flash/nor/stmqspi: Replace macros with static inline functions
doc/manual/style: Do not use 'Yoda conditions'
doc/manual/style: Fix comments
flash/nor/numicro: Use 'bool' data type
flash/nor/nrf5: Fix data types and const correctness
target/stm8: Make 'stm8_command_handlers' static
target/riscv: Change 'authdata_read' output
flash/nor/xcf: Do not use 'Yoda conditions'
tcl/board: Add ST NUCLEO-8S208RB
drivers/jlink: Remove trailing dots
target: Use 'bool' for 'reset_halt'
target/startup.tcl: Do not use 'Yoda conditions'
target/cortex_a: Use bool data type
target: Rename 'linked_BRP' to 'linked_brp'
target/register: Minor code cleanup
Use boolean argument for register_get_by_name()
doc/openocd: Fix typo
target/dsp563xx: Handle return values
target/dsp563xx: Use bool data type for 'hardware_breakpoints_cleared'
target/breakpoints: Remove dead code and cleanup
flash/nor/stm32l4: Fix stm32l4_probe()
target/stm8: Remove unused member 'stm8_common'
target/mips64: Replace printf() with LOG_ERROR()
target/aarch64: Replace printf() with LOG_DEBUG()
target/cortex_a: Replace printf() with LOG_DEBUG()
drivers/ftdi: Group adapter commands
tcl: Adapt config files to new ftdi command syntax
flash/nor: Do not update 'is_erased'
drivers/parport: Group adapter commands
tcl/interface: Adapt config files to new parport command syntax
drivers/openjtag: Group adapter commands
tcl/interface/openjtag: Adapt to new openjtag command syntax
drivers/remote_bitbang: Group adapter commands
drivers/presto: Group adapter commands
drivers/xlnx-pcie-xvc: Group adapter commands
drivers/ulink: Group adapter commands
drivers/vsllink: Group adapter commands
drivers/jtag_dpi: Group adapter commands
tcl/interface/jtag_dpi: Adapt to new jtag_dpi command syntax
drivers/bcm2835gpio: Group adapter commands
tcl/interface: Adapt config files to new bcm2835gpio command syntax
drivers/jtag_vpi: Group adapter commands
tcl/interface/jtag_vpi: Adapt to new jtag_vpi command syntax
drivers/linuxgpiod: Group adapter commands
tcl/interface/dln-2-gpiod: Adapt to new linuxgpiod command syntax
drivers/sysfsgpio: Group adapter commands
tcl/interface: Adapt config files to new sysfsgpio command syntax
drivers/buspirate: Group adapter commands
tcl/interface/buspirate: Adapt to new buspirate command syntax
doc/openocd: Fix buspirate example
drivers/usb_blaster: Group adapter commands
tcl: Adapt config files to new usb_blaster command syntax
drivers/ft232r: Group adapter commands
tcl/board/arty_s7: Fix proc and chip name
contrib/udev: Add missing J-Link USB PID
target/tcl: Add set_reg function
target/tcl: Add get_reg function
target/arm_tpiu: Make error message easier to understand
target/arm_tpiu: Fix 'tpiu create' parameter check
target/arm_tpiu: Fix usage of 'tpiu create'
flash/nor/sim3x: Fix typo
flash/nor/efm32: Use Cortex-M 'core_info' field
target/tcl: Add 'read_memory' and 'write_memory'
target: Deprecate 'array2mem' and 'mem2array''
Remove all occurrences of 'mem2array' and 'array2mem'
target: Rework 'set' variable of break-/watchpoints
tcl/tools: Add function to measure the speed of ARM Cortex-M devices
drivers/cmsis-dap: Remove stray whitespace
tcl/board: Add NXP FRDM-K64F
target/arm_cti: Fix error handling in 'cti create'
libjaylink: Update to 0.3.1 release
flash/nor/stm32lx: Add revision 'X' for Cat.4/3 devices
Marek Vasut (3):
tcl/target: Select default boot core on Renesas R-Car Gen2/Gen3
tcl/target: Add support for Renesas R8A779A0 V3U SoC
tcl/board: Add Renesas Falcon board
Markus Reiter (4):
tcl/target/stm32f4x: fix name
tcl/target/stm32l4x: set default WORKAREASIZE to smallest device
tcl/target/stm32l4x: switch to new TPIU/SWO support
tcl/target/stm32l4x: align format/order/comments with stm32f4x
Martin Hierholzer (1):
fix Kinetis 100 MHz rev 1.x programming
Matthew Mets (3):
drivers/bcm2835: Add support for SWDIO direction control pin
interface/jtag_hat: Add interface configuration for the JTAG HAT
doc/openocd.texi: Add documentation for bcm2835 interface
Mischa Studer (1):
flash/nor/cfi: fix uninitialized write-mem pointer
Nishanth Menon (16):
tcl/target: Add K3 basic support
tcl/board: Add AM654 EVM basic support
tcl/board: Add J721E EVM basic support
tcl/board: Add J7200 EVM basic support
tcl/board: Add AM642 EVM basic support
tcl/target/ti_k3: Remove args from m3 and m4_up
tcl/target/ti_k3: Add a gdb-attach event hook for m3 and m4
tcl/target/ti_k3: Rename m3 target as sysctrl
tcl/target/ti_k3: Rename m4 target as general purpose mcu
tcl/target/ti_k3: Rename R5 targets to be more descriptive
tcl/target/ti_k3: Add a gdb-attach event hook for r5 and simplify startup function
tcl/target/ti_k3: Add a gdb-attach event hook for armv8 and simplify startup function
tcl/target/ti_k3: Add J721S2 SoC
tcl/board: Add J721s2 EVM basic support
tcl/target/ti_k3: Add AM625 SoC
tcl/board: Add AM625 EVM basic support
Oleksij Rempel (5):
drivers: USB Blaster II: claim interface before using it
drivers: USB Blaster II: close file and release USB device if firmware handling failed
add config for Microchip SAMA5D27 SOM1 Kit1
tcl: add lattice ECP5 family support
Partially Revert "flash/stm32l4x: introduce flash programming without loader"
Olivier DANET (1):
target/zynqmp : Add AXI AP access port
Patrick Stewart (1):
tcl/interface/ftdi: Fix Digilent JTAG-SMT2 config
Paul Fertser (9):
Restore normal development cycle
doc: move the official channel to Libera.Chat
jtag: drivers: bcm2835gpio: don't allow GPIOs > 31
flash: nor: use binary prefixes consistently
tcl: board: mini2440: fix to work with the current version
checkpatch: add logging functions
checkpatch: treat jenkins as valid email
checkpatch: correct false positives reporting instructions
checkpatch: fix check for the FSF address
Pavel Kirienko (2):
semihosting: use open mode flags from GDB, not from sys/stat.h
semihosting: fix return value of SYS_READ and SYS_WRITE
Peter Lawrence (2):
drivers/cmsis-dap: add multidrop capability
tcl/board: add pico-debug support
Piotr Kasprzyk (1):
doc: fix typo s/Not/Note/
PoroCYon (1):
drivers/cmsis-dap: update for newest protocol version
R. Diez (9):
Enable adapter "Bus Pirate" by default.
Document the buspirate interface driver.
Warn on undefined preprocessor symbols
Remove compatibility macros m4_ifblank and m4_ifnblank
configure.ac: use a separate folder for Autoconf-generated files
Makefile: add special target .DELETE_ON_ERROR
Avoid non-standard conditionals with omitted operands.
Doc fix: echo writes to the log, and not to stdout
configure: provide advice if PKG_PROG_PKG_CONFIG unavailable
Ranjith Chandran (1):
tcl/interface: add Ashling Opella-LD FTDI config files
Raúl Sanchez Siles (1):
flash/stm32l4x: zero init stm32l4_flash_bank struct on flash bank initialization
Raúl Sánchez Siles (1):
build: Fix out-of-tree with --disable-dependency-tracking configure flag
Rene Kita (1):
build: remove warnings with gcc 11
Rohit Singh (1):
tcl: Add support for the Digilent Nexys Video board
Salvatore Giorgio PECORINO (1):
bluenrg: add support for bluenrg-lps device and board
Sean Anderson (10):
cpld: altera-epm240: Add additional IDCODEs
cpld: altera-epm240: Increase adapter speed
target: Add support for ls1088a
target: ls1088a: Add service processor
board: Add NXP LS1088ARDB
target: Add LS1046A
board: Add LS1046ARDB
tcl/target/ls1088: Break out common configuration
target: Add LS1028A
tcl: Add support for Kontron SMARC-sAL28
Sebastiaan de Schaetzen (3):
rtos/riot: fix out-of-bounds read of optional symbols array
rtos/riot: fix out-of-bounds writes when target is corrupted
flash/stm32l4x: prevent undefined behavior warnings caused by signed integer operations
Simon Johansson (1):
flash/nor/stm32f2x: Fix erase of bank 2 sectors
Steve Marple (13):
linuxgpiod: add SWDIO buffer
bcm2835gpio: Make buffer an output before the GPIO connected to it
bcm2835gpio: Fix incorrect GPIO validation
drivers/am335xgpio: Add AM335x driver for bitbang support on BeagleBones
doc: Document linuxgpiod driver commands
jtag/adapter: Add command 'adapter gpio'
drivers/am335xgpio: Migrate to adapter gpio commands
drivers/am335xgpio: Release resources on error and when quitting
drivers/linuxgpiod: Migrate to adapter gpio commands
drivers/bcm2835gpio: Release resources on error and when quitting
drivers/bcm2835gpio: Migrate to adapter gpio commands
drivers/bcm2835gpio: Add support for activity LED
drivers/bcm2835gpio: Fully restore GPIOs after use
Tarek BOCHKATI (95):
stlink: separate stlink core from USB functions
stlink: support of ST-LINK TCP server using stlink-dap and hla
cortex_m: avoid reading and writing non-existent registers
tcl/target: add BCM2835 configuration file
tcl/target: add BCM2836 configuration file
tcl/target: add BCM2837 configuration file
tcl/target: add BCM2711 configuration file
telnet: support end and home keys
aarch64: handle semihosting in aarch32 state
stm32l4x: add OTP support for STM32 G0/G4/L4/L4+/L5/WB/WL devices
flash/stm32l4x: enhance protect handler to use efficiently all WRP areas
flash/stm32l4x: introduce stm32l4_part_info.flags for devices features
flash/stm32l4x: probe tzen and rdp values
doc/openocd.texi: fix warning
doc/openocd.texi: fix warning
cortex_m: mark FPU register as non-existent instead of playing with num_regs
telnet: auto-completion of "registered" commands
cortex_m: implement hit_watchpoint function
cortex_m: use unsigned int for FPB and DWT quantifiers
cortex_m: add armv8m special registers
target/armv7m.h: [style] replace tab with space between variable type and name
cortex_m: do not perform soft_reset_halt on targets without VECTRESET
cortex_m: fix VECTRESET detection for ARMv6-M cores
flash/stm32l4x: add missing break statement
github/action: create a permanent 'latest' release
tcl/target/stm32f4x: fix hardcoded chip name
armv8_dpm: do not read/write non-existent registers
arm_dpm: do not read/write non-existent registers
armv4_5: do not read/write non-existent registers
target/arm: optimize architecture flags
cortex_m: enhance core and arch detection
flash/stm32fxx.c: do not read CPUID as this info is stored in cortex_m_common
github/workflow: upgrade libraries in windows build to latest versions
github/workflow: disable libusb static link for windows build
flash/stm32l4x: use COMMAND_PARSE_NUMBER in command handlers
jtag/cmcis_dap: use COMMAND_PARSE_NUMBER in command handlers
flash/at91samd: use COMMAND_PARSE_NUMBER in command handlers
flash/xmc4xxx: use COMMAND_PARSE_NUMBER in command handlers
flash/kinetis: use COMMAND_PARSE_NUMBER in command handlers
flash/atsame5: use COMMAND_PARSE_NUMBER in command handlers
flash/stm32l4x: do not report bank mode before probing [FIX]
flash/stm32l4x: introduce 'stm32l4x trustzone [enable|disable]' command
flash/stm32l4x: introduce auto-probe when OPTR is changed
flash/stm32l4x: STM32L5 support programming when TZEN=1 and RDP=0xAA
flash/stm32l4x: STM32L5 support programming when TZEN=1 and RDP=0x55
flash/stm32l4x: introduce flash programming without loader
flash/stm32l4x: remove stm32l4_part_info.default_flash_regs
flash/stm32l4x: add support of STM32G0Bx/G0Cx devices
flash/stm32l4x: add support of STM32WL5x dual core
flash/stm32l4x: add support of STM32U57x/U58x
flash/stm32l4x: free write_algorithm work area if no space left for the buffer
server/telnet: cleanup the if statement mixed style
server/telnet: support 'CTRL+C'
server/telnet: enhance telnet_move_cursor
server/telnet: simplify telnet_input function
server/telnet: add variables auto-completion
flash/stm32l4x: switch to to c loader instead of assembly loader
flash/stm32l4x: add support of STM32G05/G06x
flash/stm32l4x: add support of STM32WB1x
flash/stm32l4x: avoid using magic numbers for device ids
tcl/board: add st_nucleo_g0.cfg to cover known STM32G0 NUCLEO boards
tcl/board: add st_nucleo_g4.cfg to cover known STM32G4 NUCLEO boards
flash/nor/tcl: fix the flash name returned by 'flash list' command
flash/nor/tcl: 'flash list' command: add the flash bank target
flash/stm32l4x: fix segmentation fault with HLA adapters and STM32WLx devices
flash/stm32l4x: introduce is_max_flash_size and use it
flash/stm32l4x: do not use magic number for dual bank option bits
flash/stm32l4x: fix flash programming in 64-bit hosts
tcl/target/stm32(f7/h7)x: do not assume presence of the reset
doc: add a note to use 'stm32l4x option_load' after changing option bytes
gerrit url: update the gerrit server address to https://review.openocd.org
helper/command: fix echo return values
flash/stm32l4x: fix dual bank support for STM32L552xC devices
tcl/stm32wlx.cfg: comply with new jimtcl expr syntax
target/cortex_m: enhance multi-core examine logs
target: reset target examined flag if target::examine() fails
stlink (tcp): manage scattered stlink-server responses
flash/stm32h7x: avoid using magic numbers for device ids
flash/stm32h7x: don't read flash size using the H74/H75x CPU2
jtag/hla_layout: add #include <target/arm_tpiu_swo.h>
flash/stm32l4x: fix maybe-uninitialized compiler error
tcl/stm32l5x|u5x: refactor common tcl code
cortex_m: use LOG_TARGET_XXX
flash/stm32h7x: fix FLASH_WPSN_PRG mask used for protection
semihosting: permit redirection of semihosting I/O to TCP
stlink: enable queuing with stlink-server API v3
tcl/stm32u5x: fix clock config used at 'reset init'
flash/stm32l4x: fix auto-probe when RDP is promoted from 0 to 0.5
cross-build.sh: fix build with capstone
github workflow: use libusb 1.0.26 and hidapi 0.11.2
github/workflow: enable libftdi based adapters
cortex_a: get rid of not needed log messages
stlink: manage TCP_BUSY status code when using RW MISC
flash/stm32l4x: fix scan-build warnings
telnet_server: fix scan-build warning
Thomas Gleixner (3):
LICENSES: add the BSD 2-clause "Simplified" license
LICENSES: add the BSD 3-clause "New" or "Revised" License
LICENSES: Add the MIT license
Thomas Hebb (1):
tcl/interface/ftdi: Add config for Tigard board
Tim Newsome (22):
Implement CRC32 algorithm for RISC-V.
Cleanup of config/includes.
Add target_data_bits().
Add remote bitbang write buffer.
Add RTOS memory read/write functions.
Call poll at a fixed interval.
In SMP config, replicate watchpoints on each core
Speed up remote bitbang.
uint64_t->target_addr_t for stack pointers.
Upstream a whole host of RISC-V changes.
rtos: use struct member names instead of comments
riscv: Clear type 6 triggers on connecting.
target: Use target_addr_t for algorithm addresses.
flash/nor/fespi: algorithm, large address, errors
target/riscv: calloc() memory per register.
Document how vector registers are exposed to gdb.
Combine register lists of smp targets.
target/riscv: revive 'riscv resume_order'
Fix small memory leak.
Give each SMP group a unique number.
target/riscv: Update debug_defines.h.
target/riscv: Update with latest encoding from riscv-opcodes
Tim Nordell (3):
rtos: Create a new helper function find_symbol(...)
rtos: Fold is_symbol_mandatory into rtos_qsymbol(..)
rtos: Support looking up .lto_priv.0 appended to symbol name
Tomas Vanek (74):
flash/nor/atsame5: add SAME51G18A and SAME51G19A devices
drivers/cmsis-dap: tidy up buffer access
drivers/cmsis-dap: improve error checking
drivers/cmsis-dap: flush read
target/arm_adi_v5: add JTAG_TO_DORMANT sequence
target/adi_v5_swd: remove double space from swd_cmd() parameters
target/arm_adi_v5: move DP register definitions to one block
target/armv7m: change FPv4_SP and FPv5_SP/DP identifiers to uppercase
target/armv7m: fix static analyzer warning
cortex_m: use cortex_m_write_debug_halt_mask() in cortex_m_single_step_core()
target/cortex_m: use cortex_m->dcb_dhcsr in cortex_m_soft_reset_halt()
target/cortex_m: cumulate DHCSR sticky bits
target/cortex_m: faster reading of all CPU registers
target/arm_dap: fix memory leak in error path of dap_create()
drivers/swd: add support for SWD multidrop
drivers/ftdi: add support for SWD multidrop
drivers/bitbang: add support for SWD multidrop
target/adi_v5_swd: introduce swd_queue_dp_read/write_inner()
target/arm_dap: clean up dap_configure code
target/arm_adi_v5,arm_dap: introduce multidrop_targetsel and its configuration
target/adi_v5_swd: add support for SWD multidrop
target/arm_dap: check SWD DAP configuration
target/hla_target: set cortex_m->common_magic
doc: mention SWD multidrop
flash/nor/kinetis_ke: add .help fields for tcl commands
flash/nor/kinetis_ke: remove 'kinetis mdm test_securing' cmd
doc: document 'atsamv gpnvm' command
flash/nor/at91samd: remove 'at91samd info' command
doc: fix list of supported nRF52 devices
doc: document 'cmsis-dap cmd' command
target,flash: allow target_free_working_area on NULL area pointer
doc: list internal commands called by init
doc: document noinit command
jtag/drivers/vsllink: fix memory leak
target/cortex_m: minor refactoring in cortex_m_store_core_reg_u32()
target/cortex_m: fix target_to_cm() helper
target/armv7m,cortex_m: introduce checked arch_info cast routines
target/cortex_m: add Cortex-M part number getter
flash/nor/stm32xx: fix segfault accessing Cortex-M part number
flash/stm32f1x,f2x: fix endianess in slow fallback flash write
flash/nor/stm32f1x: allow write fallback for flash options
flash/nor/stm32f1x: remove write alignment code
flash/nor/stm32f1x: tidy up async algo supporting code
flash/nor/stm32f1x: unify flash error reporting
flash/nor/stm32f1x: lock flash in case of error
flash/stm32f1x: add support for RISC-V GigaDevice GD32VF103
tcl/target/gd32vf103: add flash bank
flash/nor/stm32f1x: add can_load_options flag for GD32F1x0, F3x0 and E23x
target: document possibly unreachable target in deinit_target()
doc: prevent writing "topic:" to commit message
target/riscv: fix 'reset run' after 'reset halt'
target: fix clang static analyzer warning
flash/nor/core, target: don't ask for working mem if no target algo
target/riscv: drop unused variable registers_initialized
flash/nor/numicro: remove useless architecture check
target/riscv: use struct riscv_info instead of typedef riscv_info_t
target/riscv: add common magic
flash/nor/fespi: check target type
target/cortex_a: remove unused CORTEX_A15_COMMON_MAGIC
target: fix unaligned return of target_get_working_area_avail()
flash/nor: remove useless setting of bus_width and chip_width
target: consolidate existing target/algo common_magic
target/aarch64: fix duplicate common magic
target: move parent target structs just after common_magic
target/cortex_m: prevent segmentation fault in cortex_m_poll()
target/arm: make 'arm core_state' command compatible with Cortex-M
target/arm: do not expose 'arm reg', 'arm mcr/mrc' commands on Cortex-M
target/cortex_m: supress historical reset detection
jtag/drivers/kitprog: use HID read timeout
jtag/drivers/kitprog: workaround serious firmware problem
server/server: fix target timer timing
flash/nor/core: remove unused define
flash/nor/nrf5: don't misuse uint32_t for refcount
flash/nor/bluenrg-x: clarify target algo stack usage
Toms Stūrmanis (2):
src/flash/nor: flash driver for RSL10
flash/nor/rsl10: Check return value
Wealian Liao (1):
flash/nor: add support for Nuvoton NPCX series flash
Yasushi SHOJI (11):
target: Remove redundant initialization of endianness
doc: Group adapter sub-commands
server: gdb_server: Add colon for target extended-remote
target: cortex_m: Fix a typo VECTRESET
helper: Remove src/helper from include dirs
gitignore: Add GNU Global tag files
doc/openocd.texi: Document add_help_text and add_usage_text
doc/openocd.texi: Document usage command
target/target: Check checksum_memory before call
doc/openocd.texi: Document command mode command
doc/openocd.texi: Document find and ocd_find command
Yun Liu (1):
remote_bitbang: Add Windows support
Zoltán Dudás (1):
semihosting: User defined operation, Tcl command exec on host
asier70 (2):
flash/nor/stm32f1x: Add support for GD32F1x0/3x0
flash/nor/stm32f1x: Add support for GD32E23x
fatalc (1):
target/disassembler: update capstone include path to <capstone.h>
iysheng (1):
target/arm: Add support with identify STAR-MC1
jihongbin (1):
drivers/cmsis-dap: Correct the DAP protocol parameter parsing error
micbis (4):
target/arm_adi_v5: Fix clear sticky overrun flag during replay of commands
target/renesas_rz_g2: Introduce tcl config file for RZ/G2 devices
tcl/target/renesas_rz_g2: Added RZ/G2LC and RZ/G2UL
tcl/target/renesas_rz_five: Added RZ/Five
root (1):
target/adi_v5_jtag: Add support for 8-bit IR JTAG-DP
-----------------------------------------------------------------------
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 17:43:33
|
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 b89cf71e2b5e4dc2c31cf085aec7a19515e2a9d6 (commit)
via 5e7612eb4c87e8e7a7000b42ff5d0f7e5c70fc42 (commit)
from 382148e4dd437978997d668f6ec715ddcec1c46e (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 b89cf71e2b5e4dc2c31cf085aec7a19515e2a9d6
Author: Paul Fertser <fer...@gm...>
Date: Sun Sep 18 20:40:13 2022 +0300
Restore +dev suffix
Signed-off-by: Paul Fertser <fer...@gm...>
diff --git a/configure.ac b/configure.ac
index 29a94d409..cfd23846b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
AC_PREREQ([2.69])
-AC_INIT([openocd], [0.12.0-rc1],
+AC_INIT([openocd], [0.12.0-rc1+dev],
[OpenOCD Mailing List <ope...@li...>])
AC_CONFIG_SRCDIR([src/openocd.c])
AC_CONFIG_AUX_DIR([build-aux])
commit 5e7612eb4c87e8e7a7000b42ff5d0f7e5c70fc42
Author: Antonio Borneo <bor...@gm...>
Date: Wed Mar 10 23:10:51 2021 +0100
The openocd-0.12.0-rc1 release candidate
Change-Id: I790a6b13962649037c97e32d562dffd58d3daf3c
Signed-off-by: Antonio Borneo <bor...@gm...>
diff --git a/NEWS b/NEWS
index 9db6c5fee..50cb98439 100644
--- a/NEWS
+++ b/NEWS
@@ -2,29 +2,126 @@ This file includes highlights of the changes made in the OpenOCD
source archive release.
JTAG Layer:
+ * add default to adapter speed when unspecified (100 kHz)
+ * AM335X gpio (BeagleBones) adapter driver
+ * BCM2835 support for SWD
+ * Cadence Virtual Debug (vdebug) adapter driver
+ * CMSIS-DAP support for SWO and SWD multidrop
+ * Espressif USB JTAG Programmer adapter driver
+ * Remote bitbang support for Windows host
+ * ST-LINK add TCP server support to adapter driver
+ * SWD multidrop support
Boundary Scan:
Target Layer:
+ * aarch64: support watchpoints
+ * arm: support independent TPIU and SWO for trace
+ * arm adi v5: support Large Physical Address Extension
+ * arm adi v6: support added, for jtag and swd transport
+ * cortex_a: support watchpoints
+ * elf 64bit load support
+ * Espressif: support ESP32, ESP32-S2 and ESP32-S3 cores
+ * semihosting: support user defined operations
+ * Xtensa: support Xtensa LX architecture via JTAG and ADIv5 DAP
Flash Layer:
+ * Atmel/Microchip SAM E51G18A, E51G19A, R35J18B, LAN9255 support
+ * GigaDevice GD32E23x, GD32F1x0/3x0, GD32VF103 support
+ * Nuvoton NPCX series support
+ * onsemi RSL10 support
+ * Raspberry Pi Pico RP2040 support
+ * ST BlueNRG-LPS support
+ * ST STM32 G05x, G06x, G0Bx, G0Cx, U57x, U58x, WB1x, WL5x support
+ * ST STM32 G0, G4, L4, L4+, L5, WB, WL OTP support
Board, Target, and Interface Configuration Scripts:
+ * Ampere Computing eMAG8180, Altra ("Quicksilver") and Altra Max ("Mystique") board config
+ * Cadence KC705 FPGA (Xtensa Development Platform) via JTAG and ADIv5 DAP board config
+ * Digilent Nexys Video board config
+ * Espressif ESP32 ETHERNET-KIT and WROVER-KIT board config
+ * Espressif ESP32 via ESP USB Bridge generic board config
+ * Espressif ESP32-S2 Kaluga 1 board config
+ * Espressif ESP32-S2 with ESP USB Bridge board config
+ * Espressif ESP32-S3 example board config
+ * Kontron SMARC-sAL28 board config
+ * LambdaConcept ECPIX-5 board config
+ * Microchip ATSAMA5D27-SOM1-EK1 board config
+ * Microchip EVB-LAN9255 board config
+ * Microchip SAME51 Curiosity Nano board config
+ * NXP FRDM-K64F, LS1046ARDB and LS1088ARDB board config
+ * NXP RT6XX board config
+ * Olimex H405 board config
+ * Radiona ULX3S board config
+ * Raspberry Pi 3 and Raspberry Pi 4 model B board config
+ * Raspberry Pi Pico-Debug board config
+ * Renesas R-Car V3U Falcon board config
+ * ST BlueNRG-LPS steval-idb012v1 board config
+ * ST NUCLEO-8S208RB board config
+ * ST NUCLEO-G031K8, NUCLEO-G070RB, NUCLEO-G071RB board config
+ * ST NUCLEO-G431KB, NUCLEO-G431RB, NUCLEO-G474RE board config
+ * ST STM32MP13x-DK board config
+ * TI AM625 EVM, AM642 EVM and AM654 EVM board config
+ * TI J721E EVM, J721S2 EVM and J7200 EVM board config
+ * Ampere Computing eMAG, Altra ("Quicksilver") and Altra Max ("Mystique") target config
+ * Cadence Xtensa generic and Xtensa VDebug target config
+ * Broadcom BCM2711, BCM2835, BCM2836 and BCM2837 target config
+ * Espressif ESP32, ESP32-S2 and ESP32-S3 target config
+ * Microchip ATSAMA5D2 series target config
+ * NanoXplore NG-Ultra SoC target config
+ * NXP IMX8QM target config
+ * NXP LS1028A, LS1046A and LS1088A target config
+ * NXP RT600 (Xtensa HiFi DSP) target config
+ * onsemi RSL10 target config
+ * Raspberry Pi Pico RP2040 target config
+ * Renesas R8A779A0 V3U target config
+ * Renesas RZ/Five target config
+ * Renesas RZ/G2 MPU family target config
+ * Rockchip RK3399 target config
+ * ST BlueNRG-LPS target config
+ * ST STM32MP13x target config
+ * TI AM625, AM654, J721E and J721S2 target config
+ * Ashling Opella-LD interface config
+ * Aspeed AST2600 linuxgpiod based interface config
+ * Blinkinlabs JTAG_Hat interface config
+ * Cadence Virtual Debug (vdebug) interface config
+ * Espressif ESP32-S2 Kaluga 1 board's interface config
+ * Espressif USB Bridge jtag interface config
+ * Infineon DAP miniWiggler V3 interface config
+ * PLS SPC5 interface config
+ * Tigard interface config
+ * Lattice MachXO3 family FPGA config
Server Layer:
+ * GDB: add per-target remote protocol extensions
+ * GDB: more 'Z' packets support
+ * IPDBG JtagHost server functionality
+ * semihosting: I/O redirection to TCP server
+ * telnet: support for command's autocomplete
RTOS:
+ * 'none' rtos support
+ * Zephyr rtos support
Documentation:
Build and Release:
+ * Add json extension to jimtcl build
+ * Drop dependency from libusb0
+ * Drop repository repo.or.cz for submodules
+ * Move gerrit to https://review.openocd.org/
+ * Require autoconf 2.69 or newer
+ * Update jep106 to revision JEP106BE
+ * Update jimtcl to version 0.81
+ * Update libjaylink to version 0.3.1
+ * New configure flag '--enable-jimtcl-maintainer' for jimtcl build
This release also contains a number of other important functional and
cosmetic bugfixes. For more details about what has changed since the
last release, see the git repository history:
-http://sourceforge.net/p/openocd/code/ci/v0.x.0/log/?path=
+http://sourceforge.net/p/openocd/code/ci/v0.12.0-rc1/log/?path=
For older NEWS, see the NEWS files associated with each release
diff --git a/README b/README
index 34dac0b1b..3c07d7cfe 100644
--- a/README
+++ b/README
@@ -101,17 +101,18 @@ Supported hardware
JTAG adapters
-------------
-AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
-Bus Blaster, Buspirate, Cadence DPI, Chameleon, CMSIS-DAP, Cortino,
-Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
-embedded projects, eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
+AICE, AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
+Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
+Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
+embedded projects, Espressif USB JTAG Programmer,
+eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
-sysfsgpio, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
+sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
Xverve.
@@ -121,16 +122,18 @@ Debug targets
ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
FA526, Feroceon/Dragonite, XScale.
ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
-Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8.
+ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8,
+Xtensa.
Flash drivers
-------------
ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
-i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
+GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
-NUC910, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6, Renesas RPC HF and SH QSPI,
+NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
+Raspberry RP2040, Renesas RPC HF and SH QSPI,
S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
diff --git a/configure.ac b/configure.ac
index 8e1f11e2d..29a94d409 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
AC_PREREQ([2.69])
-AC_INIT([openocd], [0.11.0+dev],
+AC_INIT([openocd], [0.12.0-rc1],
[OpenOCD Mailing List <ope...@li...>])
AC_CONFIG_SRCDIR([src/openocd.c])
AC_CONFIG_AUX_DIR([build-aux])
-----------------------------------------------------------------------
Summary of changes:
NEWS | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
README | 19 +++++++-----
configure.ac | 2 +-
3 files changed, 110 insertions(+), 10 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:23:11
|
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 382148e4dd437978997d668f6ec715ddcec1c46e (commit)
from 5be78fafa9b7c9354956fa72c69dbb82338f6e4a (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 382148e4dd437978997d668f6ec715ddcec1c46e
Author: Antonio Borneo <bor...@gm...>
Date: Tue Aug 30 17:01:12 2022 +0200
openocd: fix SPDX tag format for files .c
With the old checkpatch we cannot use the correct format for the
SPDX tags in the file .c, in fact the C99 comments are not allowed
and we had to use the block comment.
With the new checkpatch, let's switch to the correct SPDX format.
Change created automatically through the command:
sed -i \
's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \
$(find src/ contrib/ -name \*.c)
Change-Id: I6da16506baa7af718947562505dd49606d124171
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7153
Tested-by: jenkins
diff --git a/contrib/itmdump.c b/contrib/itmdump.c
index f31e1ff75..e7523d9bc 100644
--- a/contrib/itmdump.c
+++ b/contrib/itmdump.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-3.0-or-later */
+// SPDX-License-Identifier: GPL-3.0-or-later
/* Copyright (C) 2010 by David Brownell */
diff --git a/contrib/libdcc/dcc_stdio.c b/contrib/libdcc/dcc_stdio.c
index eab050eaf..9ad633b61 100644
--- a/contrib/libdcc/dcc_stdio.c
+++ b/contrib/libdcc/dcc_stdio.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2008 by Dominic Rath *
diff --git a/contrib/libdcc/example.c b/contrib/libdcc/example.c
index e8b275a94..7c7d93670 100644
--- a/contrib/libdcc/example.c
+++ b/contrib/libdcc/example.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2008 by Spencer Oliver *
diff --git a/contrib/list_example.c b/contrib/list_example.c
index 0f62b864b..4fcfcdf34 100644
--- a/contrib/list_example.c
+++ b/contrib/list_example.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/* Copyright (C) 2021 by Andreas Fritiofson <and...@gm...> */
/*
diff --git a/contrib/loaders/checksum/riscv_crc.c b/contrib/loaders/checksum/riscv_crc.c
index 70476ad1f..9931af5ff 100644
--- a/contrib/loaders/checksum/riscv_crc.c
+++ b/contrib/loaders/checksum/riscv_crc.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/* Copyright (C) 2009-2021 Free Software Foundation, Inc. */
diff --git a/contrib/loaders/flash/at91sam7x/dcc.c b/contrib/loaders/flash/at91sam7x/dcc.c
index fea88f6a1..ee95a3444 100644
--- a/contrib/loaders/flash/at91sam7x/dcc.c
+++ b/contrib/loaders/flash/at91sam7x/dcc.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Pavel Chromy *
diff --git a/contrib/loaders/flash/at91sam7x/main.c b/contrib/loaders/flash/at91sam7x/main.c
index b896d2bf2..a29c6e605 100644
--- a/contrib/loaders/flash/at91sam7x/main.c
+++ b/contrib/loaders/flash/at91sam7x/main.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Pavel Chromy *
diff --git a/contrib/loaders/flash/at91sam7x/samflash.c b/contrib/loaders/flash/at91sam7x/samflash.c
index 6e4c49575..fcb76fbf9 100644
--- a/contrib/loaders/flash/at91sam7x/samflash.c
+++ b/contrib/loaders/flash/at91sam7x/samflash.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Pavel Chromy *
diff --git a/contrib/loaders/flash/bluenrg-x/bluenrg-x_write.c b/contrib/loaders/flash/bluenrg-x/bluenrg-x_write.c
index f4e43cda1..1bc72d592 100644
--- a/contrib/loaders/flash/bluenrg-x/bluenrg-x_write.c
+++ b/contrib/loaders/flash/bluenrg-x/bluenrg-x_write.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/* To be built with arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 -O3 bluenrgx.c */
/* Then postprocess output of command "arm-none-eabi-objdump -d bluenrgx.o" to make a C array of bytes */
diff --git a/contrib/loaders/flash/cc26xx/flash.c b/contrib/loaders/flash/cc26xx/flash.c
index 3aba82cba..affd02955 100644
--- a/contrib/loaders/flash/cc26xx/flash.c
+++ b/contrib/loaders/flash/cc26xx/flash.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/cc26xx/flashloader.c b/contrib/loaders/flash/cc26xx/flashloader.c
index ef3a4fccf..8e9636d45 100644
--- a/contrib/loaders/flash/cc26xx/flashloader.c
+++ b/contrib/loaders/flash/cc26xx/flashloader.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/cc26xx/main.c b/contrib/loaders/flash/cc26xx/main.c
index 91fc43ac1..6b626a3b8 100644
--- a/contrib/loaders/flash/cc26xx/main.c
+++ b/contrib/loaders/flash/cc26xx/main.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/cc26xx/startup.c b/contrib/loaders/flash/cc26xx/startup.c
index 9eb0df8ef..3117eb10a 100644
--- a/contrib/loaders/flash/cc26xx/startup.c
+++ b/contrib/loaders/flash/cc26xx/startup.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/fespi/riscv_fespi.c b/contrib/loaders/flash/fespi/riscv_fespi.c
index 5323f92bf..17ae2fd22 100644
--- a/contrib/loaders/flash/fespi/riscv_fespi.c
+++ b/contrib/loaders/flash/fespi/riscv_fespi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdbool.h>
#include <stdint.h>
diff --git a/contrib/loaders/flash/gd32vf103/gd32vf103.c b/contrib/loaders/flash/gd32vf103/gd32vf103.c
index 69225a026..927014c74 100644
--- a/contrib/loaders/flash/gd32vf103/gd32vf103.c
+++ b/contrib/loaders/flash/gd32vf103/gd32vf103.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdint.h>
diff --git a/contrib/loaders/flash/msp432/driverlib.c b/contrib/loaders/flash/msp432/driverlib.c
index e9058793c..6f483b83d 100644
--- a/contrib/loaders/flash/msp432/driverlib.c
+++ b/contrib/loaders/flash/msp432/driverlib.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/msp432/main_msp432e4x.c b/contrib/loaders/flash/msp432/main_msp432e4x.c
index db9514a9c..7974f48c7 100644
--- a/contrib/loaders/flash/msp432/main_msp432e4x.c
+++ b/contrib/loaders/flash/msp432/main_msp432e4x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/msp432/main_msp432p401x.c b/contrib/loaders/flash/msp432/main_msp432p401x.c
index 7d959a741..47fb7fa47 100644
--- a/contrib/loaders/flash/msp432/main_msp432p401x.c
+++ b/contrib/loaders/flash/msp432/main_msp432p401x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/msp432/main_msp432p411x.c b/contrib/loaders/flash/msp432/main_msp432p411x.c
index d72efed68..efc05a3b7 100644
--- a/contrib/loaders/flash/msp432/main_msp432p411x.c
+++ b/contrib/loaders/flash/msp432/main_msp432p411x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/msp432/startup_msp432e4.c b/contrib/loaders/flash/msp432/startup_msp432e4.c
index bd8fc2173..49789609f 100644
--- a/contrib/loaders/flash/msp432/startup_msp432e4.c
+++ b/contrib/loaders/flash/msp432/startup_msp432e4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/msp432/startup_msp432p4.c b/contrib/loaders/flash/msp432/startup_msp432p4.c
index f8ad811f2..350fd35e8 100644
--- a/contrib/loaders/flash/msp432/startup_msp432p4.c
+++ b/contrib/loaders/flash/msp432/startup_msp432p4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/contrib/loaders/flash/npcx/npcx_flash.c b/contrib/loaders/flash/npcx/npcx_flash.c
index d60624ae8..7d59123aa 100644
--- a/contrib/loaders/flash/npcx/npcx_flash.c
+++ b/contrib/loaders/flash/npcx/npcx_flash.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2020 by Nuvoton Technology Corporation
diff --git a/contrib/loaders/flash/stm32/stm32l4x.c b/contrib/loaders/flash/stm32/stm32l4x.c
index 54c88a335..b657ec9ae 100644
--- a/contrib/loaders/flash/stm32/stm32l4x.c
+++ b/contrib/loaders/flash/stm32/stm32l4x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/**
* Copyright (C) 2021 Tarek BOCHKATI
diff --git a/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c b/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
index 28136a59e..9294837e3 100644
--- a/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
+++ b/contrib/remote_bitbang/remote_bitbang_sysfsgpio.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 Paul Fertser <fer...@gm...> *
diff --git a/contrib/rtos-helpers/FreeRTOS-openocd.c b/contrib/rtos-helpers/FreeRTOS-openocd.c
index 45fc0ce10..000453d5d 100644
--- a/contrib/rtos-helpers/FreeRTOS-openocd.c
+++ b/contrib/rtos-helpers/FreeRTOS-openocd.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Since at least FreeRTOS V7.5.3 uxTopUsedPriority is no longer
diff --git a/contrib/rtos-helpers/uCOS-III-openocd.c b/contrib/rtos-helpers/uCOS-III-openocd.c
index 1e9cba4dc..9869adf7e 100644
--- a/contrib/rtos-helpers/uCOS-III-openocd.c
+++ b/contrib/rtos-helpers/uCOS-III-openocd.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* uC/OS-III does not provide a fixed layout for OS_TCB, which makes it
diff --git a/src/flash/common.c b/src/flash/common.c
index dfd6aca80..ebd9396eb 100644
--- a/src/flash/common.c
+++ b/src/flash/common.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by Zachary T Welch <zw...@su...> *
diff --git a/src/flash/nand/arm_io.c b/src/flash/nand/arm_io.c
index cc6a880a0..80bd0cf25 100644
--- a/src/flash/nand/arm_io.c
+++ b/src/flash/nand/arm_io.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2009 by Marvell Semiconductors, Inc.
diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c
index 59345ee34..bfbba67c4 100644
--- a/src/flash/nand/at91sam9.c
+++ b/src/flash/nand/at91sam9.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2009 by Dean Glazeski
diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c
index 2720bc67d..37e1d12e0 100644
--- a/src/flash/nand/core.c
+++ b/src/flash/nand/core.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nand/davinci.c b/src/flash/nand/davinci.c
index 28e31f2a4..b7169feeb 100644
--- a/src/flash/nand/davinci.c
+++ b/src/flash/nand/davinci.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by David Brownell *
diff --git a/src/flash/nand/driver.c b/src/flash/nand/driver.c
index 4655606b7..02e5c09a2 100644
--- a/src/flash/nand/driver.c
+++ b/src/flash/nand/driver.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nand/ecc.c b/src/flash/nand/ecc.c
index c6ef20b4c..20b8ba85d 100644
--- a/src/flash/nand/ecc.c
+++ b/src/flash/nand/ecc.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later WITH eCos-exception-2.0 */
+// SPDX-License-Identifier: GPL-2.0-or-later WITH eCos-exception-2.0
/*
* This file contains an ECC algorithm from Toshiba that allows for detection
diff --git a/src/flash/nand/ecc_kw.c b/src/flash/nand/ecc_kw.c
index beaeb121b..cea1a5a0a 100644
--- a/src/flash/nand/ecc_kw.c
+++ b/src/flash/nand/ecc_kw.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Reed-Solomon ECC handling for the Marvell Kirkwood SOC
diff --git a/src/flash/nand/fileio.c b/src/flash/nand/fileio.c
index 2bfbd6983..ca618b375 100644
--- a/src/flash/nand/fileio.c
+++ b/src/flash/nand/fileio.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nand/lpc3180.c b/src/flash/nand/lpc3180.c
index 5b7cc1a9a..c1af1d737 100644
--- a/src/flash/nand/lpc3180.c
+++ b/src/flash/nand/lpc3180.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath *
diff --git a/src/flash/nand/lpc32xx.c b/src/flash/nand/lpc32xx.c
index ea282ba2b..2c578d1b4 100644
--- a/src/flash/nand/lpc32xx.c
+++ b/src/flash/nand/lpc32xx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath *
diff --git a/src/flash/nand/mx3.c b/src/flash/nand/mx3.c
index d2670bd5d..86e94685b 100644
--- a/src/flash/nand/mx3.c
+++ b/src/flash/nand/mx3.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
diff --git a/src/flash/nand/mxc.c b/src/flash/nand/mxc.c
index 715e1cbbb..845a3bb9a 100644
--- a/src/flash/nand/mxc.c
+++ b/src/flash/nand/mxc.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by Alexei Babich *
diff --git a/src/flash/nand/nonce.c b/src/flash/nand/nonce.c
index db908686d..bce4ed0f9 100644
--- a/src/flash/nand/nonce.c
+++ b/src/flash/nand/nonce.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 Zachary T Welch <zw...@su...> *
diff --git a/src/flash/nand/nuc910.c b/src/flash/nand/nuc910.c
index 4ec7f16fc..d7f69e6ae 100644
--- a/src/flash/nand/nuc910.c
+++ b/src/flash/nand/nuc910.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Spencer Oliver *
diff --git a/src/flash/nand/orion.c b/src/flash/nand/orion.c
index b2710e64c..7b19cbd24 100644
--- a/src/flash/nand/orion.c
+++ b/src/flash/nand/orion.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by Marvell Semiconductors, Inc. *
diff --git a/src/flash/nand/s3c2410.c b/src/flash/nand/s3c2410.c
index 721ed9dd2..98268ebcc 100644
--- a/src/flash/nand/s3c2410.c
+++ b/src/flash/nand/s3c2410.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007, 2008 by Ben Dooks *
diff --git a/src/flash/nand/s3c2412.c b/src/flash/nand/s3c2412.c
index f67368913..0eec35f50 100644
--- a/src/flash/nand/s3c2412.c
+++ b/src/flash/nand/s3c2412.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007, 2008 by Ben Dooks *
diff --git a/src/flash/nand/s3c2440.c b/src/flash/nand/s3c2440.c
index 424d6d241..789144cbd 100644
--- a/src/flash/nand/s3c2440.c
+++ b/src/flash/nand/s3c2440.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007, 2008 by Ben Dooks *
diff --git a/src/flash/nand/s3c2443.c b/src/flash/nand/s3c2443.c
index fcd904011..7166702ab 100644
--- a/src/flash/nand/s3c2443.c
+++ b/src/flash/nand/s3c2443.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007, 2008 by Ben Dooks *
diff --git a/src/flash/nand/s3c24xx.c b/src/flash/nand/s3c24xx.c
index f2311ccaa..5c2f2bc3f 100644
--- a/src/flash/nand/s3c24xx.c
+++ b/src/flash/nand/s3c24xx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007, 2008 by Ben Dooks *
diff --git a/src/flash/nand/s3c6400.c b/src/flash/nand/s3c6400.c
index bca068e85..aebe0443b 100644
--- a/src/flash/nand/s3c6400.c
+++ b/src/flash/nand/s3c6400.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Peter Korsgaard <ja...@su...> *
diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c
index 79a386eed..4bb15faae 100644
--- a/src/flash/nand/tcl.c
+++ b/src/flash/nand/tcl.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nor/aduc702x.c b/src/flash/nor/aduc702x.c
index af846c2b4..ea7f5e373 100644
--- a/src/flash/nor/aduc702x.c
+++ b/src/flash/nor/aduc702x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2008 by Kevin McGuire *
diff --git a/src/flash/nor/aducm360.c b/src/flash/nor/aducm360.c
index ffa1bbaf4..ce9bf2445 100644
--- a/src/flash/nor/aducm360.c
+++ b/src/flash/nor/aducm360.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 by Ivan Buliev *
diff --git a/src/flash/nor/ambiqmicro.c b/src/flash/nor/ambiqmicro.c
index 4c4a642d5..2b458bc8f 100644
--- a/src/flash/nor/ambiqmicro.c
+++ b/src/flash/nor/ambiqmicro.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
+// SPDX-License-Identifier: BSD-3-Clause
/******************************************************************************
*
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index 431e2a3a0..fb6d98b56 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code) */
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code)
/*
* Copyright (C) 2009 by Duane Ellis <op...@du...>
diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c
index 556484adf..6b9437390 100644
--- a/src/flash/nor/at91sam4.c
+++ b/src/flash/nor/at91sam4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code) */
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code)
/*
* Copyright (C) 2009 by Duane Ellis <op...@du...>
diff --git a/src/flash/nor/at91sam4l.c b/src/flash/nor/at91sam4l.c
index 99e289f3f..ddf42a8c5 100644
--- a/src/flash/nor/at91sam4l.c
+++ b/src/flash/nor/at91sam4l.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andrey Yurovsky *
diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c
index e18635b6d..8d8cf2226 100644
--- a/src/flash/nor/at91sam7.c
+++ b/src/flash/nor/at91sam7.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2006 by Magnus Lundin *
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c
index dd7c5f54f..a0252a276 100644
--- a/src/flash/nor/at91samd.c
+++ b/src/flash/nor/at91samd.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andrey Yurovsky *
diff --git a/src/flash/nor/ath79.c b/src/flash/nor/ath79.c
index ff8b1bcd3..1d1ec02b3 100644
--- a/src/flash/nor/ath79.c
+++ b/src/flash/nor/ath79.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 by Tobias Diedrich *
diff --git a/src/flash/nor/atsame5.c b/src/flash/nor/atsame5.c
index 163d142e3..fdd610f5f 100644
--- a/src/flash/nor/atsame5.c
+++ b/src/flash/nor/atsame5.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2017 by Tomas Vanek *
diff --git a/src/flash/nor/atsamv.c b/src/flash/nor/atsamv.c
index 857ad584b..67533fc1e 100644
--- a/src/flash/nor/atsamv.c
+++ b/src/flash/nor/atsamv.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code) */
+// SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-Source-Code)
/*
* Copyright (C) 2009 by Duane Ellis <op...@du...>
diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c
index 900d8806a..0e2e263ce 100644
--- a/src/flash/nor/avrf.c
+++ b/src/flash/nor/avrf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by Simon Qian *
diff --git a/src/flash/nor/bluenrg-x.c b/src/flash/nor/bluenrg-x.c
index ec5cae76e..9ced2e971 100644
--- a/src/flash/nor/bluenrg-x.c
+++ b/src/flash/nor/bluenrg-x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2017 by Michele Sardo *
diff --git a/src/flash/nor/cc26xx.c b/src/flash/nor/cc26xx.c
index 9fbb880b4..6256ba6e7 100644
--- a/src/flash/nor/cc26xx.c
+++ b/src/flash/nor/cc26xx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2017 by Texas Instruments, Inc. *
diff --git a/src/flash/nor/cc3220sf.c b/src/flash/nor/cc3220sf.c
index 6493d6c83..432a393f8 100644
--- a/src/flash/nor/cc3220sf.c
+++ b/src/flash/nor/cc3220sf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2017 by Texas Instruments, Inc. *
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index affbcae23..78bc91e7d 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005, 2007 by Dominic Rath *
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index ec4ca05db..5e6c97152 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
index ee54ef2d6..b9353d820 100644
--- a/src/flash/nor/drivers.c
+++ b/src/flash/nor/drivers.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 Zachary T Welch <zw...@su...> *
diff --git a/src/flash/nor/dsp5680xx_flash.c b/src/flash/nor/dsp5680xx_flash.c
index d04b0d651..b1625f11f 100644
--- a/src/flash/nor/dsp5680xx_flash.c
+++ b/src/flash/nor/dsp5680xx_flash.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2011 by Rodrigo L. Rosa *
diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c
index 04b03c7d9..3a49afc9c 100644
--- a/src/flash/nor/efm32.c
+++ b/src/flash/nor/efm32.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c
index 63302f68a..043494c78 100644
--- a/src/flash/nor/em357.c
+++ b/src/flash/nor/em357.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/esirisc_flash.c b/src/flash/nor/esirisc_flash.c
index c30eba894..938d0f6af 100644
--- a/src/flash/nor/esirisc_flash.c
+++ b/src/flash/nor/esirisc_flash.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2018 by Square, Inc. *
diff --git a/src/flash/nor/faux.c b/src/flash/nor/faux.c
index 542a57458..e76dc493f 100644
--- a/src/flash/nor/faux.c
+++ b/src/flash/nor/faux.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 Ãyvind Harboe *
diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c
index c61b708b1..9191764a9 100644
--- a/src/flash/nor/fespi.c
+++ b/src/flash/nor/fespi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Antonio Borneo <bor...@gm...> *
diff --git a/src/flash/nor/fm3.c b/src/flash/nor/fm3.c
index 99fa02cc3..48f4493ab 100644
--- a/src/flash/nor/fm3.c
+++ b/src/flash/nor/fm3.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2011 by Marc Willam, Holger Wech *
diff --git a/src/flash/nor/fm4.c b/src/flash/nor/fm4.c
index 3a362d888..979ae84d0 100644
--- a/src/flash/nor/fm4.c
+++ b/src/flash/nor/fm4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Spansion FM4 flash
diff --git a/src/flash/nor/jtagspi.c b/src/flash/nor/jtagspi.c
index ba1160ad5..c176ca810 100644
--- a/src/flash/nor/jtagspi.c
+++ b/src/flash/nor/jtagspi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 Robert Jordens <jo...@gm...> *
diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c
index 239cf4164..7137b4aa0 100644
--- a/src/flash/nor/kinetis.c
+++ b/src/flash/nor/kinetis.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2011 by Mathias Kuester *
diff --git a/src/flash/nor/kinetis_ke.c b/src/flash/nor/kinetis_ke.c
index 14e53f15d..c069f3ac8 100644
--- a/src/flash/nor/kinetis_ke.c
+++ b/src/flash/nor/kinetis_ke.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 by Ivan Meleca *
diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c
index 473df06ef..f12eef7e4 100644
--- a/src/flash/nor/lpc2000.c
+++ b/src/flash/nor/lpc2000.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/lpc288x.c b/src/flash/nor/lpc288x.c
index e1cc38fb3..3006db1cb 100644
--- a/src/flash/nor/lpc288x.c
+++ b/src/flash/nor/lpc288x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2008 by *
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c
index 494fd66c7..c30fa7637 100644
--- a/src/flash/nor/lpc2900.c
+++ b/src/flash/nor/lpc2900.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 by *
diff --git a/src/flash/nor/lpcspifi.c b/src/flash/nor/lpcspifi.c
index 734730484..f950f21db 100644
--- a/src/flash/nor/lpcspifi.c
+++ b/src/flash/nor/lpcspifi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2012 by George Harris *
diff --git a/src/flash/nor/max32xxx.c b/src/flash/nor/max32xxx.c
index 83eb57e68..51d6ae271 100644
--- a/src/flash/nor/max32xxx.c
+++ b/src/flash/nor/max32xxx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2016 by Maxim Integrated *
diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c
index c144b14b6..f6285de5b 100644
--- a/src/flash/nor/mdr.c
+++ b/src/flash/nor/mdr.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/mrvlqspi.c b/src/flash/nor/mrvlqspi.c
index f896c5a3b..4eb6522be 100644
--- a/src/flash/nor/mrvlqspi.c
+++ b/src/flash/nor/mrvlqspi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2014 by Mahavir Jain <mj...@ma...> *
diff --git a/src/flash/nor/msp432.c b/src/flash/nor/msp432.c
index 6adf6c34b..d9b9695df 100644
--- a/src/flash/nor/msp432.c
+++ b/src/flash/nor/msp432.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2018 by Texas Instruments, Inc. *
diff --git a/src/flash/nor/niietcm4.c b/src/flash/nor/niietcm4.c
index 00a4a1764..0c36e2c96 100644
--- a/src/flash/nor/niietcm4.c
+++ b/src/flash/nor/niietcm4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 by Bogdan Kolbov *
diff --git a/src/flash/nor/non_cfi.c b/src/flash/nor/non_cfi.c
index 5c05fb3b7..f096ba69c 100644
--- a/src/flash/nor/non_cfi.c
+++ b/src/flash/nor/non_cfi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath *
diff --git a/src/flash/nor/npcx.c b/src/flash/nor/npcx.c
index ec999e24a..bc8475346 100644
--- a/src/flash/nor/npcx.c
+++ b/src/flash/nor/npcx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2020 by Nuvoton Technology Corporation
diff --git a/src/flash/nor/nrf5.c b/src/flash/nor/nrf5.c
index 9d2565b01..d5de4a464 100644
--- a/src/flash/nor/nrf5.c
+++ b/src/flash/nor/nrf5.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 Synapse Product Development *
diff --git a/src/flash/nor/numicro.c b/src/flash/nor/numicro.c
index a533c4103..1a73eb26d 100644
--- a/src/flash/nor/numicro.c
+++ b/src/flash/nor/numicro.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2011 by James K. Larson *
diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c
index 4c1de632f..e00c365ed 100644
--- a/src/flash/nor/ocl.c
+++ b/src/flash/nor/ocl.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Pavel Chromy *
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index aacafa123..9a1a63412 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/psoc4.c b/src/flash/nor/psoc4.c
index 8ca1a7cfa..c935bd5f2 100644
--- a/src/flash/nor/psoc4.c
+++ b/src/flash/nor/psoc4.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/psoc5lp.c b/src/flash/nor/psoc5lp.c
index b546b0aa0..407efbcab 100644
--- a/src/flash/nor/psoc5lp.c
+++ b/src/flash/nor/psoc5lp.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* PSoC 5LP flash driver
diff --git a/src/flash/nor/psoc6.c b/src/flash/nor/psoc6.c
index da07d8487..b7ba1027e 100644
--- a/src/flash/nor/psoc6.c
+++ b/src/flash/nor/psoc6.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* *
diff --git a/src/flash/nor/renesas_rpchf.c b/src/flash/nor/renesas_rpchf.c
index 145642fbe..6c51b8f67 100644
--- a/src/flash/nor/renesas_rpchf.c
+++ b/src/flash/nor/renesas_rpchf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Renesas RCar Gen3 RPC Hyperflash driver
diff --git a/src/flash/nor/rp2040.c b/src/flash/nor/rp2040.c
index fb34172d2..667498ca3 100644
--- a/src/flash/nor/rp2040.c
+++ b/src/flash/nor/rp2040.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/src/flash/nor/rsl10.c b/src/flash/nor/rsl10.c
index ef501f4ee..d92c4b8b1 100644
--- a/src/flash/nor/rsl10.c
+++ b/src/flash/nor/rsl10.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2022 by Toms Stūrmanis *
diff --git a/src/flash/nor/sfdp.c b/src/flash/nor/sfdp.c
index e177a1945..5bfb54194 100644
--- a/src/flash/nor/sfdp.c
+++ b/src/flash/nor/sfdp.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2019 by Andreas Bolsch <and...@mn... *
diff --git a/src/flash/nor/sh_qspi.c b/src/flash/nor/sh_qspi.c
index 691c137dc..e8ca626df 100644
--- a/src/flash/nor/sh_qspi.c
+++ b/src/flash/nor/sh_qspi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
+// SPDX-License-Identifier: GPL-2.0-only
/*
* SH QSPI (Quad SPI) driver
diff --git a/src/flash/nor/sim3x.c b/src/flash/nor/sim3x.c
index eede4825f..42550d06b 100644
--- a/src/flash/nor/sim3x.c
+++ b/src/flash/nor/sim3x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2014 by Ladislav Bábel *
diff --git a/src/flash/nor/spi.c b/src/flash/nor/spi.c
index 8f35d8f16..eed747b58 100644
--- a/src/flash/nor/spi.c
+++ b/src/flash/nor/spi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2018 by Andreas Bolsch *
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index aa323d636..3a78952ef 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2006 by Magnus Lundin *
diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index b00b70ac2..e882d7f79 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index 7b3f9305d..36b7a0da5 100644
--- a/src/flash/nor/stm32f2x.c
+++ b/src/flash/nor/stm32f2x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/stm32h7x.c b/src/flash/nor/stm32h7x.c
index 126caa9cd..8be803728 100644
--- a/src/flash/nor/stm32h7x.c
+++ b/src/flash/nor/stm32h7x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2017 by STMicroelectronics *
diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c
index a1108b5fd..7a6ec3fd2 100644
--- a/src/flash/nor/stm32l4x.c
+++ b/src/flash/nor/stm32l4x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 by Uwe Bonnes *
diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c
index 64073c31c..42b52c5c2 100644
--- a/src/flash/nor/stm32lx.c
+++ b/src/flash/nor/stm32lx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/stmqspi.c b/src/flash/nor/stmqspi.c
index ca4d51338..9c266e91a 100644
--- a/src/flash/nor/stmqspi.c
+++ b/src/flash/nor/stmqspi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2016 - 2019 by Andreas Bolsch *
diff --git a/src/flash/nor/stmsmi.c b/src/flash/nor/stmsmi.c
index a4339def5..1aa244728 100644
--- a/src/flash/nor/stmsmi.c
+++ b/src/flash/nor/stmsmi.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Antonio Borneo <bor...@gm...> *
diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c
index 98e0bbde0..b91e22e04 100644
--- a/src/flash/nor/str7x.c
+++ b/src/flash/nor/str7x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c
index 86ec455a1..1a26b839e 100644
--- a/src/flash/nor/str9x.c
+++ b/src/flash/nor/str9x.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c
index 28cfe5d4f..c39eb3aa8 100644
--- a/src/flash/nor/str9xpec.c
+++ b/src/flash/nor/str9xpec.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/flash/nor/swm050.c b/src/flash/nor/swm050.c
index d0cb986a0..89e59ae47 100644
--- a/src/flash/nor/swm050.c
+++ b/src/flash/nor/swm050.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2019 Icenowy Zheng <ic...@ao...> *
diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c
index c18451364..4ff6d9838 100644
--- a/src/flash/nor/tcl.c
+++ b/src/flash/nor/tcl.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath <Dom...@gm...> *
diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c
index 9fffae90a..e01d2df0a 100644
--- a/src/flash/nor/tms470.c
+++ b/src/flash/nor/tms470.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007,2008 by Christopher Kilgour *
diff --git a/src/flash/nor/virtual.c b/src/flash/nor/virtual.c
index 212d53a4c..c5e33385e 100644
--- a/src/flash/nor/virtual.c
+++ b/src/flash/nor/virtual.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Spencer Oliver *
diff --git a/src/flash/nor/w600.c b/src/flash/nor/w600.c
index 98c0f46e5..20968dcaa 100644
--- a/src/flash/nor/w600.c
+++ b/src/flash/nor/w600.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2018 by Simon Qian *
diff --git a/src/flash/nor/xcf.c b/src/flash/nor/xcf.c
index eb1e84223..287072551 100644
--- a/src/flash/nor/xcf.c
+++ b/src/flash/nor/xcf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2016 by Uladzimir Pylinski aka barthess *
diff --git a/src/flash/nor/xmc1xxx.c b/src/flash/nor/xmc1xxx.c
index 04a39f36e..6e30fc125 100644
--- a/src/flash/nor/xmc1xxx.c
+++ b/src/flash/nor/xmc1xxx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* XMC1000 flash driver
diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c
index 50ec45f66..54fd5a586 100644
--- a/src/flash/nor/xmc4xxx.c
+++ b/src/flash/nor/xmc4xxx.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/**************************************************************************
* Copyright (C) 2015 Jeff Ciesielski <jef...@gm...> *
diff --git a/src/hello.c b/src/hello.c
index db6774eaa..4a4ce01ca 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 Zachary T Welch <zw...@su...> *
diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c
index 250ca4357..5f38b43ae 100644
--- a/src/helper/binarybuffer.c
+++ b/src/helper/binarybuffer.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2004, 2005 by Dominic Rath *
diff --git a/src/helper/command.c b/src/helper/command.c
index b5c5459a1..6898e2d7c 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/helper/configuration.c b/src/helper/configuration.c
index b62279c28..16732eb3d 100644
--- a/src/helper/configuration.c
+++ b/src/helper/configuration.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2004, 2005 by Dominic Rath *
diff --git a/src/helper/fileio.c b/src/helper/fileio.c
index a4130b79c..a290a5d2f 100644
--- a/src/helper/fileio.c
+++ b/src/helper/fileio.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2007 by Dominic Rath *
diff --git a/src/helper/jep106.c b/src/helper/jep106.c
index 992452d27..d422561bc 100644
--- a/src/helper/jep106.c
+++ b/src/helper/jep106.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2015 Andreas Fritiofson *
diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c
index 0e76f96de..e1ab64ae5 100644
--- a/src/helper/jim-nvp.c
+++ b/src/helper/jim-nvp.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause-Views */
+// SPDX-License-Identifier: BSD-2-Clause-Views
/* Jim - A small embeddable Tcl interpreter
*
diff --git a/src/helper/log.c b/src/helper/log.c
index b49c9af94..e6a70a3f5 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/helper/options.c b/src/helper/options.c
index 205d5e793..327c418d0 100644
--- a/src/helper/options.c
+++ b/src/helper/options.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2004, 2005 by Dominic Rath *
diff --git a/src/helper/replacements.c b/src/helper/replacements.c
index 2cbce7f3b..b30dbd5d6 100644
--- a/src/helper/replacements.c
+++ b/src/helper/replacements.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2006 by Dominic Rath *
diff --git a/src/helper/time_support.c b/src/helper/time_support.c
index 548a71693..dda3cb3e4 100644
--- a/src/helper/time_support.c
+++ b/src/helper/time_support.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2006 by Dominic Rath *
diff --git a/src/helper/time_support_common.c b/src/helper/time_support_common.c
index 8d11602f3..9d17a315b 100644
--- a/src/helper/time_support_common.c
+++ b/src/helper/time_support_common.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2006 by Dominic Rath *
diff --git a/src/helper/util.c b/src/helper/util.c
index 397b8a211..bf18f8e60 100644
--- a/src/helper/util.c
+++ b/src/helper/util.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2010 by Ãyvind Harboe *
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index a0432b692..b7feac575 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2005 by Dominic Rath <Dom...@gm...>
* Copyright (C) 2007-2010 Ãyvind Harboe <oyv...@zy...>
diff --git a/src/jtag/aice/aice_interface.c b/src/jtag/aice/aice_interface.c
index 7c57d444d..89f82a0ae 100644
--- a/src/jtag/aice/aice_interface.c
+++ b/src/jtag/aice/aice_interface.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andes Technology *
diff --git a/src/jtag/aice/aice_pipe.c b/src/jtag/aice/aice_pipe.c
index 365195238..1ee2d88b4 100644
--- a/src/jtag/aice/aice_pipe.c
+++ b/src/jtag/aice/aice_pipe.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andes Technology *
diff --git a/src/jtag/aice/aice_port.c b/src/jtag/aice/aice_port.c
index 29188d843..ac38cec3a 100644
--- a/src/jtag/aice/aice_port.c
+++ b/src/jtag/aice/aice_port.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andes Technology *
diff --git a/src/jtag/aice/aice_transport.c b/src/jtag/aice/aice_transport.c
index be853a862..49f899ddc 100644
--- a/src/jtag/aice/aice_transport.c
+++ b/src/jtag/aice/aice_transport.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andes Technology *
diff --git a/src/jtag/aice/aice_usb.c b/src/jtag/aice/aice_usb.c
index 66cd07f63..b5d0f0b6e 100644
--- a/src/jtag/aice/aice_usb.c
+++ b/src/jtag/aice/aice_usb.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2013 by Andes Technology *
diff --git a/src/jtag/commands.c b/src/jtag/commands.c
index 8d7875af2..43cda8ad4 100644
--- a/src/jtag/commands.c
+++ b/src/jtag/commands.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2005 by Dominic Rath *
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 806ee8926..574801187 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
* Copyright (C) 2009 Zachary T Welch *
diff --git a/src/jtag/drivers/OpenULINK/src/delay.c b/src/jtag/drivers/OpenULINK/src/delay.c
index d858a8ace..b68e8148a 100644
--- a/src/jtag/drivers/OpenULINK/src/delay.c
+++ b/src/jtag/drivers/OpenULINK/src/delay.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// S...
[truncated message content] |
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:22:13
|
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 5be78fafa9b7c9354956fa72c69dbb82338f6e4a (commit)
from c8c9121e36856ebcade0a513cbaf1723070419f6 (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 5be78fafa9b7c9354956fa72c69dbb82338f6e4a
Author: Antonio Borneo <bor...@gm...>
Date: Sat May 4 17:01:23 2019 +0200
HACKING: add chapter on checkpatch
Include hints on how to skip some of the tests in some really
exceptional case.
Note: the file includes an example of commit message with a signed
off tag that triggers a checkpatch error.
Let checkpatch to ignore BAD_SIGN_OFF error.
Checkpatch-ignore: BAD_SIGN_OFF
Change-Id: I05bf0ab8008649f3f9b38452e056dc3df83a1a4f
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5609
Tested-by: jenkins
diff --git a/HACKING b/HACKING
index 96b05f2d6..be5699990 100644
--- a/HACKING
+++ b/HACKING
@@ -171,6 +171,8 @@ while(!done) {
@endcode
\note use "git add ." before commit to add new files.
+ \note check @ref checkpatch for hint about checkpatch script
+
Commit message template, notice the short first line.
The field '<c>specify touched area</c>'
should identify the main part or subsystem the patch touches.
@@ -179,7 +181,9 @@ specify touched area: short comment
<blank line>
Longer comments over several lines, explaining (where applicable) the
reason for the patch and the general idea the solution is based on,
-any major design decisions, etc...
+any major design decisions, etc. Limit each comment line's length to 75
+characters; since 75 it's too short for a URL, you can put the URL in a
+separate line preceded by 'Link: '.
<blank line>
Signed-off-by: ...
@endcode
@@ -227,6 +231,65 @@ git push review
Further reading: http://www.coreboot.org/Git
+@section checkpatch About checkpatch script
+
+OpenOCD source code includes the script checkpatch to let developers to
+verify their patches before submitting them for review (see @ref gerrit).
+
+Every patch for OpenOCD project that is submitted for review on Gerrit
+is tested by Jenkins. Jenkins will run the checkpatch script to analyze
+each patch.
+If the script highlights either errors or warnings, Gerrit will add the
+score "-1" to the patch and maintainers will probably ignore the patch,
+waiting for the developer to send a fixed version.
+
+The script checkpatch verifies the SPDX tag for new files against a very
+short list of license tags.
+If the license of your contribution is not listed there, but compatible
+with OpenOCD license, please alert the maintainers or add the missing
+license in the first patch of your patch series.
+
+The script checkpatch has been originally developed for the Linux kernel
+source code, thus includes specific tests and checks related to Linux
+coding style and to Linux code structure. While the script has been
+adapted for OpenOCD specificities, it still includes some Linux related
+test. It is then possible that it triggers sometimes some <em>false
+positive</em>!
+
+If you think that the error identified by checkpatch is a false
+positive, please report it to the openocd-devel mailing list or prepare
+a patch for fixing checkpatch and send it to Gerrit for review.
+
+\attention The procedure below is allowed only for <em>exceptional
+cases</em>. Do not use it to submit normal patches.
+
+There are <em>exceptional cases</em> in which you need to skip some of
+the tests from checkpatch in order to pass the approval from Gerrit.
+
+For example, a patch that modify one line inside a big comment block
+will not show the beginning or the end of the comment block. This can
+prevent checkpatch to detect the comment block. Checkpatch can wrongly
+consider the modified comment line as a code line, triggering a set of
+false errors.
+
+Only for <em>exceptional cases</em>, it is allowed to submit patches
+to Gerrit with the special field 'Checkpatch-ignore:' in the commit
+message. This field will cause checkpatch to ignore the error types
+listed in the field, only for the patch itself.
+The error type is printed by checkpatch on failure.
+For example the names of Windows APIs mix lower and upper case chars,
+in violation of OpenOCD coding style, triggering a 'CAMELCASE' error:
+@code
+CHECK:CAMELCASE: Avoid CamelCase: <WSAGetLastError>
+#96105: FILE: src/helper/log.c:505:
++ error_code = WSAGetLastError();
+@endcode
+Adding in the commit message of the patch the line:
+@code
+Checkpatch-ignore: CAMELCASE
+@endcode
+will force checkpatch to ignore the CAMELCASE error.
+
@section timeline When can I expect my contribution to be committed?
The code review is intended to take as long as a week or two to allow
-----------------------------------------------------------------------
Summary of changes:
HACKING | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 64 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:21:53
|
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 c8c9121e36856ebcade0a513cbaf1723070419f6 (commit)
from 01cf43aab9176f76d46b515134e8a7f3dddd416f (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 c8c9121e36856ebcade0a513cbaf1723070419f6
Author: Antonio Borneo <bor...@gm...>
Date: Sun Jun 12 14:36:35 2022 +0200
checkpatch: fix path of documentation
In OpenOCD documentation is in folder "doc".
Fix search path of 'checkpatch.rst'.
This file is used to provide verbose explanation of failing
checks while using command line flag '-v'.
Change-Id: Id864369d371cbd5a24e76bf90c54ff03159051c3
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7022
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index dc01effb4..10b0b8c25 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -78,7 +78,12 @@ my $codespell = 0;
my $codespellfile = "/usr/share/codespell/dictionary.txt";
my $user_codespellfile = "";
my $conststructsfile = "$D/const_structs.checkpatch";
+if (!$OpenOCD) {
my $docsfile = "$D/../Documentation/dev-tools/checkpatch.rst";
+} # !$OpenOCD
+# OpenOCD Specific: Begin
+my $docsfile = "$D/../../doc/checkpatch.rst";
+# OpenOCD Specific: End
my $typedefsfile;
my $color = "auto";
my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 5 +++++
1 file changed, 5 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:21:32
|
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 01cf43aab9176f76d46b515134e8a7f3dddd416f (commit)
via 9f25e470f90be7ad05b2685a624d372be6998df2 (commit)
from 496308701342032d54bfe04c6e2653be252ccd94 (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 01cf43aab9176f76d46b515134e8a7f3dddd416f
Author: Antonio Borneo <bor...@gm...>
Date: Tue Aug 30 15:28:56 2022 +0200
checkpatch: extend check for camel[0-9_]*CASE
Linux has some automatically generated macros that can trigger
camelCASE check. This forces checkpatch to only detect the pattern
[A-Z][a-z]|[a-z][A-Z]
for adjacent case transition.
In OpenOCD we do not have such case, so extend the check to
[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z]
and remove the detection of Linux special cases.
Change-Id: I82cb6dc668edbb093f68991337da1f4b933f1fac
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7152
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 0319d43d5..dc01effb4 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -1130,6 +1130,7 @@ sub seed_camelcase_file {
my @lines = split('\n', $text);
foreach my $line (@lines) {
+ if (!$OpenOCD) {
next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
$camelcase{$1} = 1;
@@ -1138,6 +1139,17 @@ sub seed_camelcase_file {
} elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
$camelcase{$1} = 1;
}
+ } # !$OpenOCD
+ # OpenOCD Specific: Begin: extend to camel[0-9_]*CASE
+ next if ($line !~ /(?:[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z])/);
+ if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z])\w*)/) {
+ $camelcase{$1} = 1;
+ } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z])\w*)\s*[\(\[,;]/) {
+ $camelcase{$1} = 1;
+ } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z])\w*)\s*[;\{]/) {
+ $camelcase{$1} = 1;
+ }
+ # OpenOCD Specific: End
}
}
@@ -5798,6 +5810,7 @@ sub process {
my $var = $1;
#CamelCase
+ if (!$OpenOCD) {
if ($var !~ /^$Constant$/ &&
$var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
#Ignore some autogenerated defines and enum values
@@ -5809,9 +5822,20 @@ sub process {
$var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ &&
#Ignore some three character SI units explicitly, like MiB and KHz
$var !~ /^(?:[a-z_]*?)_?(?:[KMGT]iB|[KMGT]?Hz)(?:_[a-z_]+)?$/) {
+ }
+ } # !$OpenOCD
+ # OpenOCD Specific: Begin: remove Linux exceptions, extend to camel[0-9_]*CASE
+ if ($var !~ /^$Constant$/ &&
+ $var =~ /[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z]/) {
+ # OpenOCD Specific: End
while ($var =~ m{\b($Ident)}g) {
my $word = $1;
+ if (!$OpenOCD) {
next if ($word !~ /[A-Z][a-z]|[a-z][A-Z]/);
+ } # !$OpenOCD
+ # OpenOCD Specific: Begin: extend to camel[0-9_]*CASE
+ next if ($word !~ /[A-Z][0-9_]*[a-z]|[a-z][0-9_]*[A-Z]/);
+ # OpenOCD Specific: End
if (!$OpenOCD) {
# This will not work for OpenOCD jenkins because it runs
# checkpatch from a tree already patched. Any new camelcase
commit 9f25e470f90be7ad05b2685a624d372be6998df2
Author: Antonio Borneo <bor...@gm...>
Date: Sat Apr 17 22:37:12 2021 +0200
checkpatch: enable CAMELCASE test
OpenOCD has to deal with CamelCase API, mainly from inttypes.h,
jimtcl, libusb and Windows.
Modify checkpatch script to load from a file the list of allowed
CamelCase symbols.
Populate the file 'camelcase.txt' with the symbols that OpenOCD
has to get from external library, plus some of the symbols that
should be fixed later.
Enable CAMELCASE test in configuration script.
Add generated files to .gitignore.
Remove the check for 'known' CamelCase symbols from include folder
as this will not work on OpenOCD Jenkins, as it run checkpatch on
already patched code.
Change-Id: I0415af673ed9f985394405ff8f1eeec81135410a
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/6170
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index 9d2084659..8cb9a3729 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -9,7 +9,6 @@
--ignore AVOID_EXTERNS
--ignore BLOCK_COMMENT_STYLE
---ignore CAMELCASE
--ignore COMPLEX_MACRO
--ignore CONST_STRUCT
--ignore ENOSYS
diff --git a/.gitignore b/.gitignore
index 955ca3c2e..818bb0cd3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,3 +100,6 @@ tags
GPATH
GRTAGS
GTAGS
+
+# checkpatch script files
+.checkpatch-camelcase.*
diff --git a/tools/scripts/camelcase.txt b/tools/scripts/camelcase.txt
new file mode 100644
index 000000000..59fe5cae0
--- /dev/null
+++ b/tools/scripts/camelcase.txt
@@ -0,0 +1,217 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# The OpenOCD coding-style rules forbids CamelCase names for symbols,
+# either functions, variables, macros and enums.
+# The script checkpatch detects the CamelCase symbols.
+# This file contains the exceptions to the coding-style, mainly due
+# to external dependencies and libraries.
+
+# format types from inttypes.h (only some are already used)
+PRId8
+PRId16
+PRId32
+PRId64
+PRIi8
+PRIi16
+PRIi32
+PRIi64
+PRIo8
+PRIo16
+PRIo32
+PRIo64
+PRIu8
+PRIu16
+PRIu32
+PRIu64
+PRIx8
+PRIx16
+PRIx32
+PRIx64
+PRIX8
+PRIX16
+PRIX32
+PRIX64
+SCNd8
+SCNd16
+SCNd32
+SCNd64
+SCNi8
+SCNi16
+SCNi32
+SCNi64
+SCNo8
+SCNo16
+SCNo32
+SCNo64
+SCNu8
+SCNu16
+SCNu32
+SCNu64
+SCNx8
+SCNx16
+SCNx32
+SCNx64
+SCNX8
+SCNX16
+SCNX32
+SCNX64
+
+# OpenOCD format types
+TARGET_PRIdADDR
+TARGET_PRIoADDR
+TARGET_PRIuADDR
+TARGET_PRIxADDR
+
+# from libusb.h
+bcdDevice
+bConfigurationValue
+bEndpointAddress
+bInterfaceClass
+bInterfaceNumber
+bInterfaceProtocol
+bInterfaceSubClass
+bmAttributes
+bNumConfigurations
+bNumEndpoints
+bNumInterfaces
+idProduct
+idVendor
+iInterface
+iProduct
+iSerialNumber
+wMaxPacketSize
+
+# from jimtcl/jim.h and jimtcl/jim-eventloop.h
+Jim_AppendString
+Jim_AppendStrings
+Jim_Cmd
+Jim_CmdPrivData
+Jim_CmdProc
+Jim_CompareStringImmediate
+Jim_ConcatObj
+Jim_CreateCommand
+Jim_CreateInterp
+Jim_DecrRefCount
+Jim_DelCmdProc
+Jim_DeleteAssocData
+Jim_DeleteCommand
+Jim_DictAddElement
+Jim_DictPairs
+Jim_DuplicateObj
+Jim_Eval
+Jim_EvalExpression
+Jim_EvalObj
+Jim_EvalObjPrefix
+Jim_EvalSource
+Jim_Eval_Named
+Jim_FreeInterp
+Jim_FreeObj
+Jim_GetAssocData
+Jim_GetCommand
+Jim_GetDouble
+Jim_GetEnum
+Jim_GetExitCode
+Jim_GetGlobalVariableStr
+Jim_GetIntRepPtr
+Jim_GetLong
+Jim_GetResult
+Jim_GetString
+Jim_GetVariable
+Jim_GetWide
+Jim_IncrRefCount
+Jim_InitStaticExtensions
+Jim_Interp
+Jim_ListAppendElement
+Jim_ListGetIndex
+Jim_ListLength
+Jim_MakeErrorMessage
+Jim_NewDictObj
+Jim_NewEmptyStringObj
+Jim_NewIntObj
+Jim_NewListObj
+Jim_NewStringObj
+Jim_NewWideObj
+Jim_Obj
+Jim_ProcessEvents
+Jim_RegisterCoreCommands
+Jim_SetAssocData
+Jim_SetEmptyResult
+Jim_SetResult
+Jim_SetResultBool
+Jim_SetResultFormatted
+Jim_SetResultInt
+Jim_SetResultString
+Jim_SetVariable
+Jim_String
+Jim_WrongNumArgs
+cmdProc
+currentScriptObj
+delProc
+emptyObj
+privData
+returnCode
+typePtr
+
+# from elf.h
+Elf32_Addr
+Elf32_Ehdr
+Elf32_Half
+Elf32_Off
+Elf32_Phdr
+Elf32_Size
+Elf32_Word
+Elf64_Addr
+Elf64_Ehdr
+Elf64_Half
+Elf64_Off
+Elf64_Phdr
+Elf64_Word
+Elf64_Xword
+
+# for BSD's
+__FreeBSD__
+__FreeBSD_kernel__
+
+# for Windows
+CreateFile
+CloseHandle
+CreatePipe
+CreateProcess
+FormatMessage
+GetLastError
+GetModuleFileName
+GetSystemTimeAsFileTime
+GetTickCount
+GetVersionEx
+HighPart
+LowPart
+MsgWaitForMultipleObjects
+PeekMessage
+PeekNamedPipe
+QuadPart
+ReadFile
+SetConsoleCtrlHandler
+SetHandleInformation
+Sleep
+WaitForSingleObject
+WriteFile
+WSACleanup
+WSAGetLastError
+WSAStartup
+ZeroMemory
+bInheritHandle
+dwFlags
+dwHighDateTime
+dwLowDateTime
+dwPlatformId
+dwOSVersionInfoSize
+hProcess
+hThread
+hStdError
+hStdInput
+hStdOutput
+lpSecurityDescriptor
+nLength
+
+# OpenOCD exceptions that should be removed
+KiB
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 12e7ab855..0319d43d5 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -988,6 +988,32 @@ sub read_words {
return 0;
}
+# OpenOCD specific: Begin: Load list of allowed CamelCase symbols
+if (show_type("CAMELCASE")) {
+ my $allowed_camelcase_file = "$root/tools/scripts/camelcase.txt";
+ if (open(my $words, '<', $allowed_camelcase_file)) {
+ while (<$words>) {
+ my $line = $_;
+
+ $line =~ s/\s*\n?$//g;
+ $line =~ s/^\s*//g;
+
+ next if ($line =~ m/^\s*#/);
+ next if ($line =~ m/^\s*$/);
+ if ($line =~ /\s/) {
+ print("$allowed_camelcase_file: '$line' invalid - ignored\n");
+ next;
+ }
+
+ $camelcase{$line} = 1;
+ }
+ close($allowed_camelcase_file);
+ } else {
+ warn "No camelcase symbols to ignore - file '$allowed_camelcase_file': $!\n";
+ }
+}
+# OpenOCD specific: End
+
my $const_structs;
if (show_type("CONST_STRUCT")) {
read_words(\$const_structs, $conststructsfile)
@@ -5786,6 +5812,10 @@ sub process {
while ($var =~ m{\b($Ident)}g) {
my $word = $1;
next if ($word !~ /[A-Z][a-z]|[a-z][A-Z]/);
+ if (!$OpenOCD) {
+ # This will not work for OpenOCD jenkins because it runs
+ # checkpatch from a tree already patched. Any new camelcase
+ # in include file will be ignored as it was pre-existing.
if ($check) {
seed_camelcase_includes();
if (!$file && !$camelcase_file_seeded) {
@@ -5793,6 +5823,7 @@ sub process {
$camelcase_file_seeded = 1;
}
}
+ } # !$OpenOCD
if (!defined $camelcase{$word}) {
$camelcase{$word} = 1;
CHK("CAMELCASE",
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 1 -
.gitignore | 3 +
tools/scripts/camelcase.txt | 217 ++++++++++++++++++++++++++++++++++++++++++++
tools/scripts/checkpatch.pl | 55 +++++++++++
4 files changed, 275 insertions(+), 1 deletion(-)
create mode 100644 tools/scripts/camelcase.txt
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:21: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 496308701342032d54bfe04c6e2653be252ccd94 (commit)
via 1c1fd1a71a20862335c89dca9b8ee5ca81e0dc85 (commit)
from bb1411e5987be66a8168e801a28f840d3b3b939b (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 496308701342032d54bfe04c6e2653be252ccd94
Author: Antonio Borneo <bor...@gm...>
Date: Fri Apr 16 23:57:06 2021 +0200
checkpatch: add commit-message field to ignore some check
The script 'checkpatch.pl' is part of the automatic tests used by
Linux Maintainers and developers to test new patches.
The Linux development process is e-mail base. An error reported by
checkpatch is not a blocking point; the developer can explain in
the e-mail why he is submitting a patch that fails at checkpatch
or that is in violation of the coding style. It's up to the
maintainer to decide to accept or reject the explanation and then
the patch.
The OpenOCD development process relies on Gerrit and Jenkins as
front-end tools. Jenkins tests every new patch with checkpatch
and then builds the new code. If checkpatch fails, Jenkins adds a
failure label to the patch; this often causes the patch to get
ignored by maintainers that considers it as 'not ready'.
Checkpatch can be instrumented to ignore some test, but this has
to be specified in the command line or in the configuration file.
Let checkpatch extract from the patch's commit message the new
field 'Checkpatch-ignore:' that lists the additional tests that
has to be ignored for that patch only.
The developer that detects as error or a limitation in checkpatch
can add the field and the problematic test in the commit message
and re-push the patch.
The maintainer should check the list of tests and decide how to
proceed.
Change-Id: Iafc1b2893a07c7b3fc7e3ad15bd694aba9bd8519
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/6169
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 14876a114..12e7ab855 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -3011,6 +3011,13 @@ sub process {
}
}
+# OpenOCD specific: Begin: Extend list of checkpatch tests to ignore
+ if ($in_commit_log && $line =~ /^\s*Checkpatch-ignore:\s*(.*)/) {
+ my @array = split(/[\s,]+/, $1);
+ hash_save_array_words(\%ignore_type, \@array);
+ }
+# OpenOCD specific: End
+
# Check for patch separator
if ($line =~ /^---$/) {
$has_patch_separator = 1;
commit 1c1fd1a71a20862335c89dca9b8ee5ca81e0dc85
Author: Antonio Borneo <bor...@gm...>
Date: Mon May 6 15:30:54 2019 +0200
checkpatch: increase the max indentation level
OpenOCD uses longer lines (120 char vs 100) and smaller tab size
(4 char vs 8) wrt Linux kernel coding style.
Clearly deep level of indentation is bad for code readability,
but let's be more permissive on the indentation level.
Change-Id: I16cf0b761145ec6072509dc26bb09c693e89e608
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/6167
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 3c656973a..14876a114 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -4238,7 +4238,9 @@ sub process {
my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0);
- if ($line =~ /^\+\t{6,}/) {
+ # OpenOCD specific: Begin: replace s/6/10/
+ if ($line =~ /^\+\t{10,}/) {
+ # OpenOCD specific: End
WARN("DEEP_INDENTATION",
"Too many leading tabs - consider code refactoring\n" . $herecurr);
}
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:20:41
|
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 bb1411e5987be66a8168e801a28f840d3b3b939b (commit)
from 8b4d9503d866bd7f70f743c3422076ba9ac9d58f (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 bb1411e5987be66a8168e801a28f840d3b3b939b
Author: Antonio Borneo <bor...@gm...>
Date: Wed Jan 27 19:00:38 2021 +0100
checkpatch: adapt shell script to the tool's new version
With the new checkpatch it's not possible to send in one shot a
set of patches through stdin because the Signed-off-by tag present
in each patch will trigger the error of duplicated Signed-off-by.
Use the new command-line flag '--git' to let checkpatch to extract
the patches from git and analyse them one-by-one.
While there, add the SPDX tag to the script.
Change-Id: I74791b627b8cd68f2d49146d15ae35bbc610e64e
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/6166
Tested-by: jenkins
diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh
index 0a630a248..7375fc2b6 100755
--- a/tools/checkpatch.sh
+++ b/tools/checkpatch.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-#
+# SPDX-License-Identifier: GPL-2.0-or-later
since=${1:-HEAD^}
-git format-patch -M --stdout $since | tools/scripts/checkpatch.pl -
+tools/scripts/checkpatch.pl --git ${since}..
-----------------------------------------------------------------------
Summary of changes:
tools/checkpatch.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:20:19
|
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 8b4d9503d866bd7f70f743c3422076ba9ac9d58f (commit)
via b0c36e0457446b76b32ca13db3e51f66b540d159 (commit)
from 7d1e08456c785eb7e5497cf7d66296c8f16736a5 (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 8b4d9503d866bd7f70f743c3422076ba9ac9d58f
Author: Antonio Borneo <bor...@gm...>
Date: Sun Apr 26 16:03:45 2020 +0200
checkpatch: check for SPDX tags of licenses in use
Fix the patch of the external helper spdxcheck.py accordingly to
OpenOCD folder structure.
List only the current LICENSES subfolders in spdxcheck.py .
Enable the check for SPDX headers.
Extend the check for TCL and Makefile.am files.
Change-Id: I0a40da0127746217ee0ac416058d5ceb922428ff
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5608
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index c6e4bbef0..9d2084659 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -23,7 +23,6 @@
--ignore PREFER_DEFINED_ATTRIBUTE_MACRO
--ignore PREFER_FALLTHROUGH
--ignore PREFER_KERNEL_TYPES
---ignore SPDX_LICENSE_TAG
--ignore SPLIT_STRING
--ignore SSCANF_TO_KSTRTO
--ignore SWITCH_CASE_INDENT_LEVEL
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 9ef94ff43..3c656973a 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -1132,10 +1132,12 @@ sub is_maintained_obsolete {
sub is_SPDX_License_valid {
my ($license) = @_;
- return 1 if (!$tree || which("python3") eq "" || !(-x "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
+ # OpenOCD specific: Begin: replace s"scripts"tools/scripts"
+ return 1 if (!$tree || which("python3") eq "" || !(-x "$root/tools/scripts/spdxcheck.py") || !(-e "$gitroot"));
my $root_path = abs_path($root);
- my $status = `cd "$root_path"; echo "$license" | scripts/spdxcheck.py -`;
+ my $status = `cd "$root_path"; echo "$license" | tools/scripts/spdxcheck.py -`;
+ # OpenOCD specific: End
return 0 if ($status ne "");
return 1;
}
@@ -3669,6 +3671,10 @@ sub process {
$comment = '#';
} elsif ($realfile =~ /\.rst$/) {
$comment = '..';
+ # OpenOCD specific: Begin
+ } elsif ($realfile =~ /\.(am|cfg|tcl)$/) {
+ $comment = '#';
+ # OpenOCD specific: End
}
# check SPDX comment style for .[chsS] files
diff --git a/tools/scripts/spdxcheck.py b/tools/scripts/spdxcheck.py
index 18cb9f5b3..f88294379 100755
--- a/tools/scripts/spdxcheck.py
+++ b/tools/scripts/spdxcheck.py
@@ -49,7 +49,9 @@ def read_spdxdata(repo):
# The subdirectories of LICENSES in the kernel source
# Note: exceptions needs to be parsed as last directory.
- license_dirs = [ "preferred", "dual", "deprecated", "exceptions" ]
+ # OpenOCD specific: Begin
+ license_dirs = [ "preferred", "stand-alone", "exceptions" ]
+ # OpenOCD specific: End
lictree = repo.head.commit.tree['LICENSES']
spdx = SPDXdata()
commit b0c36e0457446b76b32ca13db3e51f66b540d159
Author: Antonio Borneo <bor...@gm...>
Date: Mon May 6 10:24:52 2019 +0200
checkpatch: add list of typedef used in OpenOCD
The new checkpatch from Linux kernel does not recognizes the
specific types used in OpenOCD, e.g. "fd_set" and "Jim_Obj".
As consequence, it consider "fd_set" as the name of a variable,
then misinterpret the asterisk for the pointer "fd_set *" as a
multiplication, thus suggest to add a space after the asterisk
and replace "fd_set *x" with "fd_set * x".
Let checkpatch recognize the typedef used in OpenOCD.
Change-Id: Ibc295e6a8b47ffa88b50a6d510b7970760e5199d
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5607
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index 1ab743e2c..c6e4bbef0 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -5,6 +5,8 @@
--show-types
--strict
+--typedefsfile tools/scripts/typedefs.txt
+
--ignore AVOID_EXTERNS
--ignore BLOCK_COMMENT_STYLE
--ignore CAMELCASE
diff --git a/tools/scripts/typedefs.txt b/tools/scripts/typedefs.txt
new file mode 100644
index 000000000..97f330d9d
--- /dev/null
+++ b/tools/scripts/typedefs.txt
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+fd_set
+Jim_Cmd
+Jim_CmdProc
+Jim_DelCmdProc
+Jim_Interp
+Jim_Obj
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 3 ++-
tools/scripts/checkpatch.pl | 10 ++++++++--
tools/scripts/spdxcheck.py | 4 +++-
tools/scripts/typedefs.txt | 8 ++++++++
4 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 tools/scripts/typedefs.txt
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:20:01
|
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 7d1e08456c785eb7e5497cf7d66296c8f16736a5 (commit)
from 772d8b42b65e4a1eb381d441219bc5c589ae6373 (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 7d1e08456c785eb7e5497cf7d66296c8f16736a5
Author: Paul Fertser <fer...@gm...>
Date: Sun Apr 21 23:48:08 2019 +0200
checkpatch: fix check for the FSF address
Replace s/Linux/OpenOCD/ in the message about FSF address.
This is part of the old commit a9a5c17cf5e1 ("checkpatch: fix
check for the FSF address").
Change-Id: I79b79769ef723f86690862277612ea8ab7855c07
Signed-off-by: Paul Fertser <fer...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5128
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 6f877c379..9ef94ff43 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -3516,7 +3516,7 @@ sub process {
my $msg_level = \&ERROR;
$msg_level = \&CHK if ($file);
&{$msg_level}("FSF_MAILING_ADDRESS",
- "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL.\n" . $herevet)
+ "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. OpenOCD already includes a copy of the GPL.\n" . $herevet)
}
# check for Kconfig help text having a real description
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:19:20
|
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 772d8b42b65e4a1eb381d441219bc5c589ae6373 (commit)
from 20d4a58bd93aa17f8deb9ab6d310491f8fe9719b (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 772d8b42b65e4a1eb381d441219bc5c589ae6373
Author: Antonio Borneo <bor...@gm...>
Date: Wed Apr 17 08:00:38 2019 +0200
checkpatch: don't spell-check the spelling file
Prevent checkpatch to complain for commits that add new entries
in the dictionary of misspelled words.
Remove the ignore flag TYPO_SPELLING from .checkpatch.conf, now
spelling is functional.
Change-Id: I911dedafc243e34f753d2be687977066719ff2eb
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5123
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index 928028003..1ab743e2c 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -27,6 +27,3 @@
--ignore SWITCH_CASE_INDENT_LEVEL
--ignore TRACING_LOGGING
--ignore VOLATILE
-
-# Temporarily lines, to commit checkpatch itself. To be removed!
---ignore TYPO_SPELLING
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 07dca63db..6f877c379 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -3398,6 +3398,9 @@ sub process {
# Check for various typo / spelling mistakes
if (defined($misspellings) &&
+ # OpenOCD specific: Begin: don't check spelling on spelling_file
+ index($spelling_file, $realfile) + length($realfile) != length($spelling_file) &&
+ # OpenOCD specific: End
($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
while ($rawline =~ /(?:^|[^\w\-'`])($misspellings)(?:[^\w\-'`]|$)/gi) {
my $typo = $1;
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 3 ---
tools/scripts/checkpatch.pl | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:19:01
|
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 20d4a58bd93aa17f8deb9ab6d310491f8fe9719b (commit)
via ccdc51e2de9a5379e9aaa2ff15e0be3e73b265c1 (commit)
from c893a26a008a3a260bb40dc3f14ee7bdcc353981 (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 20d4a58bd93aa17f8deb9ab6d310491f8fe9719b
Author: Antony Pavlov <ant...@gm...>
Date: Wed Apr 10 14:53:56 2019 +0200
checkpatch: check for OpenOCD tree, not for kernel tree
checkpatch.pl looks for Linux kernel specific paths and files
to check source tree. As openocd misses kernel files it ends
with this error message:
Must be run from the top-level dir. of a kernel tree
This patch also renames 'kernel' -> 'openocd'
in source tree-related messages.
This is the old commit c5d89883165e ("checkpatch.pl: check for
openocd tree, not for kernel tree") re-applied.
Also remove the flag "--no-tree" from .checkpatch.conf, not
required anymore.
Change-Id: I336a66558c75494b7ae339ea63559c31f23aad84
Signed-off-by: Antony Pavlov <ant...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5122
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index 0aad4c5b4..928028003 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -29,5 +29,4 @@
--ignore VOLATILE
# Temporarily lines, to commit checkpatch itself. To be removed!
---no-tree
--ignore TYPO_SPELLING
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index aa3e63743..07dca63db 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -97,7 +97,7 @@ Version: $V
Options:
-q, --quiet quiet
-v, --verbose verbose mode
- --no-tree run without a kernel tree
+ --no-tree run without an OpenOCD tree
--no-signoff do not check for 'Signed-off-by' line
--patch treat FILE as patchfile (default)
--emacs emacs compile window format
@@ -124,7 +124,7 @@ Options:
requires --strict for use with --file
--min-conf-desc-length=n set the min description length, if shorter, warn
--tab-size=n set the number of spaces for tab (default $tabsize)
- --root=PATH PATH to the kernel tree root
+ --root=PATH PATH to the OpenOCD tree root
--no-summary suppress the per-file summary
--mailback only produce a report in case of warnings/errors
--summary-file include the filename in summary
@@ -461,14 +461,16 @@ if ($tree) {
} else {
if (top_of_kernel_tree('.')) {
$root = '.';
- } elsif ($0 =~ m@(.*)/scripts/[^/]*$@ &&
+ # OpenOCD specific: Begin: replace s"/scripts/"/tools/scripts/"
+ } elsif ($0 =~ m@(.*)/tools/scripts/[^/]*$@ &&
top_of_kernel_tree($1)) {
$root = $1;
}
+ # OpenOCD specific: End
}
if (!defined $root) {
- print "Must be run from the top-level dir. of a kernel tree\n";
+ print "Must be run from the top-level dir. of an OpenOCD tree\n";
exit(2);
}
}
@@ -1365,11 +1367,19 @@ exit($exit);
sub top_of_kernel_tree {
my ($root) = @_;
+ if (!$OpenOCD) {
my @tree_check = (
"COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
"README", "Documentation", "arch", "include", "drivers",
"fs", "init", "ipc", "kernel", "lib", "scripts",
);
+ } # !$OpenOCD
+ # OpenOCD specific: Begin
+ my @tree_check = (
+ "AUTHORS", "BUGS", "COPYING", "HACKING", "Makefile.am",
+ "README", "contrib", "doc", "src", "tcl", "testing", "tools",
+ );
+ # OpenOCD specific: End
foreach my $check (@tree_check) {
if (! -e $root . '/' . $check) {
commit ccdc51e2de9a5379e9aaa2ff15e0be3e73b265c1
Author: Paul Fertser <fer...@gm...>
Date: Sat Oct 26 11:34:22 2013 +0400
checkpatch: correct false positives reporting instructions
This is the old commit 75b4cbe35646 ("checkpatch: correct false
positives reporting instructions") re-applied.
Change-Id: I348ae549e9d2587093b0fb6652aadf34724f0aab
Signed-off-by: Paul Fertser <fer...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5121
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 762e9ed82..aa3e63743 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -1342,11 +1342,21 @@ NOTE: perl $^V is not modern enough to detect all possible issues.
EOM
}
if ($exit) {
+ if (!$OpenOCD) {
print << "EOM"
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
EOM
+ } # !$OpenOCD
+ # OpenOCD specific: Begin
+ print << "EOM"
+
+NOTE: If any of the errors are false positives, please report
+ them to the openocd-devel mailing list or prepare a patch
+ and send it to Gerrit for review.
+EOM
+ # OpenOCD specific: End
}
}
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 1 -
tools/scripts/checkpatch.pl | 28 ++++++++++++++++++++++++----
2 files changed, 24 insertions(+), 5 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:18:36
|
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 c893a26a008a3a260bb40dc3f14ee7bdcc353981 (commit)
via 7bf39f64f64959a3fea60e74a26c9b54e4ab0f0a (commit)
from 9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9 (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 c893a26a008a3a260bb40dc3f14ee7bdcc353981
Author: Paul Fertser <fer...@gm...>
Date: Sat Oct 26 11:24:43 2013 +0400
checkpatch: treat jenkins as valid email
This is needed to avoid checkpatch barking on already committed patches.
This is the old commit cadd51971535 ("checkpatch: treat jenkins as
valid email") re-applied.
Remove the flag BAD_SIGN_OFF, not anymore needed.
Change-Id: I6744f80de982f7934f3a5197ac2df1c29962cbd0
Signed-off-by: Paul Fertser <fer...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5120
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index 4f2c931ca..0aad4c5b4 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -30,5 +30,4 @@
# Temporarily lines, to commit checkpatch itself. To be removed!
--no-tree
---ignore BAD_SIGN_OFF
--ignore TYPO_SPELLING
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 1daedd2f2..762e9ed82 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -1403,6 +1403,10 @@ sub parse_email {
$address = "";
$comment = "";
}
+ # OpenOCD specific: Begin: handle jenkins as valid email
+ } elsif ($formatted_email eq "jenkins") {
+ $address = "jenkins";
+ # OpenOCD specific: End
}
# Extract comments from names excluding quoted parts
commit 7bf39f64f64959a3fea60e74a26c9b54e4ab0f0a
Author: Paul Fertser <fer...@gm...>
Date: Mon Oct 14 10:03:00 2013 +0400
checkpatch: add logging functions
It's commonly considered that user-visible strings should not be split
to different lines in the sources to ease grepping for them. Hence,
checkpatch traditionally makes an exception for logging functions,
lines having them can be of arbitrary length.
OpenOCD uses different (from Linux, the kernel) names, so they need to
be added to avoid false positives.
This is the old commit bb3cd6ec438d ("checkpatch: add logging functions")
re-applied and updated.
Change-Id: Ib18e4532cf7e1f79821b74c9bb6134a8a4e8be1b
Signed-off-by: Paul Fertser <fer...@gm...>
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5119
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index edbd464b2..1daedd2f2 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -597,6 +597,7 @@ our $typeTypedefs = qr{(?x:
our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
+if (!$OpenOCD) {
our $logFunctions = qr{(?x:
printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
(?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
@@ -606,6 +607,12 @@ our $logFunctions = qr{(?x:
MODULE_[A-Z_]+|
seq_vprintf|seq_printf|seq_puts
)};
+} # !$OpenOCD
+# OpenOCD specific: Begin: list log functions
+our $logFunctions = qr{(?x:
+ LOG_(?:TARGET_|)(?:DEBUG_IO|DEBUG|INFO|WARNING|ERROR|USER|USER_N|OUTPUT)
+)};
+# OpenOCD specific: End
our $allocFunctions = qr{(?x:
(?:(?:devm_)?
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 1 -
tools/scripts/checkpatch.pl | 11 +++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:18:19
|
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 9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9 (commit)
from 85a918b44d4f297e0dd30fc5bf6e798c991ddc6c (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 9c6c5b61b3c78a9f78152be6d403d9e3b76ef6f9
Author: Antonio Borneo <bor...@gm...>
Date: Sat Jun 11 22:41:17 2022 +0200
checkpatch: add variable $OpenOCD
The script checkpatch.pl require some adaptation for OpenOCD that
cannot be achieved through the config file .checkpatch.conf; the
script's code has to be modified.
To merge new version of the script from Linux kernel it becomes
relevant highlighting the changes, while minimizing the diff wrt
the initial script.
Add the perl variable '$OpenOCD' and suggest how to highlight
changes.
Change-Id: Ia8d26426850008f0465858a1d84cc774bc1146ed
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7021
Tested-by: jenkins
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 79e759aac..edbd464b2 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -22,6 +22,19 @@ my $V = '0.32';
use Getopt::Long qw(:config no_auto_abbrev);
+# ATTENTION: easily track modification to this script for OpenOCD.
+# When possible, don't modify the existing code, don't change its indentation,
+# but remove it enclosing it within:
+#
+# if (!$OpenOCD) {
+# original_code;
+# } # !$OpenOCD
+#
+# Mark every addition within comments
+# # OpenOCD specific: Begin[: additional comment]
+# # OpenOCD specific: End
+my $OpenOCD = 1;
+
my $quiet = 0;
my $verbose = 0;
my %verbose_messages = ();
-----------------------------------------------------------------------
Summary of changes:
tools/scripts/checkpatch.pl | 13 +++++++++++++
1 file changed, 13 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:17:38
|
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 85a918b44d4f297e0dd30fc5bf6e798c991ddc6c (commit)
from 8d395421ab359716843144dbe069607133a29b16 (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 85a918b44d4f297e0dd30fc5bf6e798c991ddc6c
Author: Antonio Borneo <bor...@gm...>
Date: Wed Apr 17 09:50:27 2019 +0200
checkpatch: add OpenOCD specific config flags
This initial setup covers the old commits:
commit 09571d62bc1e ("checkpatch: disable extern and switch indent checks")
commit 2f6f7c442d24 ("checkpatch: remove typedef check")
commit 9ad57e96b3c1 ("checkpatch: remove volatile check")
commit 3da783f62854 ("checkpatch: increase line length to 120")
commit 2af5b97ba31f ("checkpatch: remove __packed and __aligned checks")
commit 164450a01576 ("Change checkpatch.pl tab expanding to 4 characters.")
It also skips the check for SPDX_LICENSE_TAG, not implemented in
OpenOCD yet.
Extend to the check in 'strict' mode and skip all the check that
cannot apply on OpenOCD project.
Change-Id: I6c3bdf27465dc563464fbc8fafbaec696e287624
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5117
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
index d931644f6..4f2c931ca 100644
--- a/.checkpatch.conf
+++ b/.checkpatch.conf
@@ -1,7 +1,32 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+--max-line-length=120
+--tab-size=4
+--show-types
+--strict
+
+--ignore AVOID_EXTERNS
+--ignore BLOCK_COMMENT_STYLE
+--ignore CAMELCASE
+--ignore COMPLEX_MACRO
+--ignore CONST_STRUCT
+--ignore ENOSYS
--ignore FILE_PATH_CHANGES
--ignore GERRIT_CHANGE_ID
+--ignore LINE_SPACING
+--ignore LOGICAL_CONTINUATIONS
+--ignore MACRO_WITH_FLOW_CONTROL
+--ignore NEW_TYPEDEFS
+--ignore PARENTHESIS_ALIGNMENT
+--ignore PREFER_DEFINED_ATTRIBUTE_MACRO
+--ignore PREFER_FALLTHROUGH
+--ignore PREFER_KERNEL_TYPES
+--ignore SPDX_LICENSE_TAG
+--ignore SPLIT_STRING
+--ignore SSCANF_TO_KSTRTO
+--ignore SWITCH_CASE_INDENT_LEVEL
+--ignore TRACING_LOGGING
+--ignore VOLATILE
# Temporarily lines, to commit checkpatch itself. To be removed!
--no-tree
-----------------------------------------------------------------------
Summary of changes:
.checkpatch.conf | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:17:16
|
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 8d395421ab359716843144dbe069607133a29b16 (commit)
from 61d0757acf222fdd5669b471cc251e03101db273 (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 8d395421ab359716843144dbe069607133a29b16
Author: Antonio Borneo <bor...@gm...>
Date: Tue Apr 16 23:10:45 2019 +0200
checkpatch: import new script version from kernel v6.0-rc3
Replace existing checkpatch script with the one available in the
latest Linux kernel.
Add also from the same kernel version the spelling database and
the script spdxcheck.py, even if the script cannot be found by
checkpatch in the current path.
Add an empty "const_structs.checkpatch" file and an initial
"spdxexclude" file.
The script as is doesn't work properly in OpenOCD project.
Further patches in this series are required.
Gerrit will use the checkpatch in this commit to test/build the
commit itself. A minimal configuration file is then required to
avoid a failure in the test/build process.
This commit includes the OpenOCD commits:
commit 164450a01576 ("Change checkpatch.pl tab expanding to 4 characters.")
commit 667d510dabd5 ("checkpatch: fix false indent trigger")
already merged in upstream checkpatch in kernel v6.0-rc3.
Change-Id: Ic9cdecff2df0a1e23cdb01d10f14c5988480b8d6
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/5116
Tested-by: jenkins
diff --git a/.checkpatch.conf b/.checkpatch.conf
new file mode 100644
index 000000000..d931644f6
--- /dev/null
+++ b/.checkpatch.conf
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+--ignore FILE_PATH_CHANGES
+--ignore GERRIT_CHANGE_ID
+
+# Temporarily lines, to commit checkpatch itself. To be removed!
+--no-tree
+--ignore BAD_SIGN_OFF
+--ignore TYPO_SPELLING
diff --git a/doc/checkpatch.rst b/doc/checkpatch.rst
new file mode 100644
index 000000000..b52452bc2
--- /dev/null
+++ b/doc/checkpatch.rst
@@ -0,0 +1,1249 @@
+.. SPDX-License-Identifier: GPL-2.0-only
+
+==========
+Checkpatch
+==========
+
+Checkpatch (scripts/checkpatch.pl) is a perl script which checks for trivial
+style violations in patches and optionally corrects them. Checkpatch can
+also be run on file contexts and without the kernel tree.
+
+Checkpatch is not always right. Your judgement takes precedence over checkpatch
+messages. If your code looks better with the violations, then its probably
+best left alone.
+
+
+Options
+=======
+
+This section will describe the options checkpatch can be run with.
+
+Usage::
+
+ ./scripts/checkpatch.pl [OPTION]... [FILE]...
+
+Available options:
+
+ - -q, --quiet
+
+ Enable quiet mode.
+
+ - -v, --verbose
+ Enable verbose mode. Additional verbose test descriptions are output
+ so as to provide information on why that particular message is shown.
+
+ - --no-tree
+
+ Run checkpatch without the kernel tree.
+
+ - --no-signoff
+
+ Disable the 'Signed-off-by' line check. The sign-off is a simple line at
+ the end of the explanation for the patch, which certifies that you wrote it
+ or otherwise have the right to pass it on as an open-source patch.
+
+ Example::
+
+ Signed-off-by: Random J Developer <ra...@de...>
+
+ Setting this flag effectively stops a message for a missing signed-off-by
+ line in a patch context.
+
+ - --patch
+
+ Treat FILE as a patch. This is the default option and need not be
+ explicitly specified.
+
+ - --emacs
+
+ Set output to emacs compile window format. This allows emacs users to jump
+ from the error in the compile window directly to the offending line in the
+ patch.
+
+ - --terse
+
+ Output only one line per report.
+
+ - --showfile
+
+ Show the diffed file position instead of the input file position.
+
+ - -g, --git
+
+ Treat FILE as a single commit or a git revision range.
+
+ Single commit with:
+
+ - <rev>
+ - <rev>^
+ - <rev>~n
+
+ Multiple commits with:
+
+ - <rev1>..<rev2>
+ - <rev1>...<rev2>
+ - <rev>-<count>
+
+ - -f, --file
+
+ Treat FILE as a regular source file. This option must be used when running
+ checkpatch on source files in the kernel.
+
+ - --subjective, --strict
+
+ Enable stricter tests in checkpatch. By default the tests emitted as CHECK
+ do not activate by default. Use this flag to activate the CHECK tests.
+
+ - --list-types
+
+ Every message emitted by checkpatch has an associated TYPE. Add this flag
+ to display all the types in checkpatch.
+
+ Note that when this flag is active, checkpatch does not read the input FILE,
+ and no message is emitted. Only a list of types in checkpatch is output.
+
+ - --types TYPE(,TYPE2...)
+
+ Only display messages with the given types.
+
+ Example::
+
+ ./scripts/checkpatch.pl mypatch.patch --types EMAIL_SUBJECT,BRACES
+
+ - --ignore TYPE(,TYPE2...)
+
+ Checkpatch will not emit messages for the specified types.
+
+ Example::
+
+ ./scripts/checkpatch.pl mypatch.patch --ignore EMAIL_SUBJECT,BRACES
+
+ - --show-types
+
+ By default checkpatch doesn't display the type associated with the messages.
+ Set this flag to show the message type in the output.
+
+ - --max-line-length=n
+
+ Set the max line length (default 100). If a line exceeds the specified
+ length, a LONG_LINE message is emitted.
+
+
+ The message level is different for patch and file contexts. For patches,
+ a WARNING is emitted. While a milder CHECK is emitted for files. So for
+ file contexts, the --strict flag must also be enabled.
+
+ - --min-conf-desc-length=n
+
+ Set the Kconfig entry minimum description length, if shorter, warn.
+
+ - --tab-size=n
+
+ Set the number of spaces for tab (default 8).
+
+ - --root=PATH
+
+ PATH to the kernel tree root.
+
+ This option must be specified when invoking checkpatch from outside
+ the kernel root.
+
+ - --no-summary
+
+ Suppress the per file summary.
+
+ - --mailback
+
+ Only produce a report in case of Warnings or Errors. Milder Checks are
+ excluded from this.
+
+ - --summary-file
+
+ Include the filename in summary.
+
+ - --debug KEY=[0|1]
+
+ Turn on/off debugging of KEY, where KEY is one of 'values', 'possible',
+ 'type', and 'attr' (default is all off).
+
+ - --fix
+
+ This is an EXPERIMENTAL feature. If correctable errors exists, a file
+ <inputfile>.EXPERIMENTAL-checkpatch-fixes is created which has the
+ automatically fixable errors corrected.
+
+ - --fix-inplace
+
+ EXPERIMENTAL - Similar to --fix but input file is overwritten with fixes.
+
+ DO NOT USE this flag unless you are absolutely sure and you have a backup
+ in place.
+
+ - --ignore-perl-version
+
+ Override checking of perl version. Runtime errors maybe encountered after
+ enabling this flag if the perl version does not meet the minimum specified.
+
+ - --codespell
+
+ Use the codespell dictionary for checking spelling errors.
+
+ - --codespellfile
+
+ Use the specified codespell file.
+ Default is '/usr/share/codespell/dictionary.txt'.
+
+ - --typedefsfile
+
+ Read additional types from this file.
+
+ - --color[=WHEN]
+
+ Use colors 'always', 'never', or only when output is a terminal ('auto').
+ Default is 'auto'.
+
+ - --kconfig-prefix=WORD
+
+ Use WORD as a prefix for Kconfig symbols (default is `CONFIG_`).
+
+ - -h, --help, --version
+
+ Display the help text.
+
+Message Levels
+==============
+
+Messages in checkpatch are divided into three levels. The levels of messages
+in checkpatch denote the severity of the error. They are:
+
+ - ERROR
+
+ This is the most strict level. Messages of type ERROR must be taken
+ seriously as they denote things that are very likely to be wrong.
+
+ - WARNING
+
+ This is the next stricter level. Messages of type WARNING requires a
+ more careful review. But it is milder than an ERROR.
+
+ - CHECK
+
+ This is the mildest level. These are things which may require some thought.
+
+Type Descriptions
+=================
+
+This section contains a description of all the message types in checkpatch.
+
+.. Types in this section are also parsed by checkpatch.
+.. The types are grouped into subsections based on use.
+
+
+Allocation style
+----------------
+
+ **ALLOC_ARRAY_ARGS**
+ The first argument for kcalloc or kmalloc_array should be the
+ number of elements. sizeof() as the first argument is generally
+ wrong.
+
+ See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
+
+ **ALLOC_SIZEOF_STRUCT**
+ The allocation style is bad. In general for family of
+ allocation functions using sizeof() to get memory size,
+ constructs like::
+
+ p = alloc(sizeof(struct foo), ...)
+
+ should be::
+
+ p = alloc(sizeof(*p), ...)
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#allocating-memory
+
+ **ALLOC_WITH_MULTIPLY**
+ Prefer kmalloc_array/kcalloc over kmalloc/kzalloc with a
+ sizeof multiply.
+
+ See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
+
+
+API usage
+---------
+
+ **ARCH_DEFINES**
+ Architecture specific defines should be avoided wherever
+ possible.
+
+ **ARCH_INCLUDE_LINUX**
+ Whenever asm/file.h is included and linux/file.h exists, a
+ conversion can be made when linux/file.h includes asm/file.h.
+ However this is not always the case (See signal.h).
+ This message type is emitted only for includes from arch/.
+
+ **AVOID_BUG**
+ BUG() or BUG_ON() should be avoided totally.
+ Use WARN() and WARN_ON() instead, and handle the "impossible"
+ error condition as gracefully as possible.
+
+ See: https://www.kernel.org/doc/html/latest/process/deprecated.html#bug-and-bug-on
+
+ **CONSIDER_KSTRTO**
+ The simple_strtol(), simple_strtoll(), simple_strtoul(), and
+ simple_strtoull() functions explicitly ignore overflows, which
+ may lead to unexpected results in callers. The respective kstrtol(),
+ kstrtoll(), kstrtoul(), and kstrtoull() functions tend to be the
+ correct replacements.
+
+ See: https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull
+
+ **CONSTANT_CONVERSION**
+ Use of __constant_<foo> form is discouraged for the following functions::
+
+ __constant_cpu_to_be[x]
+ __constant_cpu_to_le[x]
+ __constant_be[x]_to_cpu
+ __constant_le[x]_to_cpu
+ __constant_htons
+ __constant_ntohs
+
+ Using any of these outside of include/uapi/ is not preferred as using the
+ function without __constant_ is identical when the argument is a
+ constant.
+
+ In big endian systems, the macros like __constant_cpu_to_be32(x) and
+ cpu_to_be32(x) expand to the same expression::
+
+ #define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x))
+ #define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
+
+ In little endian systems, the macros __constant_cpu_to_be32(x) and
+ cpu_to_be32(x) expand to __constant_swab32 and __swab32. __swab32
+ has a __builtin_constant_p check::
+
+ #define __swab32(x) \
+ (__builtin_constant_p((__u32)(x)) ? \
+ ___constant_swab32(x) : \
+ __fswab32(x))
+
+ So ultimately they have a special case for constants.
+ Similar is the case with all of the macros in the list. Thus
+ using the __constant_... forms are unnecessarily verbose and
+ not preferred outside of include/uapi.
+
+ See: https://lore.kernel.org/lkml/1400106425.12666.6.camel@joe-AO725/
+
+ **DEPRECATED_API**
+ Usage of a deprecated RCU API is detected. It is recommended to replace
+ old flavourful RCU APIs by their new vanilla-RCU counterparts.
+
+ The full list of available RCU APIs can be viewed from the kernel docs.
+
+ See: https://www.kernel.org/doc/html/latest/RCU/whatisRCU.html#full-list-of-rcu-apis
+
+ **DEPRECATED_VARIABLE**
+ EXTRA_{A,C,CPP,LD}FLAGS are deprecated and should be replaced by the new
+ flags added via commit f77bf01425b1 ("kbuild: introduce ccflags-y,
+ asflags-y and ldflags-y").
+
+ The following conversion scheme maybe used::
+
+ EXTRA_AFLAGS -> asflags-y
+ EXTRA_CFLAGS -> ccflags-y
+ EXTRA_CPPFLAGS -> cppflags-y
+ EXTRA_LDFLAGS -> ldflags-y
+
+ See:
+
+ 1. https://lore.kernel.org/lkml/200...@ur.../
+ 2. https://lore.kernel.org/lkml/131...@gm.../
+ 3. https://www.kernel.org/doc/html/latest/kbuild/makefiles.html#compilation-flags
+
+ **DEVICE_ATTR_FUNCTIONS**
+ The function names used in DEVICE_ATTR is unusual.
+ Typically, the store and show functions are used with <attr>_store and
+ <attr>_show, where <attr> is a named attribute variable of the device.
+
+ Consider the following examples::
+
+ static DEVICE_ATTR(type, 0444, type_show, NULL);
+ static DEVICE_ATTR(power, 0644, power_show, power_store);
+
+ The function names should preferably follow the above pattern.
+
+ See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+
+ **DEVICE_ATTR_RO**
+ The DEVICE_ATTR_RO(name) helper macro can be used instead of
+ DEVICE_ATTR(name, 0444, name_show, NULL);
+
+ Note that the macro automatically appends _show to the named
+ attribute variable of the device for the show method.
+
+ See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+
+ **DEVICE_ATTR_RW**
+ The DEVICE_ATTR_RW(name) helper macro can be used instead of
+ DEVICE_ATTR(name, 0644, name_show, name_store);
+
+ Note that the macro automatically appends _show and _store to the
+ named attribute variable of the device for the show and store methods.
+
+ See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+
+ **DEVICE_ATTR_WO**
+ The DEVICE_AATR_WO(name) helper macro can be used instead of
+ DEVICE_ATTR(name, 0200, NULL, name_store);
+
+ Note that the macro automatically appends _store to the
+ named attribute variable of the device for the store method.
+
+ See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+
+ **DUPLICATED_SYSCTL_CONST**
+ Commit d91bff3011cf ("proc/sysctl: add shared variables for range
+ check") added some shared const variables to be used instead of a local
+ copy in each source file.
+
+ Consider replacing the sysctl range checking value with the shared
+ one in include/linux/sysctl.h. The following conversion scheme may
+ be used::
+
+ &zero -> SYSCTL_ZERO
+ &one -> SYSCTL_ONE
+ &int_max -> SYSCTL_INT_MAX
+
+ See:
+
+ 1. https://lore.kernel.org/lkml/201...@re.../
+ 2. https://lore.kernel.org/lkml/201...@re.../
+
+ **ENOSYS**
+ ENOSYS means that a nonexistent system call was called.
+ Earlier, it was wrongly used for things like invalid operations on
+ otherwise valid syscalls. This should be avoided in new code.
+
+ See: https://lore.kernel.org/lkml/5eb...@am.../
+
+ **ENOTSUPP**
+ ENOTSUPP is not a standard error code and should be avoided in new patches.
+ EOPNOTSUPP should be used instead.
+
+ See: https://lore.kernel.org/netdev/202...@lu.../
+
+ **EXPORT_SYMBOL**
+ EXPORT_SYMBOL should immediately follow the symbol to be exported.
+
+ **IN_ATOMIC**
+ in_atomic() is not for driver use so any such use is reported as an ERROR.
+ Also in_atomic() is often used to determine if sleeping is permitted,
+ but it is not reliable in this use model. Therefore its use is
+ strongly discouraged.
+
+ However, in_atomic() is ok for core kernel use.
+
+ See: https://lore.kernel.org/lkml/200...@li.../
+
+ **LOCKDEP**
+ The lockdep_no_validate class was added as a temporary measure to
+ prevent warnings on conversion of device->sem to device->mutex.
+ It should not be used for any other purpose.
+
+ See: https://lore.kernel.org/lkml/1268959062.9440.467.camel@laptop/
+
+ **MALFORMED_INCLUDE**
+ The #include statement has a malformed path. This has happened
+ because the author has included a double slash "//" in the pathname
+ accidentally.
+
+ **USE_LOCKDEP**
+ lockdep_assert_held() annotations should be preferred over
+ assertions based on spin_is_locked()
+
+ See: https://www.kernel.org/doc/html/latest/locking/lockdep-design.html#annotations
+
+ **UAPI_INCLUDE**
+ No #include statements in include/uapi should use a uapi/ path.
+
+ **USLEEP_RANGE**
+ usleep_range() should be preferred over udelay(). The proper way of
+ using usleep_range() is mentioned in the kernel docs.
+
+ See: https://www.kernel.org/doc/html/latest/timers/timers-howto.html#delays-information-on-the-various-kernel-delay-sleep-mechanisms
+
+
+Comments
+--------
+
+ **BLOCK_COMMENT_STYLE**
+ The comment style is incorrect. The preferred style for multi-
+ line comments is::
+
+ /*
+ * This is the preferred style
+ * for multi line comments.
+ */
+
+ The networking comment style is a bit different, with the first line
+ not empty like the former::
+
+ /* This is the preferred comment style
+ * for files in net/ and drivers/net/
+ */
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
+
+ **C99_COMMENTS**
+ C99 style single line comments (//) should not be used.
+ Prefer the block comment style instead.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
+
+ **DATA_RACE**
+ Applications of data_race() should have a comment so as to document the
+ reasoning behind why it was deemed safe.
+
+ See: https://lore.kernel.org/lkml/202...@go.../
+
+ **FSF_MAILING_ADDRESS**
+ Kernel maintainers reject new instances of the GPL boilerplate paragraph
+ directing people to write to the FSF for a copy of the GPL, since the
+ FSF has moved in the past and may do so again.
+ So do not write paragraphs about writing to the Free Software Foundation's
+ mailing address.
+
+ See: https://lore.kernel.org/lkml/20131006222342.GT19510@leaf/
+
+
+Commit message
+--------------
+
+ **BAD_SIGN_OFF**
+ The signed-off-by line does not fall in line with the standards
+ specified by the community.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
+
+ **BAD_STABLE_ADDRESS_STYLE**
+ The email format for stable is incorrect.
+ Some valid options for stable address are::
+
+ 1. st...@vg...
+ 2. st...@ke...
+
+ For adding version info, the following comment style should be used::
+
+ st...@vg... # version info
+
+ **COMMIT_COMMENT_SYMBOL**
+ Commit log lines starting with a '#' are ignored by git as
+ comments. To solve this problem addition of a single space
+ infront of the log line is enough.
+
+ **COMMIT_MESSAGE**
+ The patch is missing a commit description. A brief
+ description of the changes made by the patch should be added.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+
+ **EMAIL_SUBJECT**
+ Naming the tool that found the issue is not very useful in the
+ subject line. A good subject line summarizes the change that
+ the patch brings.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+
+ **FROM_SIGN_OFF_MISMATCH**
+ The author's email does not match with that in the Signed-off-by:
+ line(s). This can be sometimes caused due to an improperly configured
+ email client.
+
+ This message is emitted due to any of the following reasons::
+
+ - The email names do not match.
+ - The email addresses do not match.
+ - The email subaddresses do not match.
+ - The email comments do not match.
+
+ **MISSING_SIGN_OFF**
+ The patch is missing a Signed-off-by line. A signed-off-by
+ line should be added according to Developer's certificate of
+ Origin.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
+
+ **NO_AUTHOR_SIGN_OFF**
+ The author of the patch has not signed off the patch. It is
+ required that a simple sign off line should be present at the
+ end of explanation of the patch to denote that the author has
+ written it or otherwise has the rights to pass it on as an open
+ source patch.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
+
+ **DIFF_IN_COMMIT_MSG**
+ Avoid having diff content in commit message.
+ This causes problems when one tries to apply a file containing both
+ the changelog and the diff because patch(1) tries to apply the diff
+ which it found in the changelog.
+
+ See: https://lore.kernel.org/lkml/201...@li.../
+
+ **GERRIT_CHANGE_ID**
+ To be picked up by gerrit, the footer of the commit message might
+ have a Change-Id like::
+
+ Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
+ Signed-off-by: A. U. Thor <au...@ex...>
+
+ The Change-Id line must be removed before submitting.
+
+ **GIT_COMMIT_ID**
+ The proper way to reference a commit id is:
+ commit <12+ chars of sha1> ("<title line>")
+
+ An example may be::
+
+ Commit e21d2170f36602ae2708 ("video: remove unnecessary
+ platform_set_drvdata()") removed the unnecessary
+ platform_set_drvdata(), but left the variable "dev" unused,
+ delete it.
+
+ See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+
+
+Comparison style
+----------------
+
+ **ASSIGN_IN_IF**
+ Do not use assignments in if condition.
+ Example::
+
+ if ((foo = bar(...)) < BAZ) {
+
+ should be written as::
+
+ foo = bar(...);
+ if (foo < BAZ) {
+
+ **BOOL_COMPARISON**
+ Comparisons of A to true and false are better written
+ as A and !A.
+
+ See: https://lore.kernel.org/lkml/1365563834.27174.12.camel@joe-AO722/
+
+ **COMPARISON_TO_NULL**
+ Comparisons to NULL in the form (foo == NULL) or (foo != NULL)
+ are better written as (!foo) and (foo).
+
+ **CONSTANT_COMPARISON**
+ Comparisons with a constant or upper case identifier on the left
+ side of the test should be avoided.
+
+
+Indentation and Line Breaks
+---------------------------
+
+ **CODE_INDENT**
+ Code indent should use tabs instead of spaces.
+ Outside of comments, documentation and Kconfig,
+ spaces are never used for indentation.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
+
+ **DEEP_INDENTATION**
+ Indentation with 6 or more tabs usually indicate overly indented
+ code.
+
+ It is suggested to refactor excessive indentation of
+ if/else/for/do/while/switch statements.
+
+ See: https://lore.kernel.org/lkml/1328311239.21255.24.camel@joe2Laptop/
+
+ **SWITCH_CASE_INDENT_LEVEL**
+ switch should be at the same indent as case.
+ Example::
+
+ switch (suffix) {
+ case 'G':
+ case 'g':
+ mem <<= 30;
+ break;
+ case 'M':
+ case 'm':
+ mem <<= 20;
+ break;
+ case 'K':
+ case 'k':
+ mem <<= 10;
+ fallthrough;
+ default:
+ break;
+ }
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
+
+ **LONG_LINE**
+ The line has exceeded the specified maximum length.
+ To use a different maximum line length, the --max-line-length=n option
+ may be added while invoking checkpatch.
+
+ Earlier, the default line length was 80 columns. Commit bdc48fa11e46
+ ("checkpatch/coding-style: deprecate 80-column warning") increased the
+ limit to 100 columns. This is not a hard limit either and it's
+ preferable to stay within 80 columns whenever possible.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+
+ **LONG_LINE_STRING**
+ A string starts before but extends beyond the maximum line length.
+ To use a different maximum line length, the --max-line-length=n option
+ may be added while invoking checkpatch.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+
+ **LONG_LINE_COMMENT**
+ A comment starts before but extends beyond the maximum line length.
+ To use a different maximum line length, the --max-line-length=n option
+ may be added while invoking checkpatch.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+
+ **SPLIT_STRING**
+ Quoted strings that appear as messages in userspace and can be
+ grepped, should not be split across multiple lines.
+
+ See: https://lore.kernel.org/lkml/20120203052727.GA15035@leaf/
+
+ **MULTILINE_DEREFERENCE**
+ A single dereferencing identifier spanned on multiple lines like::
+
+ struct_identifier->member[index].
+ member = <foo>;
+
+ is generally hard to follow. It can easily lead to typos and so makes
+ the code vulnerable to bugs.
+
+ If fixing the multiple line dereferencing leads to an 80 column
+ violation, then either rewrite the code in a more simple way or if the
+ starting part of the dereferencing identifier is the same and used at
+ multiple places then store it in a temporary variable, and use that
+ temporary variable only at all the places. For example, if there are
+ two dereferencing identifiers::
+
+ member1->member2->member3.foo1;
+ member1->member2->member3.foo2;
+
+ then store the member1->member2->member3 part in a temporary variable.
+ It not only helps to avoid the 80 column violation but also reduces
+ the program size by removing the unnecessary dereferences.
+
+ But if none of the above methods work then ignore the 80 column
+ violation because it is much easier to read a dereferencing identifier
+ on a single line.
+
+ **TRAILING_STATEMENTS**
+ Trailing statements (for example after any conditional) should be
+ on the next line.
+ Statements, such as::
+
+ if (x == y) break;
+
+ should be::
+
+ if (x == y)
+ break;
+
+
+Macros, Attributes and Symbols
+------------------------------
+
+ **ARRAY_SIZE**
+ The ARRAY_SIZE(foo) macro should be preferred over
+ sizeof(foo)/sizeof(foo[0]) for finding number of elements in an
+ array.
+
+ The macro is defined in include/linux/kernel.h::
+
+ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+ **AVOID_EXTERNS**
+ Function prototypes don't need to be declared extern in .h
+ files. It's assumed by the compiler and is unnecessary.
+
+ **AVOID_L_PREFIX**
+ Local symbol names that are prefixed with `.L` should be avoided,
+ as this has special meaning for the assembler; a symbol entry will
+ not be emitted into the symbol table. This can prevent `objtool`
+ from generating correct unwind info.
+
+ Symbols with STB_LOCAL binding may still be used, and `.L` prefixed
+ local symbol names are still generally usable within a function,
+ but `.L` prefixed local symbol names should not be used to denote
+ the beginning or end of code regions via
+ `SYM_CODE_START_LOCAL`/`SYM_CODE_END`
+
+ **BIT_MACRO**
+ Defines like: 1 << <digit> could be BIT(digit).
+ The BIT() macro is defined via include/linux/bits.h::
+
+ #define BIT(nr) (1UL << (nr))
+
+ **CONST_READ_MOSTLY**
+ When a variable is tagged with the __read_mostly annotation, it is a
+ signal to the compiler that accesses to the variable will be mostly
+ reads and rarely(but NOT never) a write.
+
+ const __read_mostly does not make any sense as const data is already
+ read-only. The __read_mostly annotation thus should be removed.
+
+ **DATE_TIME**
+ It is generally desirable that building the same source code with
+ the same set of tools is reproducible, i.e. the output is always
+ exactly the same.
+
+ The kernel does *not* use the ``__DATE__`` and ``__TIME__`` macros,
+ and enables warnings if they are used as they can lead to
+ non-deterministic builds.
+
+ See: https://www.kernel.org/doc/html/latest/kbuild/reproducible-builds.html#timestamps
+
+ **DEFINE_ARCH_HAS**
+ The ARCH_HAS_xyz and ARCH_HAVE_xyz patterns are wrong.
+
+ For big conceptual features use Kconfig symbols instead. And for
+ smaller things where we have compatibility fallback functions but
+ want architectures able to override them with optimized ones, we
+ should either use weak functions (appropriate for some cases), or
+ the symbol that protects them should be the same symbol we use.
+
+ See: https://lore.kernel.org/lkml/CA+...@ma.../
+
+ **DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON**
+ do {} while(0) macros should not have a trailing semicolon.
+
+ **INIT_ATTRIBUTE**
+ Const init definitions should use __initconst instead of
+ __initdata.
+
+ Similarly init definitions without const require a separate
+ use of const.
+
+ **INLINE_LOCATION**
+ The inline keyword should sit between storage class and type.
+
+ For example, the following segment::
+
+ inline static int example_function(void)
+ {
+ ...
+ }
+
+ should be::
+
+ static inline int example_function(void)
+ {
+ ...
+ }
+
+ **MISPLACED_INIT**
+ It is possible to use section markers on variables in a way
+ which gcc doesn't understand (or at least not the way the
+ developer intended)::
+
+ static struct __initdata samsung_pll_clock exynos4_plls[nr_plls] = {
+
+ does not put exynos4_plls in the .initdata section. The __initdata
+ marker can be virtually anywhere on the line, except right after
+ "struct". The preferred location is before the "=" sign if there is
+ one, or before the trailing ";" otherwise.
+
+ See: https://lore.kernel.org/lkml/1377655732.3619.19.camel@joe-AO722/
+
+ **MULTISTATEMENT_MACRO_USE_DO_WHILE**
+ Macros with multiple statements should be enclosed in a
+ do - while block. Same should also be the case for macros
+ starting with `if` to avoid logic defects::
+
+ #define macrofun(a, b, c) \
+ do { \
+ if (a == 5) \
+ do_this(b, c); \
+ } while (0)
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#macros-enums-and-rtl
+
+ **PREFER_FALLTHROUGH**
+ Use the `fallthrough;` pseudo keyword instead of
+ `/* fallthrough */` like comments.
+
+ **TRAILING_SEMICOLON**
+ Macro definition should not end with a semicolon. The macro
+ invocation style should be consistent with function calls.
+ This can prevent any unexpected code paths::
+
+ #define MAC do_something;
+
+ If this macro is used within a if else statement, like::
+
+ if (some_condition)
+ MAC;
+
+ else
+ do_something;
+
+ Then there would be a compilation error, because when the macro is
+ expanded there are two trailing semicolons, so the else branch gets
+ orphaned.
+
+ See: https://lore.kernel.org/lkml/1399671106.2912.21.camel@joe-AO725/
+
+ **SINGLE_STATEMENT_DO_WHILE_MACRO**
+ For the multi-statement macros, it is necessary to use the do-while
+ loop to avoid unpredictable code paths. The do-while loop helps to
+ group the multiple statements into a single one so that a
+ function-like macro can be used as a function only.
+
+ But for the single statement macros, it is unnecessary to use the
+ do-while loop. Although the code is syntactically correct but using
+ the do-while loop is redundant. So remove the do-while loop for single
+ statement macros.
+
+ **WEAK_DECLARATION**
+ Using weak declarations like __attribute__((weak)) or __weak
+ can have unintended link defects. Avoid using them.
+
+
+Functions and Variables
+-----------------------
+
+ **CAMELCASE**
+ Avoid CamelCase Identifiers.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#naming
+
+ **CONST_CONST**
+ Using `const <type> const *` is generally meant to be
+ written `const <type> * const`.
+
+ **CONST_STRUCT**
+ Using const is generally a good idea. Checkpatch reads
+ a list of frequently used structs that are always or
+ almost always constant.
+
+ The existing structs list can be viewed from
+ `scripts/const_structs.checkpatch`.
+
+ See: https://lore.kernel.org/lkml/alpine.DEB.2.10.1608281509480.3321@hadrien/
+
+ **EMBEDDED_FUNCTION_NAME**
+ Embedded function names are less appropriate to use as
+ refactoring can cause function renaming. Prefer the use of
+ "%s", __func__ to embedded function names.
+
+ Note that this does not work with -f (--file) checkpatch option
+ as it depends on patch context providing the function name.
+
+ **FUNCTION_ARGUMENTS**
+ This warning is emitted due to any of the following reasons:
+
+ 1. Arguments for the function declaration do not follow
+ the identifier name. Example::
+
+ void foo
+ (int bar, int baz)
+
+ This should be corrected to::
+
+ void foo(int bar, int baz)
+
+ 2. Some arguments for the function definition do not
+ have an identifier name. Example::
+
+ void foo(int)
+
+ All arguments should have identifier names.
+
+ **FUNCTION_WITHOUT_ARGS**
+ Function declarations without arguments like::
+
+ int foo()
+
+ should be::
+
+ int foo(void)
+
+ **GLOBAL_INITIALISERS**
+ Global variables should not be initialized explicitly to
+ 0 (or NULL, false, etc.). Your compiler (or rather your
+ loader, which is responsible for zeroing out the relevant
+ sections) automatically does it for you.
+
+ **INITIALISED_STATIC**
+ Static variables should not be initialized explicitly to zero.
+ Your compiler (or rather your loader) automatically does
+ it for you.
+
+ **MULTIPLE_ASSIGNMENTS**
+ Multiple assignments on a single line makes the code unnecessarily
+ complicated. So on a single line assign value to a single variable
+ only, this makes the code more readable and helps avoid typos.
+
+ **RETURN_PARENTHESES**
+ return is not a function and as such doesn't need parentheses::
+
+ return (bar);
+
+ can simply be::
+
+ return bar;
+
+
+Permissions
+-----------
+
+ **DEVICE_ATTR_PERMS**
+ The permissions used in DEVICE_ATTR are unusual.
+ Typically only three permissions are used - 0644 (RW), 0444 (RO)
+ and 0200 (WO).
+
+ See: https://www.kernel.org/doc/html/latest/filesystems/sysfs.html#attributes
+
+ **EXECUTE_PERMISSIONS**
+ There is no reason for source files to be executable. The executable
+ bit can be removed safely.
+
+ **EXPORTED_WORLD_WRITABLE**
+ Exporting world writable sysfs/debugfs files is usually a bad thing.
+ When done arbitrarily they can introduce serious security bugs.
+ In the past, some of the debugfs vulnerabilities would seemingly allow
+ any local user to write arbitrary values into device registers - a
+ situation from which little good can be expected to emerge.
+
+ See: https://lore.kernel.org/linux-arm-kernel/cov...@op.../
+
+ **NON_OCTAL_PERMISSIONS**
+ Permission bits should use 4 digit octal permissions (like 0700 or 0444).
+ Avoid using any other base like decimal.
+
+ **SYMBOLIC_PERMS**
+ Permission bits in the octal form are more readable and easier to
+ understand than their symbolic counterparts because many command-line
+ tools use this notation. Experienced kernel developers have been using
+ these traditional Unix permission bits for decades and so they find it
+ easier to understand the octal notation than the symbolic macros.
+ For example, it is harder to read S_IWUSR|S_IRUGO than 0644, which
+ obscures the developer's intent rather than clarifying it.
+
+ See: https://lore.kernel.org/lkml/CA+...@ma.../
+
+
+Spacing and Brackets
+--------------------
+
+ **ASSIGNMENT_CONTINUATIONS**
+ Assignment operators should not be written at the start of a
+ line but should follow the operand at the previous line.
+
+ **BRACES**
+ The placement of braces is stylistically incorrect.
+ The preferred way is to put the opening brace last on the line,
+ and put the closing brace first::
+
+ if (x is true) {
+ we do y
+ }
+
+ This applies for all non-functional blocks.
+ However, there is one special case, namely functions: they have the
+ opening brace at the beginning of the next line, thus::
+
+ int function(int x)
+ {
+ body of function
+ }
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+
+ **BRACKET_SPACE**
+ Whitespace before opening bracket '[' is prohibited.
+ There are some exceptions:
+
+ 1. With a type on the left::
+
+ int [] a;
+
+ 2. At the beginning of a line for slice initialisers::
+
+ [0...10] = 5,
+
+ 3. Inside a curly brace::
+
+ = { [0...10] = 5 }
+
+ **CONCATENATED_STRING**
+ Concatenated elements should have a space in between.
+ Example::
+
+ printk(KERN_INFO"bar");
+
+ should be::
+
+ printk(KERN_INFO "bar");
+
+ **ELSE_AFTER_BRACE**
+ `else {` should follow the closing block `}` on the same line.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+
+ **LINE_SPACING**
+ Vertical space is wasted given the limited number of lines an
+ editor window can display when multiple blank lines are used.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+
+ **OPEN_BRACE**
+ The opening brace should be following the function definitions on the
+ next line. For any non-functional block it should be on the same line
+ as the last construct.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+
+ **POINTER_LOCATION**
+ When using pointer data or a function that returns a pointer type,
+ the preferred use of * is adjacent to the data name or function name
+ and not adjacent to the type name.
+ Examples::
+
+ char *linux_banner;
+ unsigned long long memparse(char *ptr, char **retptr);
+ char *match_strdup(substring_t *s);
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+
+ **SPACING**
+ Whitespace style used in the kernel sources is described in kernel docs.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+
+ **TRAILING_WHITESPACE**
+ Trailing whitespace should always be removed.
+ Some editors highlight the trailing whitespace and cause visual
+ distractions when editing files.
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+
+ **UNNECESSARY_PARENTHESES**
+ Parentheses are not required in the following cases:
+
+ 1. Function pointer uses::
+
+ (foo->bar)();
+
+ could be::
+
+ foo->bar();
+
+ 2. Comparisons in if::
+
+ if ((foo->bar) && (foo->baz))
+ if ((foo == bar))
+
+ could be::
+
+ if (foo->bar && foo->baz)
+ if (foo == bar)
+
+ 3. addressof/dereference single Lvalues::
+
+ &(foo->bar)
+ *(foo->bar)
+
+ could be::
+
+ &foo->bar
+ *foo->bar
+
+ **WHILE_AFTER_BRACE**
+ while should follow the closing bracket on the same line::
+
+ do {
+ ...
+ } while(something);
+
+ See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+
+
+Others
+------
+
+ **CONFIG_DESCRIPTION**
+ Kconfig symbols should have a help text which fully describes
+ it.
+
+ **CORRUPTED_PATCH**
+ The patch seems to be corrupted or lines are wrapped.
+ Please regenerate the patch file before sending it to the maintainer.
+
+ **CVS_KEYWORD**
+ Since linux moved to git, the CVS markers are no longer used.
+ So, CVS style keywords ($Id$, $Revision$, $Log$) should not be
+ added.
+
+ **DEFAULT_NO_BREAK**
+ switch default case is sometimes written as "default:;". This can
+ cause new cases added below default to be defective.
+
+ A "break;" should be added after empty default statement to avoid
+ unwanted fallthrough.
+
+ **DOS_LINE_ENDINGS**
+ For DOS-formatted patches, there are extra ^M symbols at the end of
+ the line. These should be removed.
+
+ **DT_SCHEMA_BINDING_PATCH**
+ DT bindings moved to a json-schema based format instead of
+ freeform text.
+
+ See: https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
+
+ **DT_SPLIT_BINDING_PATCH**
+ Devicetree bindings should be their own patch. This is because
+ bindings are logically independent from a driver implementation,
+ they have a different maintainer (even though they often
+ are applied via the same tree), and it makes for a cleaner history in the
+ DT only tree created with git-filter-branch.
+
+ See: https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
+
+ **EMBEDDED_FILENAME**
+ Embedding the complete filename path inside the file isn't particularly
+ useful as often the path is moved around and becomes incorrect.
+
+ **FILE_PATH_CHANGES**
+ Whenever files are added, moved, or deleted, the MAINTAINERS file
+ patterns can be out of sync or outdated.
+
+ So MAINTAINERS might need updating in these cases.
+
+ **MEMSET**
+ The memset use appears to be incorrect. This may be caused due to
+ badly ordered parameters. Please recheck the usage.
+
+ **NOT_UNIFIED_DIFF**
+ The patch file does not appear to be in unified-diff format. Please
+ regenerate the patch file before sending it to the maintainer.
+
+ **PRINTF_0XDECIMAL**
+ Prefixing 0x with decimal output is defective and should be corrected.
+
+ **SPDX_LICENSE_TAG**
+ The source file is missing or has an improper SPDX identifier tag.
+ The Linux kernel requires the precise SPDX identifier in all source files,
+ and it is thoroughly documented in the kernel docs.
+
+ See: https://www.kernel.org/doc/html/latest/process/license-rules.html
+
+ **TYPO_SPELLING**
+ Some words may have been misspelled. Consider reviewing them.
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl
index 0a119f1ba..79e759aac 100755
--- a/tools/scripts/checkpatch.pl
+++ b/tools/scripts/checkpatch.pl
@@ -1,38 +1,78 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
+#
# (c) 2001, Dave Jones. (the file handling bit)
# (c) 2005, Joel Schopp <js...@au...> (the ugly bit)
# (c) 2007,2008, Andy Whitcroft <ap...@uk...> (new conditions, test suite)
# (c) 2008-2010 Andy Whitcroft <ap...@ca...>
-# Licensed under the terms of the GNU GPL License version 2
+# (c) 2010-2018 Joe Perches <jo...@pe...>
use strict;
+use warnings;
+use POSIX;
+use File::Basename;
+use Cwd 'abs_path';
+use Term::ANSIColor qw(:constants);
+use Encode qw(decode encode);
my $P = $0;
-$P =~ s@.*/@@g;
+my $D = dirname(abs_path($P));
my $V = '0.32';
use Getopt::Long qw(:config no_auto_abbrev);
my $quiet = 0;
+my $verbose = 0;
+my %verbose_messages = ();
+my %verbose_emitted = ();
my $tree = 1;
my $chk_signoff = 1;
my $chk_patch = 1;
my $tst_only;
my $emacs = 0;
my $terse = 0;
+my $showfile = 0;
my $file = 0;
+my $git = 0;
+my %git_commits = ();
my $check = 0;
+my $check_orig = 0;
my $summary = 1;
my $mailback = 0;
my $summary_file = 0;
my $show_types = 0;
+my $list_types = 0;
+my $fix = 0;
+my $fix_inplace = 0;
my $root;
+my $gitroot = $ENV{'GIT_DIR'};
+$gitroot = ".git" if !defined($gitroot);
my %debug;
+my %camelcase = ();
+my %use_type = ();
+my @use = ();
my %ignore_type = ();
my @ignore = ();
my $help = 0;
my $configuration_file = ".checkpatch.conf";
+my $max_line_length = 100;
+my $ignore_perl_version = 0;
+my $minimum_perl_version = 5.10.0;
+my $min_conf_desc_length = 4;
+my $spelling_file = "$D/spelling.txt";
+my $codespell = 0;
+my $codespellfile = "/usr/share/codespell/dictionary.txt";
+my $user_codespellfile = "";
+my $conststructsfile = "$D/const_structs.checkpatch";
+my $docsfile = "$D/../Documentation/dev-tools/checkpatch.rst";
+my $typedefsfile;
+my $color = "auto";
+my $allow_c99_comments = 1; # Can be overridden by --ignore C99_COMMENT_TOLERANCE
+# git output parsing needs US English output, so first set backtick child process LANGUAGE
+my $git_command ='export LANGUAGE=en_US.UTF-8; git';
+my $tabsize = 8;
+my ${CONFIG_} = "CONFIG_";
sub help {
my ($exitcode) = @_;
@@ -43,16 +83,35 @@ Version: $V
Options:
-q, --quiet quiet
- --no-tree run without a openocd tree
+ -v, --verbose verbose mode
+ --no-tree run without a kernel tree
--no-signoff do not check for 'Signed-off-by' line
--patch treat FILE as patchfile (default)
--emacs emacs compile window format
--terse one line per report
+ --showfile emit diffed file position, not input file position
+ -g, --git treat FILE as a single commit or git revision range
+ single git commit with:
+ <rev>
+ <rev>^
+ <rev>~n
+ multiple git commits with:
+ <rev1>..<rev2>
+ <rev1>...<rev2>
+ <rev>-<count>
+ git merges are ignored
-f, --file treat FILE as regular source file
--subjective, --strict enable more subjective tests
+ --list-types list the possible message types
+ --types TYPE(,TYPE2...) show only these comma separated message types
--ignore TYPE(,TYPE2...) ignore various comma separated message types
- --show-types show the message "types" in the output
- --root=PATH PATH to the openocd tree root
+ --show-types show the specific message type in the output
+ --max-line-length=n set the maximum line length, (default $max_line_length)
+ if exceeded, warn on patches
+ requires --strict for use with --file
+ --min-conf-desc-length=n set the min description length, if shorter, warn
+ --tab-size=n set the number of spaces for tab (default $tabsize)
+ --root=PATH PATH to the kernel tree root
--no-summary suppress the per-file summary
--mailback only produce a report in case of warnings/errors
--summary-file include the filename in summary
@@ -61,6 +120,24 @@ Options:
is all off)
--test-only=WORD report only warnings/errors containing WORD
literally
+ --fix EXPERIMENTAL - may create horrible results
+ If correctable single-line errors exist, create
+ "<inputfile>.EXPERIMENTAL-checkpatch-fixes"
+ with potential errors corrected to the preferred
+ checkpatch style
+ --fix-inplace EXPERIMENTAL - may create horrible results
+ Is the same as --fix, but overwrites the input
+ file. It's your fault if there's no backup or git
+ --ignore-perl-version override checking of perl version. expect
+ runtime errors.
+ --codespell Use the codespell dictionary for spelling/typos
+ (default:$codespellfile)
+ --codespellfile Use this codespell dictionary
+ --typedefsfile Read additional types from this file
+ --color[=WHEN] Use colors 'always', 'never', or only when output
+ is a terminal ('auto'). Default is 'auto'.
+ --kconfig-prefix=WORD use WORD as a prefix for Kconfig symbols (default
+ ${CONFIG_})
-h, --help, --version display this help and exit
When FILE is - read standard input.
@@ -69,6 +146,74 @@ EOM
exit($exitcode);
}
+sub uniq {
+ my %seen;
+ return grep { !$seen{$_}++ } @_;
+}
+
+sub list_types {
+ my ($exitcode) = @_;
+
+ my $count = 0;
+
+ local $/ = undef;
+
+ open(my $script, '<', abs_path($P)) or
+ die "$P: Can't read '$P' $!\n";
+
+ my $text = <$script>;
+ close($script);
+
+ my %types = ();
+ # Also catch when type or level is passed through a variable
+ while ($text =~ /(?:(\bCHK|\bWARN|\bERROR|&\{\$msg_level})\s*\(|\$msg_type\s*=)\s*"([^"]+)"/g) {
+ if (defined($1)) {
+ if (exists($types{$2})) {
+ $types{$2} .= ",$1" if ($types{$2} ne $1);
+ } else {
+ $types{$2} = $1;
+ }
+ } else {
+ $types{$2} = "UNDETERMINED";
+ }
+ }
+
+ print("#\tMessage type\n\n");
+ if ($color) {
+ print(" ( Color coding: ");
+ print(RED . "ERROR" . RESET);
+ print(" | ");
+ print(YELLOW . "WARNING" . RESET);
+ print(" | ");
+ print(GREEN . "CHECK" . RESET);
+ print(" | ");
+ print("Multiple levels / Undetermined");
+ print(" )\n\n");
+ }
+
+ foreach my $type (sort keys %types) {
+ my $orig_type = $type;
+ if ($color) {
+ my $level = $types{$type};
+ if ($level eq "ERROR") {
+ $type = RED . $type . RESET;
+ } elsif ($level eq "WARN") {
+ $type = YELLOW . $type . RESET;
+ } elsif ($level eq "CHK") {
+ $type = GREEN . $type . RESET;
+ }
+ }
+ print(++$count . "\t" . $type . "\n");
+ if ($verbose && exists($verbose_messages{$orig_type})) {
+ my $message = $verbose_messages{$orig_type};
+ $message =~ s/\n/\n\t/g;
+ print("\t" . $message . "\n\n");
+ }
+ }
+
+ exit($exitcode);
+}
+
my $conf = which_conf($configuration_file);
if (-f $conf) {
my @conf_args;
@@ -95,51 +240,189 @@ if (-f $conf) {
unshift(@ARGV, @conf_args) if @conf_args;
}
+sub load_docs {
+ open(my $docs, '<', "$docsfile")
+ or warn "$P: Can't read the documentation file $docsfile $!\n";
+
+ my $type = '';
+ my $desc = '';
+ my $in_desc = 0;
+
+ while (<$docs>) {
+ chomp;
+ my $line = $_;
+ $line =~ s/\s+$//;
+
+ if ($line =~ /^\s*\*\*(.+)\*\*$/) {
+ if ($desc ne '') {
+ $verbose_messages{$type} = trim($desc);
+ }
+ $type = $1;
+ $desc = '';
+ $in_desc = 1;
+ } elsif ($in_desc) {
+ if ($line =~ /^(?:\s{4,}|$)/) {
+ $line =~ s/^\s{4}//;
+ $desc .= $line;
+ $desc .= "\n";
+ } else {
+ $verbose_messages{$type} = trim($desc);
+ $type = '';
+ $desc = '';
+ $in_desc = 0;
+ }
+ }
+ }
+
+ if ($desc ne '') {
+ $verbose_messages{$type} = trim($desc);
+ }
+ close($docs);
+}
+
+# Perl's Getopt::Long allows options to take optional arguments after a space.
+# Prevent --color by itself from consuming other arguments
+foreach (@ARGV) {
+ if ($_ eq "--color" || $_ eq "-color") {
+ $_ = "--color=$color";
+ }
+}
+
GetOptions(
'q|quiet+' => \$quiet,
+ 'v|verbose!' => \$verbose,
'tree!' => \$tree,
'signoff!' => \$chk_signoff,
'patch!' => \$chk_patch,
'emacs!' => \$emacs,
'terse!' => \$terse,
+ 'showfile!' => \$showfile,
'f|file!' => \$file,
+ 'g|git!' => \$git,
'subjective!' => \$check,
'strict!' => \$check,
'ignore=s' => \@ignore,
+ 'types=s' => \@use,
'show-types!' => \$show_types,
+ 'list-types!' => \$list_types,
+ 'max-line-length=i' => \$max_line_length,
+ 'min-conf-desc-length=i' => \$min_conf_desc_length,
+ 'tab-size=i' => \$tabsize,
'root=s' => \$root,
'summary!' => \$summary,
'mailback!' => \$mailback,
'summary-file!' => \$summary_file,
-
+ 'fix!' => \$fix,
+ 'fix-inplace!' => \$fix_inplace,
+ 'ignore-perl-version!' => \$ignore_perl_version,
'debug=s' => \%debug,
'test-only=s' => \$tst_only,
+ 'codespell!' => \$codespell,
+ 'codespellfile=s' => \$user_codespellfile,
+ 'typedefsfile=s' => \$typedefsfile,
+ 'color=s' => \$color,
+ 'no-color' => \$color, #keep old behaviors of -nocolor
+ 'nocolor' => \$color, #keep old behaviors of -nocolor
+ 'kconfig-prefix=s' => \${CONFIG_},
'h|help' => \$help,
'version' => \$help
-) or help(1);
+) or $help = 2;
+
+if ($user_codespellfile) {
+ # Use the user provided codespell file unconditionally
+ $codespellfile = $user_codespellfile;
+} elsif (!(-f $codespellfile)) {
+ # If /usr/share/codespell/dictionary.txt is not present, try to find it
+ # under codespell's install directory: <codespell_root>/data/dictionary.txt
+ if (($codespell || $help) && which("python3") ne "") {
+ my $python_codespell_dict = << "EOF";
+
+import os.path as op
+import codespell_lib
+codespell_dir = op.dirname(codespell_lib.__file__)
+codespell_file = op.join(codespell_dir, 'data', 'dictionary.txt')
+print(codespell_file, end='')
+EOF
+
+ my $codespell_dict = `python3 -c "$python_codespell_dict" 2> /dev/null`;
+ $codespellfile = $codespell_dict if (-f $codespell_dict);
+ }
+}
+
+# $help is 1 if either -h, --help or --version is passed as option - exitcode: 0
+# $help is 2 if invalid option is passed - exitcode: 1
+help($help - 1) if ($help);
+
+die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
+die "$P: --verbose cannot be used with --terse\n" if ($verbose && $terse);
+
+if ($color =~ /^[01]$/) {
+ $color = !$color;
+} elsif ($color =~ /^always$/i) {
+ $color = 1;
+} elsif ($color =~ /^never$/i) {
+ $color = 0;
+} elsif ($color =~ /^auto$/i) {
+ $color = (-t STDOUT);
+} else {
+ die "$P: Invalid color mode: $color\n";
+}
-help(0) if ($help);
+load_docs() if ($verbose);
+list_types(0) if ($list_types);
+
+$fix = 1 if ($fix_inplace);
+$check_orig = $check;
my $exit = 0;
+my $perl_version_ok = 1;
+if ($^V && $^V lt $minimum_perl_version) {
+ $perl_version_ok = 0;
+ printf "$P: requires at least perl version %vd\n", $minimum_perl_version;
+ exit(1) if (!$ignore_perl_version);
+}
+
+#if no filenames are given, push '-' to read patch from stdin
if ($#ARGV < 0) {
- print "$P: no input files\n";
- exit(1);
+ push(@ARGV, '-');
}
-@ignore = split(/,/, join(',',@ignore));
-foreach my $word (@ignore) {
- $word =~ s/\s*\n?$//g;
- $word =~ s/^\s*//g;
- $word =~ s/\s+/ /g;
- $word =~ tr/[a-z]/[A-Z]/;
+# skip TAB size 1 to avoid additional checks on $tabsize - 1
+die "$P: Invalid TAB size: $tabsize\n" if ($tabsize < 2);
+
+sub hash_save_array_words {
+ my ($hashRef, $arrayRef) = @_;
+
+ my @array = split(/,/, join(',', @$arrayRef));
+ foreach my $word (@array) {
+ $word =~ s/\s*\n?$//g;
+ $word =~ s/^\s*//g;
+ $word =~ s/\s+/ /g;
+ $word =~ tr/[a-z]/[A-Z]/;
+
+ next if ($word =~ m/^\s*#/);
+ next if ($word =~ m/^\s*$/);
+
+ $hashRef->{$word}++;
+ }
+}
- next if ($word =~ m/^\s*#/);
- next if ($word =~ m/^\s*$/);
+sub hash_show_words {
+ my ($hashRef, $prefix) = @_;
- $ignore_type{$word}++;
+ if (keys %$hashRef) {
+ print "\nNOTE: $prefix message types:";
+ foreach my $word (sort keys %$hashRef) {
+ print " $word";
+ }
+ print "\n";
+ }
}
+hash_save_array_words(\%ignore_type, \@ignore);
+hash_save_array_words(\%use_type, \@use);
+
my $dbg_values = 0;
my $dbg_possible = 0;
my $dbg_type = 0;
@@ -165,14 +448,14 @@ if ($tree) {
} else {
if (top_of_kernel_tree('.')) {
$root = '.';
- } elsif ($0 =~ m@(.*)/tools/scripts/[^/]*$@ &&
+ } elsif ($0 =~ m@(.*)/scripts/[^/]*$@ &&
top_of_kernel_tree($1)) {
$root = $1;
}
}
if (!defined $root) {
- print "Must be run from the top-level dir. of a openocd tree\n";
+ print "Must be run from the top-level dir. of a kernel tree\n";
exit(2);
}
}
@@ -190,20 +473,28 @@ our $Sparse = qr{
__force|
__iomem|
__must_check|
- __init_refok|
__kprobes|
__ref|
- __rcu
+ __refconst|
+ __refdata|
+ __rcu|
+ __private
}x;
+our $InitAttributePrefix = qr{__(?:mem|cpu|dev|net_|)};
+our $InitAttributeData = qr{$InitAttributePrefix(?:initdata\b)};
+our $InitAttributeConst = qr{$InitAttributePrefix(?:initconst\b)};
+our $InitAttributeInit = qr{$InitAttributePrefix(?:init\b)};
+our $InitAttribute = qr{$InitAttributeData|$InitAttributeConst|$InitAttributeInit};
# Notes to $Attribute:
# We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
our $Attribute = qr{
const|
+ volatile|
__percpu|
__nocast|
__safe|
- __bitwise__|
+ __bitwise|
__packed__|
__packed2__|
__naked|
@@ -212,37 +503,57 @@ our $Attribute = qr{
__noreturn|
__used|
__cold|
+ __pure|
__noclone|
__deprecated|
__read_mostly|
+ __ro_after_init|
__kprobes|
- __(?:mem|cpu|dev|)(?:initdata|initconst|init\b)|
+ $InitAttribute|
____cacheline_aligned|
____cacheline_aligned_in_smp|
____cacheline_internodealigned_in_smp|
- __weak
+ __weak|
+ __alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\)
}x;
our $Modifier;
-our $Inline = qr{inline|__always_inline|noinline};
+our $Inline = qr{inline|__always_inline|noinline|__inline|__inline__};
our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]};
our $Lval = qr{$Ident(?:$Member)*};
-our $Constant = qr{(?:[0-9]+|0x[0-9a-fA-F]+)[UL]*};
-our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)};
-our $Compare = qr{<=|>=|==|!=|<|>};
+our $Int_type = qr{(?i)llu|ull|ll|lu|ul|l|u};
+our $Binary = qr{(?i)0b[01]+$Int_type?};
+our $Hex = qr{(?i)0x[0-9a-f]+$Int_type?};
+our $Int = qr{[0-9]+$Int_type?};
+our $Octal = qr{0[0-7]+$Int_type?};
+our $String = qr{(?:\b[Lu])?"[X\t]*"};
+our $Float_hex = qr{(?i)0x[0-9a-f]+p-?[0-9]+[fl]?};
+our $Float_dec = qr{(?i)(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?};
+our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?};
+our $Float = qr{$Float_hex|$Float_dec|$Float_int};
+our $Constant = qr{$Float|$Binary|$Octal|$Hex|$Int};
+our $Assignment = qr{\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=};
+our $Compare = qr{<=|>=|==|!=|<|(?<!-)>};
+our $Arithmetic = qr{\+|-|\*|\/|%};
our $Operators = qr{
<=|>=|==|!=|
=>|->|<<|>>|<|>|!|~|
- &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|%
+ &&|\|\||,|\^|\+\+|--|&|\||$Arithmetic
}x;
+our $c90_Keywords = qr{do|for|while|if|else|return|goto|continue|switch|default|case|break}x;
+
+our $BasicType;
our $NonptrType;
+our $NonptrTypeMisordered;
+our $NonptrTypeWithAttr;
our $Type;
+our $TypeMisordered;
our $Declare;
+our $DeclareMisordered;
-our $UTF8 = qr {
- [\x09\x0A\x0D\x20-\x7E] # ASCII
- | [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
+our $NON_ASCII_UTF8 = qr{
+ [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
@@ -251,40 +562,172 @@ our $UTF8 = qr {
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
}x;
-our $typeTypedefs = qr{(?x:
+our $UTF8 = qr{
+ [\x09\x0A\x0D\x20-\x7E] # ASCII
+ | $NON_ASCII_UTF8
+}x;
+
+our $typeC99Typedefs = qr{(?:__)?(?:[us]_?)?int_?(?:8|16|32|64)_t};
+our $typeOtherOSTypedefs = qr{...
[truncated message content] |
|
From: OpenOCD-Gerrit <ope...@us...> - 2022-09-18 08:12:36
|
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 61d0757acf222fdd5669b471cc251e03101db273 (commit)
from 27e7f5df5ff691a78ca7530892ee5dc05820a947 (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 61d0757acf222fdd5669b471cc251e03101db273
Author: Ian Thompson <ia...@ca...>
Date: Thu Sep 15 14:14:15 2022 -0700
target/xtensa: invalidate register cache on reset
Resolves issues where registers are accessed when poll() logic is inactive or has not yet been triggered.
Signed-off-by: Ian Thompson <ia...@ca...>
Change-Id: If7a4d00938fb188b008325249627f7773c3484c5
Reviewed-on: https://review.openocd.org/c/openocd/+/7197
Tested-by: jenkins
Reviewed-by: Erhan Kurubas <erh...@es...>
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c
index 50658e9d5..d3be8b441 100644
--- a/src/target/xtensa/xtensa.c
+++ b/src/target/xtensa/xtensa.c
@@ -959,7 +959,6 @@ int xtensa_assert_reset(struct target *target)
struct xtensa *xtensa = target_to_xtensa(target);
LOG_TARGET_DEBUG(target, "target_number=%i, begin", target->target_number);
- target->state = TARGET_RESET;
xtensa_queue_pwr_reg_write(xtensa,
XDMREG_PWRCTL,
PWRCTL_JTAGDEBUGUSE(xtensa) | PWRCTL_DEBUGWAKEUP(xtensa) | PWRCTL_MEMWAKEUP(xtensa) |
@@ -968,8 +967,12 @@ int xtensa_assert_reset(struct target *target)
int res = xtensa_dm_queue_execute(&xtensa->dbg_mod);
if (res != ERROR_OK)
return res;
+
+ /* registers are now invalid */
xtensa->reset_asserted = true;
- return res;
+ register_cache_invalidate(xtensa->core_cache);
+ target->state = TARGET_RESET;
+ return ERROR_OK;
}
int xtensa_deassert_reset(struct target *target)
-----------------------------------------------------------------------
Summary of changes:
src/target/xtensa/xtensa.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|