checkpatch: add MA_STATE to declaration_macros
PATCH 1/1 checkpatch: add MA_STATE to declaration_macros
MA_STATE is used repeatedly as a declaration, add it to the list.
I left out the $Storage regex component, since I saw no cases wanting it, via: $> grep -r -B1 '\bMA_STATE' .
This change fixes the following, reproduced locally.
--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +2 -1
@@ -1096,7 +1096,8 @@ our $declaration_macros = qr{(?x: (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(| (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(| (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(| - (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\( + (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(| + (?:MA_STATE)\s*\( )}; our %allow_repeated_words = (
Signature · 1 line
2.51.1
Joe Perches
maintainerQuoted 1 line · Jim Cromie
MA_STATEis used repeatedly as a declaration, add it to the list.
OK but
Quoted 4 lines
I left out the $Storage regex component, since I saw no cases wanting it, via: $> grep -r -B1 '\bMA_STATE' .
This change fixes the following, reproduced locally.
No following ?
And I looked at the MA_STATE macro definition that has several NULL or zero unnecessary member initializations but doesn't initialize the entire structure as all non-named members are NULL or zero by default.
I wonder if the unnecessary NULL/0 initializations there could actually increase the object size.
With gcc 15.2.1 allyesconfig & defconfig do not change either way but I don't know if all supported versions minimize the initialization properly.
Quoted 2 lines
This Closes: url is not found on lore
Quoted 20 lines
Signed-off-by Jim Cromie <[email protected]>--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)scripts/checkpatch.pl +2
-1@@ -1096,7 +1096,8 @@ our $declaration_macros = qr{(?x: (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(| (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(| (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(| - (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\( + (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(| + (?:MA_STATE)\s*\( )}; our %allow_repeated_words = (
Quoted 4 lines · Joe Perches
Quoted 1 line · Jim Cromie
MA_STATEis used repeatedly as a declaration, add it to the list.
Quoted 8 lines
OK but
Quoted 4 lines
I left out the $Storage regex component, since I saw no cases wanting it, via: $> grep -r -B1 '\bMA_STATE' .
This change fixes the following, reproduced locally.
No following ?
the oe-kbuild report followed, but the link didnt work right..
Quoted 9 lines
And I looked at the
MA_STATEmacro definition that has several NULL or zero unnecessary member initializations but doesn't initialize the entire structure as all non-named members are NULL or zero by default.I wonder if the unnecessary NULL/0 initializations there could actually increase the object size.
Quoted 8 lines
With gcc 15.2.1 allyesconfig & defconfig do not change either way but I don't know if all supported versions minimize the initialization properly.
Quoted 2 lines
This Closes: url is not found on lore
That is weird.
when I follow the Closes link, I get something unexpected - a "not found - look here maybe",
AND a ../oe-kbuild/ link -
clicking that takes me to the report proper.
If you retry, you can edit the "-all" out of the URL and it works.
It sounds like a small bug somewhere in the lkp-robot CI chain.
Quoted 21 lines
Quoted 21 lines
Signed-off-by Jim Cromie <[email protected]>--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)scripts/checkpatch.pl +2
-1@@ -1096,7 +1096,8 @@ our $declaration_macros = qr{(?x: (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(| (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(| (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(| - (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\( + (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(| + (?:MA_STATE)\s*\( )}; our %allow_repeated_words = (
Quoted 40 lines · On Sun, Nov 09, 2025 at 08:09:47AM -0700, [email protected] wrote:
Quoted 4 lines · Joe Perches
Quoted 1 line · Jim Cromie
MA_STATEis used repeatedly as a declaration, add it to the list.Quoted 8 lines
OK but
Quoted 4 lines
I left out the $Storage regex component, since I saw no cases wanting it, via: $> grep -r -B1 '\bMA_STATE' .
This change fixes the following, reproduced locally.
No following ?
the oe-kbuild report followed, but the link didnt work right..
Quoted 9 lines
And I looked at the
MA_STATEmacro definition that has several NULL or zero unnecessary member initializations but doesn't initialize the entire structure as all non-named members are NULL or zero by default.I wonder if the unnecessary NULL/0 initializations there could actually increase the object size.
Quoted 8 lines
With gcc 15.2.1 allyesconfig & defconfig do not change either way but I don't know if all supported versions minimize the initialization properly.
Quoted 2 lines
This Closes: url is not found on lore
That is weird.
when I follow the Closes link, I get something unexpected - a "not found - look here maybe",
AND a ../oe-kbuild/ link -
clicking that takes me to the report proper.
Quoted 3 lines
If you retry, you can edit the "-all" out of the URL and it works.
It sounds like a small bug somewhere in the lkp-robot CI chain.
Sorry, this is a bug in the bot, i will fix it to point to the right link oe-kbuild for these manual check reports.
Quoted 24 lines
Quoted 23 lines
Quoted 23 lines
Signed-off-by Jim Cromie <[email protected]>--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)scripts/checkpatch.pl +2
-1@@ -1096,7 +1096,8 @@ our $declaration_macros = qr{(?x: (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(| (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(| (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(| - (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\( + (?:$Storage\s+)?(?:XA_STATE|XA_STATE_ORDER)\s*\(| + (?:MA_STATE)\s*\( )}; our %allow_repeated_words = (