kernel-doc: be case insensitive when removing attributes
PATCH 1/1 kernel-doc: be case insensitive when removing attributes
From: Johannes Berg <[email protected]>
There are valid attributes that could have upper
case letters, but we still want to remove, like
for example
__attribute__((aligned(NETDEV_ALIGN)))
as encountered in the wireless code.
---
I thought we did this before? Bit confused now :)
scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel-doc +1 -1
@@ -1679,7 +1679,7 @@ sub check_sections($$$$$$) { foreach $px (0 .. $#prms) { $prm_clean = $prms[$px]; $prm_clean =~ s/\[.*\]//; - $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//; + $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i; # ignore array size in a parameter string; # however, the original param string may contain # spaces, e.g.: addr[6 + 2]
Quoted 11 lines · On Thu, 19 Aug 2010 16:13:42 +0200 Johannes Berg wrote:
From: Johannes Berg <[email protected]>
There are valid attributes that could have upper
case letters, but we still want to remove, like
for example__attribute__((aligned(NETDEV_ALIGN)))as encountered in the wireless code.
Signed-off-by Johannes Berg <[email protected]>---
I thought we did this before? Bit confused now :)
I have a similar patch, without patch description & signoff, so maybe it was from irc. Oh, and it's in a different script location.
@@ -1426,6 +1426,7 @@ sub dump_struct($$) {
$members =~ s/kmemcheck_bitfield_.*?;//gos;
# strip attributes $members =~ s/__aligned\s*\(\d+\)//gos; + $members =~ s/__attribute__\s*\(\([a-zA-Z,_()\s\*]*\)\)//gos;
If yours (below) does what is needed, that's fine with me.
Quoted 7 lines
scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/kernel-doc +0
-0@@ -1679,7 +1679,7 @@ sub check_sections($$$$$$) { foreach $px (0 .. $#prms) {
scripts/kernel-doc sub check_sections($$$$$$) {
Quoted 10 lines
scripts/kernel-doc +1
-2$prm_clean = $prms[$px]; $prm_clean =~ s/\[.*\]//; - $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//; + $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i; # ignore array size in a parameter string; # however, the original param string may contain # spaces, e.g.: addr[6 + 2] --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Thu, 19 Aug 2010 16:13:42 +0200 Johannes Berg wrote:
From: Johannes Berg <[email protected]>
There are valid attributes that could have upper
case letters, but we still want to remove, like
for example__attribute__((aligned(NETDEV_ALIGN)))as encountered in the wireless code.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Johannes Berg <[email protected]>---
I thought we did this before? Bit confused now :)I have a similar patch, without patch description & signoff, so maybe it was from irc. Oh, and it's in a different script location.
Oh, ok.
Quoted 8 lines
(quoted diff) +1
-0@@ -1426,6 +1426,7 @@ sub dump_struct($$) { $members =~ s/kmemcheck_bitfield_.*?;//gos; # strip attributes $members =~ s/__aligned\s*\(\d+\)//gos; + $members =~ s/__attribute__\s*\(\([a-zA-Z,_()\s\*]*\)\)//gos;If yours (below) does what is needed, that's fine with me.
Yes, it removes the warning for me.
johannes