mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel-doc: be case insensitive when removing attributes
@ 2010-08-19 14:13 Johannes Berg
  2010-08-19 15:57 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2010-08-19 14:13 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML

From: Johannes Berg <johannes.berg@intel.com>

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 <johannes.berg@intel.com>
---
I thought we did this before? Bit confused now :)

 scripts/kernel-doc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/scripts/kernel-doc	2010-08-19 16:11:40.000000000 +0200
+++ wireless-testing/scripts/kernel-doc	2010-08-19 16:11:45.000000000 +0200
@@ -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]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-doc: be case insensitive when removing attributes
  2010-08-19 14:13 [PATCH] kernel-doc: be case insensitive when removing attributes Johannes Berg
@ 2010-08-19 15:57 ` Randy Dunlap
  2010-08-19 16:21   ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2010-08-19 15:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: LKML

On Thu, 19 Aug 2010 16:13:42 +0200 Johannes Berg wrote:

> From: Johannes Berg <johannes.berg@intel.com>
> 
> 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 <johannes.berg@intel.com>
> ---
> 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.

>  scripts/kernel-doc |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- wireless-testing.orig/scripts/kernel-doc	2010-08-19 16:11:40.000000000 +0200
> +++ wireless-testing/scripts/kernel-doc	2010-08-19 16:11:45.000000000 +0200
> @@ -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]
> 
> 
> --


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel-doc: be case insensitive when removing attributes
  2010-08-19 15:57 ` Randy Dunlap
@ 2010-08-19 16:21   ` Johannes Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2010-08-19 16:21 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML

On Thu, 2010-08-19 at 08:57 -0700, Randy Dunlap wrote:
> On Thu, 19 Aug 2010 16:13:42 +0200 Johannes Berg wrote:
> 
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > 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 <johannes.berg@intel.com>
> > ---
> > 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.

> @@ -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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-19 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19 14:13 [PATCH] kernel-doc: be case insensitive when removing attributes Johannes Berg
2010-08-19 15:57 ` Randy Dunlap
2010-08-19 16:21   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®