public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: refactor remove structure forward declarations
@ 2012-03-12  8:20 Yang Bai
  2012-03-12  9:02 ` Yang Bai
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yang Bai @ 2012-03-12  8:20 UTC (permalink / raw)
  To: mmarek, rostedt, sboyd, hamo.by, adobriyan; +Cc: linux-kernel

Since now it has some problems when generate TAGS,
refactor this code. Now it will not show the error
message and will remove declarations using emacs etags.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
---
 scripts/tags.sh |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 833813a..2b377fc 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -166,9 +166,6 @@ exuberant()
 	all_defconfigs | xargs -r $1 -a                         \
 	--langdef=dotconfig --language-force=dotconfig          \
 	--regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'
-
-	# Remove structure forward declarations.
-	LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' tags
 }
 
 emacs()
@@ -233,6 +230,7 @@ if [ "${ARCH}" = "um" ]; then
 	fi
 fi
 
+remove_structs=
 case "$1" in
 	"cscope")
 		docscope
@@ -245,10 +243,17 @@ case "$1" in
 	"tags")
 		rm -f tags
 		xtags ctags
+		remove_structs=y
 		;;
 
 	"TAGS")
 		rm -f TAGS
 		xtags etags
+		remove_structs=y
 		;;
 esac
+
+# Remove structure forward declarations.
+if [ -n $remove_structs ]; then
+    LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
+fi
-- 
1.7.9.1


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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-03-12  8:20 [PATCH] scripts: refactor remove structure forward declarations Yang Bai
@ 2012-03-12  9:02 ` Yang Bai
  2012-03-12 17:31 ` Stephen Boyd
  2012-04-01  1:59 ` Jike Song
  2 siblings, 0 replies; 11+ messages in thread
From: Yang Bai @ 2012-03-12  9:02 UTC (permalink / raw)
  To: mmarek, rostedt, sboyd, hamo.by, adobriyan; +Cc: linux-kernel

On Mon, Mar 12, 2012 at 4:20 PM, Yang Bai <hamo.by@gmail.com> wrote:
> Since now it has some problems when generate TAGS,
> refactor this code. Now it will not show the error
> message and will remove declarations using emacs etags.
>
> Signed-off-by: Yang Bai <hamo.by@gmail.com>
> ---
>  scripts/tags.sh |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 833813a..2b377fc 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -166,9 +166,6 @@ exuberant()
>        all_defconfigs | xargs -r $1 -a                         \
>        --langdef=dotconfig --language-force=dotconfig          \
>        --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'
> -
> -       # Remove structure forward declarations.
> -       LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' tags
>  }
>
>  emacs()
> @@ -233,6 +230,7 @@ if [ "${ARCH}" = "um" ]; then
>        fi
>  fi
>
> +remove_structs=
>  case "$1" in
>        "cscope")
>                docscope
> @@ -245,10 +243,17 @@ case "$1" in
>        "tags")
>                rm -f tags
>                xtags ctags
> +               remove_structs=y
>                ;;
>
>        "TAGS")
>                rm -f TAGS
>                xtags etags
> +               remove_structs=y
>                ;;
>  esac
> +
> +# Remove structure forward declarations.
> +if [ -n $remove_structs ]; then
> +    LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
> +fi
> --
> 1.7.9.1
>

Reviewed-by: Stephen Boyd

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-03-12  8:20 [PATCH] scripts: refactor remove structure forward declarations Yang Bai
  2012-03-12  9:02 ` Yang Bai
@ 2012-03-12 17:31 ` Stephen Boyd
  2012-03-13  7:05   ` Yang Bai
  2012-04-01  1:59 ` Jike Song
  2 siblings, 1 reply; 11+ messages in thread
From: Stephen Boyd @ 2012-03-12 17:31 UTC (permalink / raw)
  To: Yang Bai; +Cc: mmarek, rostedt, adobriyan, linux-kernel

On 03/12/12 01:20, Yang Bai wrote:
> Since now it has some problems when generate TAGS,
> refactor this code. Now it will not show the error
> message and will remove declarations using emacs etags.
>
> Signed-off-by: Yang Bai <hamo.by@gmail.com>

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

> ---
>  scripts/tags.sh |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 833813a..2b377fc 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -166,9 +166,6 @@ exuberant()
>  	all_defconfigs | xargs -r $1 -a                         \
>  	--langdef=dotconfig --language-force=dotconfig          \
>  	--regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'
> -
> -	# Remove structure forward declarations.
> -	LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' tags
>  }
>  
>  emacs()
> @@ -233,6 +230,7 @@ if [ "${ARCH}" = "um" ]; then
>  	fi
>  fi
>  
> +remove_structs=
>  case "$1" in
>  	"cscope")
>  		docscope
> @@ -245,10 +243,17 @@ case "$1" in
>  	"tags")
>  		rm -f tags
>  		xtags ctags
> +		remove_structs=y
>  		;;
>  
>  	"TAGS")
>  		rm -f TAGS
>  		xtags etags
> +		remove_structs=y
>  		;;
>  esac
> +
> +# Remove structure forward declarations.
> +if [ -n $remove_structs ]; then
> +    LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
> +fi


-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-03-12 17:31 ` Stephen Boyd
@ 2012-03-13  7:05   ` Yang Bai
  2012-03-26 20:23     ` Michal Marek
  0 siblings, 1 reply; 11+ messages in thread
From: Yang Bai @ 2012-03-13  7:05 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: mmarek, rostedt, adobriyan, linux-kernel, linux-kbuild

Ping.

cc linux-kbuild

On Tue, Mar 13, 2012 at 1:31 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 03/12/12 01:20, Yang Bai wrote:
>> Since now it has some problems when generate TAGS,
>> refactor this code. Now it will not show the error
>> message and will remove declarations using emacs etags.
>>
>> Signed-off-by: Yang Bai <hamo.by@gmail.com>
>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
>
>> ---
>>  scripts/tags.sh |   11 ++++++++---
>>  1 files changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/scripts/tags.sh b/scripts/tags.sh
>> index 833813a..2b377fc 100755
>> --- a/scripts/tags.sh
>> +++ b/scripts/tags.sh
>> @@ -166,9 +166,6 @@ exuberant()
>>       all_defconfigs | xargs -r $1 -a                         \
>>       --langdef=dotconfig --language-force=dotconfig          \
>>       --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'
>> -
>> -     # Remove structure forward declarations.
>> -     LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' tags
>>  }
>>
>>  emacs()
>> @@ -233,6 +230,7 @@ if [ "${ARCH}" = "um" ]; then
>>       fi
>>  fi
>>
>> +remove_structs=
>>  case "$1" in
>>       "cscope")
>>               docscope
>> @@ -245,10 +243,17 @@ case "$1" in
>>       "tags")
>>               rm -f tags
>>               xtags ctags
>> +             remove_structs=y
>>               ;;
>>
>>       "TAGS")
>>               rm -f TAGS
>>               xtags etags
>> +             remove_structs=y
>>               ;;
>>  esac
>> +
>> +# Remove structure forward declarations.
>> +if [ -n $remove_structs ]; then
>> +    LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
>> +fi
>
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-03-13  7:05   ` Yang Bai
@ 2012-03-26 20:23     ` Michal Marek
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Marek @ 2012-03-26 20:23 UTC (permalink / raw)
  To: Yang Bai; +Cc: Stephen Boyd, rostedt, adobriyan, linux-kernel, linux-kbuild

On Tue, Mar 13, 2012 at 03:05:47PM +0800, Yang Bai wrote:
> Ping.
> 
> cc linux-kbuild
> 
> On Tue, Mar 13, 2012 at 1:31 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 03/12/12 01:20, Yang Bai wrote:
> >> Since now it has some problems when generate TAGS,
> >> refactor this code. Now it will not show the error
> >> message and will remove declarations using emacs etags.
> >>
> >> Signed-off-by: Yang Bai <hamo.by@gmail.com>
> >
> > Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

Applied to kbuild.git#misc.

Michal

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-03-12  8:20 [PATCH] scripts: refactor remove structure forward declarations Yang Bai
  2012-03-12  9:02 ` Yang Bai
  2012-03-12 17:31 ` Stephen Boyd
@ 2012-04-01  1:59 ` Jike Song
  2012-04-01  6:41   ` Stephen Boyd
  2 siblings, 1 reply; 11+ messages in thread
From: Jike Song @ 2012-04-01  1:59 UTC (permalink / raw)
  To: Yang Bai; +Cc: mmarek, rostedt, sboyd, adobriyan, linux-kernel

On Mon, Mar 12, 2012 at 4:20 PM, Yang Bai <hamo.by@gmail.com> wrote:
> Since now it has some problems when generate TAGS,
> refactor this code. Now it will not show the error
> message and will remove declarations using emacs etags.

Seems broke cscope build:

$ make cscope
  GEN     cscope
sed: can't read cscope: No such file or directory
make: *** [cscope] Error 2

with V=1:

  /bin/sh /Sources/linux-2.6/scripts/tags.sh cscope
+ ignore='( -name SCCS -o -name BitKeeper -o -name .svn -o
-name CVS  -o -name .pc       -o -name .hg  -o           -name .git )
                                           -prune -o'
+ '[' '' = '' ']'
+ tree=
+ '[' '' = '' ']'
+ ALLSOURCE_ARCHS=x86
+ '[' x86_64 = um ']'
+ remove_structs=
+ case "$1" in
+ docscope
+ echo -k
+ echo -q
+ all_sources
+ find_arch_include_sources x86 '*.[chS]'
++ find arch/x86/ -name include -type d
+ include=arch/x86/include
+ '[' -n arch/x86/include ']'
+ archincludedir=' arch/x86/include'
+ find arch/x86/include '(' -name SCCS -o -name BitKeeper -o -name
.svn -o -name CVS -o -name .pc -o -name .hg -o -name .git ')' -prune
-o -name '*.[chS]' -print
+ '[' '!' -z '' ']'
+ find_include_sources '*.[chS]'
+ find include '(' -name SCCS -o -name BitKeeper -o -name .svn -o
-name CVS -o -name .pc -o -name .hg -o -name .git ')' -prune -o -name
config -prune -o -name '*.[chS]' -print
+ for arch in '$ALLSOURCE_ARCHS'
+ find_sources x86 '*.[chS]'
+ find_arch_sources x86 '*.[chS]'
+ for i in '$archincludedir'
+ prune=' -wholename arch/x86/include -prune -o'
+ find arch/x86 '(' -name SCCS -o -name BitKeeper -o -name .svn -o
-name CVS -o -name .pc -o -name .hg -o -name .git ')' -prune -o
-wholename arch/x86/include -prune -o -name '*.[chS]' -print
+ find_other_sources '*.[chS]'
+ find COPYING CREDITS Documentation Kbuild Kconfig MAINTAINERS
Makefile README REPORTING-BUGS arch block crypto cscope.files
cscope.out cscope.out.in cscope.out.po drivers firmware fs include
init ipc kernel lib mm net samples scripts security sound tags tools
usr virt '(' -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS
-o -name .pc -o -name .hg -o -name .git ')' -prune -o '(' -name
include -o -name arch -o -name '.tmp_*' ')' -prune -o -name '*.[chS]'
-print
+ cscope -b -f cscope.out
+ '[' -n ']'
+ LANG=C
+ sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct
\1;.*\$\/;"\tx$/d' cscope
sed: can't read cscope: No such file or directory
make: *** [cscope] Error 2




-- 
Thanks,
Jike

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-04-01  1:59 ` Jike Song
@ 2012-04-01  6:41   ` Stephen Boyd
  2012-04-01  8:31     ` Jike Song
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Stephen Boyd @ 2012-04-01  6:41 UTC (permalink / raw)
  To: Jike Song; +Cc: Yang Bai, mmarek, rostedt, adobriyan, linux-kernel

On 3/31/2012 6:59 PM, Jike Song wrote:
> Seems broke cscope build:
>
> $ make cscope
>   GEN     cscope
> sed: can't read cscope: No such file or directory
> make: *** [cscope] Error 2
>
> with V=1:
[snip]
> + cscope -b -f cscope.out
> + '[' -n ']'
> + LANG=C
> + sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct
> \1;.*\$\/;"\tx$/d' cscope
> sed: can't read cscope: No such file or directory
> make: *** [cscope] Error 2

Ah yes. Forgot the quotes.

---->8------

Subject: [PATCH] tags.sh: Add missing quotes

When $remove_structs is empty a test for empty string will turn
into test -n with no arguments meaning true. Add quotes so an
empty string is tested and so that make cscope works again.

Reported-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 scripts/tags.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 0d6004e..cf7b12f 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -254,6 +254,6 @@ case "$1" in
 esac

 # Remove structure forward declarations.
-if [ -n $remove_structs ]; then
+if [ -n "$remove_structs" ]; then
     LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
 fi

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-04-01  6:41   ` Stephen Boyd
@ 2012-04-01  8:31     ` Jike Song
  2012-04-01 12:19       ` Yang Bai
  2012-04-01 12:18     ` Yang Bai
  2012-04-02  9:31     ` Michal Marek
  2 siblings, 1 reply; 11+ messages in thread
From: Jike Song @ 2012-04-01  8:31 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Yang Bai, mmarek, rostedt, adobriyan, linux-kernel

On Sun, Apr 1, 2012 at 2:41 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>
> Ah yes. Forgot the quotes.
>
> Subject: [PATCH] tags.sh: Add missing quotes

it's fixed, thanks.

-- 
Thanks,
Jike

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-04-01  6:41   ` Stephen Boyd
  2012-04-01  8:31     ` Jike Song
@ 2012-04-01 12:18     ` Yang Bai
  2012-04-02  9:31     ` Michal Marek
  2 siblings, 0 replies; 11+ messages in thread
From: Yang Bai @ 2012-04-01 12:18 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Jike Song, mmarek, rostedt, adobriyan, linux-kernel

On Sun, Apr 1, 2012 at 2:41 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 3/31/2012 6:59 PM, Jike Song wrote:
>> Seems broke cscope build:
>>
>> $ make cscope
>>   GEN     cscope
>> sed: can't read cscope: No such file or directory
>> make: *** [cscope] Error 2
>>
>> with V=1:
> [snip]
>> + cscope -b -f cscope.out
>> + '[' -n ']'
>> + LANG=C
>> + sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct
>> \1;.*\$\/;"\tx$/d' cscope
>> sed: can't read cscope: No such file or directory
>> make: *** [cscope] Error 2
>
> Ah yes. Forgot the quotes.
>
> ---->8------
>
> Subject: [PATCH] tags.sh: Add missing quotes
>
> When $remove_structs is empty a test for empty string will turn
> into test -n with no arguments meaning true. Add quotes so an
> empty string is tested and so that make cscope works again.
>
> Reported-by: Jike Song <albcamus@gmail.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  scripts/tags.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 0d6004e..cf7b12f 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -254,6 +254,6 @@ case "$1" in
>  esac
>
>  # Remove structure forward declarations.
> -if [ -n $remove_structs ]; then
> +if [ -n "$remove_structs" ]; then
>     LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
>  fi
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>

Acked-by: Yang Bai <hamo.by@gmail.com>

-- 
    """
    Keep It Simple,Stupid.
    """

Chinese Name: 白杨
Nick Name: Hamo
Homepage: http://hamobai.com/
GPG KEY ID: 0xA4691A33
Key fingerprint = 09D5 2D78 8E2B 0995 CF8E  4331 33C4 3D24 A469 1A33

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-04-01  8:31     ` Jike Song
@ 2012-04-01 12:19       ` Yang Bai
  0 siblings, 0 replies; 11+ messages in thread
From: Yang Bai @ 2012-04-01 12:19 UTC (permalink / raw)
  To: Jike Song; +Cc: Stephen Boyd, mmarek, rostedt, adobriyan, linux-kernel

On Sun, Apr 1, 2012 at 4:31 PM, Jike Song <albcamus@gmail.com> wrote:
> On Sun, Apr 1, 2012 at 2:41 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>>
>> Ah yes. Forgot the quotes.
>>
>> Subject: [PATCH] tags.sh: Add missing quotes
>
> it's fixed, thanks.
>
> --
> Thanks,
> Jike

Thanks for reporting and testing for this bug.


-- 
    """
    Keep It Simple,Stupid.
    """

Chinese Name: 白杨
Nick Name: Hamo
Homepage: http://hamobai.com/
GPG KEY ID: 0xA4691A33
Key fingerprint = 09D5 2D78 8E2B 0995 CF8E  4331 33C4 3D24 A469 1A33

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

* Re: [PATCH] scripts: refactor remove structure forward declarations
  2012-04-01  6:41   ` Stephen Boyd
  2012-04-01  8:31     ` Jike Song
  2012-04-01 12:18     ` Yang Bai
@ 2012-04-02  9:31     ` Michal Marek
  2 siblings, 0 replies; 11+ messages in thread
From: Michal Marek @ 2012-04-02  9:31 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Jike Song, Yang Bai, rostedt, adobriyan, linux-kernel

On 1.4.2012 08:41, Stephen Boyd wrote:
> On 3/31/2012 6:59 PM, Jike Song wrote:
>> Seems broke cscope build:
>>
>> $ make cscope
>>   GEN     cscope
>> sed: can't read cscope: No such file or directory
>> make: *** [cscope] Error 2
>>
>> with V=1:
> [snip]
>> + cscope -b -f cscope.out
>> + '[' -n ']'
>> + LANG=C
>> + sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct
>> \1;.*\$\/;"\tx$/d' cscope
>> sed: can't read cscope: No such file or directory
>> make: *** [cscope] Error 2
> 
> Ah yes. Forgot the quotes.
> 
> ---->8------
> 
> Subject: [PATCH] tags.sh: Add missing quotes
> 
> When $remove_structs is empty a test for empty string will turn
> into test -n with no arguments meaning true. Add quotes so an
> empty string is tested and so that make cscope works again.
> 
> Reported-by: Jike Song <albcamus@gmail.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  scripts/tags.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 0d6004e..cf7b12f 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -254,6 +254,6 @@ case "$1" in
>  esac
> 
>  # Remove structure forward declarations.
> -if [ -n $remove_structs ]; then
> +if [ -n "$remove_structs" ]; then
>      LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
>  fi
> 

Applied to kbuild.git#rc-fixes, thanks.

Michal

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

end of thread, other threads:[~2012-04-02  9:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12  8:20 [PATCH] scripts: refactor remove structure forward declarations Yang Bai
2012-03-12  9:02 ` Yang Bai
2012-03-12 17:31 ` Stephen Boyd
2012-03-13  7:05   ` Yang Bai
2012-03-26 20:23     ` Michal Marek
2012-04-01  1:59 ` Jike Song
2012-04-01  6:41   ` Stephen Boyd
2012-04-01  8:31     ` Jike Song
2012-04-01 12:19       ` Yang Bai
2012-04-01 12:18     ` Yang Bai
2012-04-02  9:31     ` Michal Marek

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