Xi Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48560 )
Change subject: checkpatch: fix parsing xxx_for_each_xxx function declaration as list macro style ......................................................................
checkpatch: fix parsing xxx_for_each_xxx function declaration as list macro style
Originally[C, xxx_for_each_xxx style matches list style macro, it also matches function declaration. It will cause alert that '{' should be on the previous line.
For example: static void set_vcore_voltage_for_each_freq(const struct ddr_cali *cali) {
Signed-off-by: Xi Chen xixi.chen@mediatek.com Change-Id: Iacbfefc6c9a3c8b58ba77085890bc4239dac1858 --- M util/lint/checkpatch.pl 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/48560/1
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl old mode 100755 new mode 100644 index 1affdb7..9536147 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -3471,7 +3471,8 @@
# if/while/etc brace do not go on next line, unless defining a do while loop, # or if that brace on the next line is for something else - if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*(|do\b|else\b)/ && $line !~ /^.\s*#/) { + if ($line =~ /(.*)\b((?:if|while|for|switch)\s*(|do\b|else\b)/ || $line =~ /^(?:[a-z_]+|)for_each[a-z_]+\s*(|do\b|else\b/ + && $line !~ /^.\s*#/) { my $pre_ctx = "$1$2";
my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0);
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48560
to look at the new patch set (#2).
Change subject: checkpatch: fix parsing function declaration as for_each style ......................................................................
checkpatch: fix parsing function declaration as for_each style
Originally[C, xxx_for_each_xxx style matches list style macro, it also matches function declaration. It will cause alert that '{' should be on the previous line.
For example: static void set_vcore_voltage_for_each_freq(const struct ddr_cali *cali) {
Signed-off-by: Xi Chen xixi.chen@mediatek.com Change-Id: Iacbfefc6c9a3c8b58ba77085890bc4239dac1858 --- M util/lint/checkpatch.pl 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/48560/2
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48560
to look at the new patch set (#3).
Change subject: checkpatch: fix parsing function name as for_each style ......................................................................
checkpatch: fix parsing function name as for_each style
Originally[C, xxx_for_each_xxx style matches list style macro, it also matches function declaration. It will cause alert that '{' should be on the previous line.
For example: static void set_vcore_voltage_for_each_freq(const struct ddr_cali *cali) {
Signed-off-by: Xi Chen xixi.chen@mediatek.com Change-Id: Iacbfefc6c9a3c8b58ba77085890bc4239dac1858 --- M util/lint/checkpatch.pl 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/48560/3
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48560
to look at the new patch set (#4).
Change subject: checkpatch: fix parsing function name as for_each style ......................................................................
checkpatch: fix parsing function name as for_each style
Originally, xxx_for_each_xxx style matches list style macro, it also matches function declaration. It will cause alert that '{' should be on the previous line.
For example: static void set_vcore_voltage_for_each_freq(const struct ddr_cali *cali) {
Signed-off-by: Xi Chen xixi.chen@mediatek.com Change-Id: Iacbfefc6c9a3c8b58ba77085890bc4239dac1858 --- M util/lint/checkpatch.pl 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/48560/4
Hello Hung-Te Lin, build bot (Jenkins), Patrick Georgi, Martin Roth, Yidi Lin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48560
to look at the new patch set (#5).
Change subject: checkpatch: fix parsing function name as for_each style ......................................................................
checkpatch: fix parsing function name as for_each style
The pattern xxx_for_each_xxx style intents to matches list style macro, but it also matches function declaration. It will cause alert that '{' should be on the previous line.
For example: pattern: /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*(|do\b|else\b)/)
source: static void set_vcore_voltage_for_each_freq(const struct ddr_cali *cali) {
Signed-off-by: Xi Chen xixi.chen@mediatek.com Change-Id: Iacbfefc6c9a3c8b58ba77085890bc4239dac1858 --- M util/lint/checkpatch.pl 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/48560/5
Xi Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48560 )
Change subject: checkpatch: fix parsing function name as for_each style ......................................................................
Patch Set 5:
patchset 5: process all coreboot .c and .h files, it is normal, doesn't bring new problems.
Xi Chen has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/48560 )
Change subject: checkpatch: fix parsing function name as for_each style ......................................................................
Abandoned