linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Suggestion] about latest commit for "scripts/get_maintainers.pl"
@ 2013-11-01 11:20 Chen Gang
  2013-11-01 18:32 ` Joe Perches
  0 siblings, 1 reply; 15+ messages in thread
From: Chen Gang @ 2013-11-01 11:20 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, linux-kernel

Hello Joe:

I meet a failure about "scripts/get_maintainers.pl", it is about the
commit "750432d get_maintainer.pl incomplete output", if use original
"scripts/get_maintainer.pl", it will be OK.

Please help check, thanks.


The related information:

-------------------------information begin---------------------------

  [root@gchenlinux linux-next]# ./scripts/get_maintainer.pl /tmp/0001-hexagon-kernel-remove-useless-variables-dn-r-and-err.patch
  Can't use string ("GitAuthor: Chen Gang <gang.chen@"...) as an ARRAY ref while "strict refs" in use at ./scripts/get_maintainer.pl line 1883.

  [root@gchenlinux linux-next]# cat /tmp/0001-hexagon-kernel-remove-useless-variables-dn-r-and-err.patch
  From ef7384078bacdc5151039ea710943e5710d7c5ed Mon Sep 17 00:00:00 2001
  From: Chen Gang <gang.chen@asianux.com>
  Date: Fri, 1 Nov 2013 18:58:18 +0800
  Subject: [PATCH] hexagon: kernel: remove useless variables 'dn', 'r' and 'err' in time_init_deferred() in "time.c"
  
  Remove them, since they are useless. The related warnings (with allmodconfig for v4):
  
      CC      arch/hexagon/kernel/time.o
    arch/hexagon/kernel/time.c: In function 'time_init_deferred':
    arch/hexagon/kernel/time.c:196: warning: unused variable 'err'
    arch/hexagon/kernel/time.c:195: warning: unused variable 'r'
    arch/hexagon/kernel/time.c:194: warning: unused variable 'dn'
  
  
  Signed-off-by: Chen Gang <gang.chen@asianux.com>
  ---
   arch/hexagon/kernel/time.c |    3 ---
   1 files changed, 0 insertions(+), 3 deletions(-)
  
  diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
  index 9903fad..d0c4f5a 100644
  --- a/arch/hexagon/kernel/time.c
  +++ b/arch/hexagon/kernel/time.c
  @@ -191,9 +191,6 @@ void __init time_init_deferred(void)
   {
   	struct resource *resource = NULL;
   	struct clock_event_device *ce_dev = &hexagon_clockevent_dev;
  -	struct device_node *dn;
  -	struct resource r;
  -	int err;
  
   	ce_dev->cpumask = cpu_all_mask;
  
  -- 
  1.7.7.6

-------------------------information end-----------------------------


Thanks.
-- 
Chen Gang

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

* Re: [Suggestion] about latest commit for "scripts/get_maintainers.pl"
  2013-11-01 11:20 [Suggestion] about latest commit for "scripts/get_maintainers.pl" Chen Gang
@ 2013-11-01 18:32 ` Joe Perches
  2013-11-02 14:07   ` Chen Gang F T
  0 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-01 18:32 UTC (permalink / raw)
  To: Chen Gang; +Cc: Andrew Morton, linux-kernel

On Fri, 2013-11-01 at 19:20 +0800, Chen Gang wrote:
> Hello Joe:

Hello Chen Gang.

> I meet a failure about "scripts/get_maintainers.pl", it is about the
> commit "750432d get_maintainer.pl incomplete output", if use original
> "scripts/get_maintainer.pl", it will be OK.
> 
> Please help check, thanks.

I don't get that effect.
I'll look into it and see what I find next week.
You seem to have a work-around available.

Joe


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

* Re: [Suggestion] about latest commit for "scripts/get_maintainers.pl"
  2013-11-01 18:32 ` Joe Perches
@ 2013-11-02 14:07   ` Chen Gang F T
  2013-11-04 21:54     ` [PATCH -next] get_maintainer: Improve "Author:" rolestats Joe Perches
  0 siblings, 1 reply; 15+ messages in thread
From: Chen Gang F T @ 2013-11-02 14:07 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

On 11/02/2013 02:32 AM, Joe Perches wrote:
> On Fri, 2013-11-01 at 19:20 +0800, Chen Gang wrote:
>> > Hello Joe:
> Hello Chen Gang.
> 
>> > I meet a failure about "scripts/get_maintainers.pl", it is about the
>> > commit "750432d get_maintainer.pl incomplete output", if use original
>> > "scripts/get_maintainer.pl", it will be OK.
>> > 
>> > Please help check, thanks.
> I don't get that effect.

For me now, I made 3 patches for hexagon, 2 of them can cause issue. I
use sfr next-20131101 tree, the related patch is in attachment (1, 3 can
cause issue), hope they are useful for us.

> I'll look into it and see what I find next week.

Thank you very much, just please help analyze it when you have time.

> You seem to have a work-around available.

Yes, at least now, it doesn't matter to me. I guess this issue is not
urgent to us.


Thanks.
-- 
Chen Gang

[-- Attachment #2: 0001-hexagon-kernel-remove-useless-variables-dn-r-and-err.patch --]
[-- Type: text/x-patch, Size: 847 bytes --]

>From ef7384078bacdc5151039ea710943e5710d7c5ed Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen@asianux.com>
Date: Fri, 1 Nov 2013 18:58:18 +0800
Subject: [PATCH 1/3] hexagon: kernel: remove useless variables 'dn', 'r' and
 'err' in time_init_deferred() in "time.c"


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/hexagon/kernel/time.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
index 9903fad..d0c4f5a 100644
--- a/arch/hexagon/kernel/time.c
+++ b/arch/hexagon/kernel/time.c
@@ -191,9 +191,6 @@ void __init time_init_deferred(void)
 {
 	struct resource *resource = NULL;
 	struct clock_event_device *ce_dev = &hexagon_clockevent_dev;
-	struct device_node *dn;
-	struct resource r;
-	int err;
 
 	ce_dev->cpumask = cpu_all_mask;
 
-- 
1.7.7.6


[-- Attachment #3: 0002-hexagon-kernel-kgdb-include-related-header-for-pass-.patch --]
[-- Type: text/x-patch, Size: 1211 bytes --]

>From 2e587500be49b44b8d8a5b1e429c6f75b0803495 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen@asianux.com>
Date: Fri, 1 Nov 2013 19:44:02 +0800
Subject: [PATCH] hexagon: kernel: kgdb: include related header for pass compiling.

Need include related headers for pass compiling, the related error (with allmodconfig for v4):

    CC      arch/hexagon/kernel/kgdb.o
  arch/hexagon/kernel/kgdb.c:30: error: invalid use of undefined type 'struct pt_regs'
  arch/hexagon/kernel/kgdb.c:31: error: invalid use of undefined type 'struct pt_regs'
  ...
  arch/hexagon/kernel/kgdb.c:220: error: implicit declaration of function 'local_irq_save'
  arch/hexagon/kernel/kgdb.c:222: error: implicit declaration of function 'local_irq_restore'
  ...


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/hexagon/kernel/kgdb.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c
index 82d5c25..038580c 100644
--- a/arch/hexagon/kernel/kgdb.c
+++ b/arch/hexagon/kernel/kgdb.c
@@ -18,6 +18,8 @@
  * 02110-1301, USA.
  */
 
+#include <linux/irq.h>
+#include <linux/sched.h>
 #include <linux/kdebug.h>
 #include <linux/kgdb.h>
 
-- 
1.7.7.6


[-- Attachment #4: 0003-hexagon-include-asm-kgdb-add-cs0-1-for-DBG_MAX_REG_N.patch --]
[-- Type: text/x-patch, Size: 1464 bytes --]

>From cc69a713ea496aa8e952d9c3c312a659dc1fd5ab Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen@asianux.com>
Date: Fri, 1 Nov 2013 19:45:59 +0800
Subject: [PATCH] hexagon: include: asm: kgdb: extend DBG_MAX_REG_NUM for "cs0/1"

Need extend maximized number for "cs0/1", the related warning (with allmodconfig for v4):

  arch/hexagon/kernel/kgdb.c:79: warning: excess elements in array initializer
  arch/hexagon/kernel/kgdb.c:79: warning: (near initialization for 'dbg_reg_def')
  arch/hexagon/kernel/kgdb.c:80: warning: excess elements in array initializer
  arch/hexagon/kernel/kgdb.c:80: warning: (near initialization for 'dbg_reg_def')


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/hexagon/include/asm/kgdb.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h
index 32a6fb6..ccd3ac3 100644
--- a/arch/hexagon/include/asm/kgdb.h
+++ b/arch/hexagon/include/asm/kgdb.h
@@ -34,10 +34,11 @@ static inline void arch_kgdb_breakpoint(void)
  * 32 gpr + sa0/1 + lc0/1 + m0/1 + gp + ugp + pred + pc = 42 total.
  * vm regs = psp+elr+est+badva = 4
  * syscall+restart = 2 more
- * so 48 = 42 +4 + 2
+ * also add cs0/1 = 2
+ * so 48 = 42 + 4 + 2 + 2
  */
 #define DBG_USER_REGS 42
-#define DBG_MAX_REG_NUM (DBG_USER_REGS + 6)
+#define DBG_MAX_REG_NUM (DBG_USER_REGS + 8)
 #define NUMREGBYTES  (DBG_MAX_REG_NUM*4)
 
 #endif /* __HEXAGON_KGDB_H__ */
-- 
1.7.7.6


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

* [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-02 14:07   ` Chen Gang F T
@ 2013-11-04 21:54     ` Joe Perches
  2013-11-05  2:22       ` Chen Gang
  0 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-04 21:54 UTC (permalink / raw)
  To: Chen Gang F T; +Cc: Chen Gang, Andrew Morton, linux-kernel

Add this to "try this"...

Chen Gang's defect is because his git repository branch
had a commit he authored but where did not add his signature.

Also, there's a defect in function vcs_find_signers.
It should only return the commit count and array references.

If there are no signers in the commit history interval specified,
then the "authors" array is added to the "signers" array and
returned as a single array.

Use references instead.

Make sure that references are defined in the places
that vcs_find_signers is called.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/get_maintainer.pl | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ee9adb8..9c3986f 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -128,7 +128,7 @@ my %VCS_cmds_git = (
     "blame_commit_pattern" => "^([0-9a-f]+) ",
     "author_pattern" => "^GitAuthor: (.*)",
     "subject_pattern" => "^GitSubject: (.*)",
-    "stat_pattern" => "(\\d+)\\t(\\d+)\\t\$file",
+    "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$",
 );
 
 my %VCS_cmds_hg = (
@@ -156,7 +156,7 @@ my %VCS_cmds_hg = (
     "blame_commit_pattern" => "^([ 0-9a-f]+):",
     "author_pattern" => "^HgAuthor: (.*)",
     "subject_pattern" => "^HgSubject: (.*)",
-    "stat_pattern" => "(\\d+)\t(\\d+)\t\$file",
+    "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$",
 );
 
 my $conf = which_conf(".get_maintainer.conf");
@@ -1297,7 +1297,7 @@ sub vcs_find_signers {
 
 #    print("stats: <@stats>\n");
 
-    return (0, @signatures, @authors) if !@signatures;
+    return (0, \@signatures, \@authors, \@stats) if !@signatures;
 
     save_commits_by_author(@lines) if ($interactive);
     save_commits_by_signer(@lines) if ($interactive);
@@ -1880,9 +1880,10 @@ sub vcs_file_signoffs {
     $cmd =~ s/(\$\w+)/$1/eeg;		# interpolate $cmd
 
     ($commits, $signers_ref, $authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
-    @signers = @{$signers_ref};
-    @authors = @{$authors_ref};
-    @stats = @{$stats_ref};
+
+    @signers = @{$signers_ref} if defined $signers_ref;
+    @authors = @{$authors_ref} if defined $authors_ref;
+    @stats = @{$stats_ref} if defined $stats_ref;
 
 #    print("commits: <$commits>\nsigners:<@signers>\nauthors: <@authors>\nstats: <@stats>\n");
 
@@ -1965,8 +1966,8 @@ sub vcs_file_blame {
 	    $cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
 
 	    ($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
-	    @commit_authors = @{$commit_authors_ref};
-	    @commit_signers = @{$commit_signers_ref};
+	    @commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
+	    @commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
 
 	    push(@signers, @commit_signers);
 	} else {
@@ -1983,8 +1984,8 @@ sub vcs_file_blame {
 		$cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
 
 		($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
-		@commit_authors = @{$commit_authors_ref};
-		@commit_signers = @{$commit_signers_ref};
+		@commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
+		@commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
 
 		push(@signers, @commit_signers);
 	    }



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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-04 21:54     ` [PATCH -next] get_maintainer: Improve "Author:" rolestats Joe Perches
@ 2013-11-05  2:22       ` Chen Gang
  2013-11-05  2:37         ` Chen Gang
  0 siblings, 1 reply; 15+ messages in thread
From: Chen Gang @ 2013-11-05  2:22 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4041 bytes --]

On 11/05/2013 05:54 AM, Joe Perches wrote:
> Add this to "try this"...
> 
> Chen Gang's defect is because his git repository branch
> had a commit he authored but where did not add his signature.
> 

Hmm... for pure next-20131101 tree in my git directory and the demo
patches in attachment, it will cause this issue.

And excuse me, I am not quite familiar with git, could you provide more
details (e.g. where the special difference of the demo patches or the
pure next-20131101 tree in my git directory)? thanks.

> Also, there's a defect in function vcs_find_signers.
> It should only return the commit count and array references.
> 
> If there are no signers in the commit history interval specified,
> then the "authors" array is added to the "signers" array and
> returned as a single array.
> 
> Use references instead.
> 
> Make sure that references are defined in the places
> that vcs_find_signers is called.
> 

After apply the patch below, it can work well.

Tested-by Chen Gang <gang.chen@asianux.com>



> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  scripts/get_maintainer.pl | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index ee9adb8..9c3986f 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -128,7 +128,7 @@ my %VCS_cmds_git = (
>      "blame_commit_pattern" => "^([0-9a-f]+) ",
>      "author_pattern" => "^GitAuthor: (.*)",
>      "subject_pattern" => "^GitSubject: (.*)",
> -    "stat_pattern" => "(\\d+)\\t(\\d+)\\t\$file",
> +    "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$",
>  );
>  
>  my %VCS_cmds_hg = (
> @@ -156,7 +156,7 @@ my %VCS_cmds_hg = (
>      "blame_commit_pattern" => "^([ 0-9a-f]+):",
>      "author_pattern" => "^HgAuthor: (.*)",
>      "subject_pattern" => "^HgSubject: (.*)",
> -    "stat_pattern" => "(\\d+)\t(\\d+)\t\$file",
> +    "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$",
>  );
>  
>  my $conf = which_conf(".get_maintainer.conf");
> @@ -1297,7 +1297,7 @@ sub vcs_find_signers {
>  
>  #    print("stats: <@stats>\n");
>  
> -    return (0, @signatures, @authors) if !@signatures;
> +    return (0, \@signatures, \@authors, \@stats) if !@signatures;
>  
>      save_commits_by_author(@lines) if ($interactive);
>      save_commits_by_signer(@lines) if ($interactive);
> @@ -1880,9 +1880,10 @@ sub vcs_file_signoffs {
>      $cmd =~ s/(\$\w+)/$1/eeg;		# interpolate $cmd
>  
>      ($commits, $signers_ref, $authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
> -    @signers = @{$signers_ref};
> -    @authors = @{$authors_ref};
> -    @stats = @{$stats_ref};
> +
> +    @signers = @{$signers_ref} if defined $signers_ref;
> +    @authors = @{$authors_ref} if defined $authors_ref;
> +    @stats = @{$stats_ref} if defined $stats_ref;
>  
>  #    print("commits: <$commits>\nsigners:<@signers>\nauthors: <@authors>\nstats: <@stats>\n");
>  
> @@ -1965,8 +1966,8 @@ sub vcs_file_blame {
>  	    $cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
>  
>  	    ($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
> -	    @commit_authors = @{$commit_authors_ref};
> -	    @commit_signers = @{$commit_signers_ref};
> +	    @commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
> +	    @commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
>  
>  	    push(@signers, @commit_signers);
>  	} else {
> @@ -1983,8 +1984,8 @@ sub vcs_file_blame {
>  		$cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
>  
>  		($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
> -		@commit_authors = @{$commit_authors_ref};
> -		@commit_signers = @{$commit_signers_ref};
> +		@commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
> +		@commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
>  
>  		push(@signers, @commit_signers);
>  	    }
> 
> 
> 
> 


-- 
Chen Gang

[-- Attachment #2: 1.unused.patch --]
[-- Type: text/x-patch, Size: 1156 bytes --]

Subject: [PATCH] hexagon: kernel: remove useless variables 'dn', 'r' and 'err' in time_init_deferred() in "time.c"
Date: Fri, 01 Nov 2013 19:07:48 +0800
From: Chen Gang <gang.chen@asianux.com>

Remove them, since they are useless. The related warnings (with
allmodconfig for v4):

    CC      arch/hexagon/kernel/time.o
  arch/hexagon/kernel/time.c: In function 'time_init_deferred':
  arch/hexagon/kernel/time.c:196: warning: unused variable 'err'
  arch/hexagon/kernel/time.c:195: warning: unused variable 'r'
  arch/hexagon/kernel/time.c:194: warning: unused variable 'dn'


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/hexagon/kernel/time.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
index 9903fad..d0c4f5a 100644
--- a/arch/hexagon/kernel/time.c
+++ b/arch/hexagon/kernel/time.c
@@ -191,9 +191,6 @@ void __init time_init_deferred(void)
 {
 	struct resource *resource = NULL;
 	struct clock_event_device *ce_dev = &hexagon_clockevent_dev;
-	struct device_node *dn;
-	struct resource r;
-	int err;
 
 	ce_dev->cpumask = cpu_all_mask;
 
-- 
1.7.7.6




[-- Attachment #3: 4.kgdb_extend.patch --]
[-- Type: text/x-patch, Size: 1504 bytes --]



-------- Original Message --------
Subject: [PATCH] hexagon: include: asm: kgdb: extend DBG_MAX_REG_NUM for "cs0/1"
Date: Fri, 01 Nov 2013 19:55:38 +0800
From: Chen Gang <gang.chen@asianux.com>
To: Richard Kuo <rkuo@codeaurora.org>
CC: linux-hexagon@vger.kernel.org

Need extend maximized number for "cs0/1", the related warning (with
allmodconfig for v4):

  arch/hexagon/kernel/kgdb.c:79: warning: excess elements in array initializer
  arch/hexagon/kernel/kgdb.c:79: warning: (near initialization for 'dbg_reg_def')
  arch/hexagon/kernel/kgdb.c:80: warning: excess elements in array initializer
  arch/hexagon/kernel/kgdb.c:80: warning: (near initialization for 'dbg_reg_def')


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/hexagon/include/asm/kgdb.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h
index 32a6fb6..ccd3ac3 100644
--- a/arch/hexagon/include/asm/kgdb.h
+++ b/arch/hexagon/include/asm/kgdb.h
@@ -34,10 +34,11 @@ static inline void arch_kgdb_breakpoint(void)
  * 32 gpr + sa0/1 + lc0/1 + m0/1 + gp + ugp + pred + pc = 42 total.
  * vm regs = psp+elr+est+badva = 4
  * syscall+restart = 2 more
- * so 48 = 42 +4 + 2
+ * also add cs0/1 = 2
+ * so 48 = 42 + 4 + 2 + 2
  */
 #define DBG_USER_REGS 42
-#define DBG_MAX_REG_NUM (DBG_USER_REGS + 6)
+#define DBG_MAX_REG_NUM (DBG_USER_REGS + 8)
 #define NUMREGBYTES  (DBG_MAX_REG_NUM*4)
 
 #endif /* __HEXAGON_KGDB_H__ */
-- 
1.7.7.6




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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  2:22       ` Chen Gang
@ 2013-11-05  2:37         ` Chen Gang
  2013-11-05  5:23           ` Joe Perches
  0 siblings, 1 reply; 15+ messages in thread
From: Chen Gang @ 2013-11-05  2:37 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On 11/05/2013 10:22 AM, Chen Gang wrote:
> On 11/05/2013 05:54 AM, Joe Perches wrote:
>> Add this to "try this"...
>>
>> Chen Gang's defect is because his git repository branch
>> had a commit he authored but where did not add his signature.
>>

Hmm... in fact, when I make a patch, I really let "git log" contents a
commit I author but where do not add my  signature.

But after I let it pure next-20131101 ("git reset HEAD^; git stash"), it
still cause this issue.

> 
> Hmm... for pure next-20131101 tree in my git directory and the demo
> patches in attachment, it will cause this issue.
> 
> And excuse me, I am not quite familiar with git, could you provide more
> details (e.g. where the special difference of the demo patches or the
> pure next-20131101 tree in my git directory)? thanks.
> 
>> Also, there's a defect in function vcs_find_signers.
>> It should only return the commit count and array references.
>>
>> If there are no signers in the commit history interval specified,
>> then the "authors" array is added to the "signers" array and
>> returned as a single array.
>>
>> Use references instead.
>>
>> Make sure that references are defined in the places
>> that vcs_find_signers is called.
>>
> 
> After apply the patch below, it can work well.
> 
> Tested-by Chen Gang <gang.chen@asianux.com>
> 
> 
> 
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>>  scripts/get_maintainer.pl | 21 +++++++++++----------
>>  1 file changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
>> index ee9adb8..9c3986f 100755
>> --- a/scripts/get_maintainer.pl
>> +++ b/scripts/get_maintainer.pl
>> @@ -128,7 +128,7 @@ my %VCS_cmds_git = (
>>      "blame_commit_pattern" => "^([0-9a-f]+) ",
>>      "author_pattern" => "^GitAuthor: (.*)",
>>      "subject_pattern" => "^GitSubject: (.*)",
>> -    "stat_pattern" => "(\\d+)\\t(\\d+)\\t\$file",
>> +    "stat_pattern" => "^(\\d+)\\t(\\d+)\\t\$file\$",
>>  );
>>  
>>  my %VCS_cmds_hg = (
>> @@ -156,7 +156,7 @@ my %VCS_cmds_hg = (
>>      "blame_commit_pattern" => "^([ 0-9a-f]+):",
>>      "author_pattern" => "^HgAuthor: (.*)",
>>      "subject_pattern" => "^HgSubject: (.*)",
>> -    "stat_pattern" => "(\\d+)\t(\\d+)\t\$file",
>> +    "stat_pattern" => "^(\\d+)\t(\\d+)\t\$file\$",
>>  );
>>  
>>  my $conf = which_conf(".get_maintainer.conf");
>> @@ -1297,7 +1297,7 @@ sub vcs_find_signers {
>>  
>>  #    print("stats: <@stats>\n");
>>  
>> -    return (0, @signatures, @authors) if !@signatures;
>> +    return (0, \@signatures, \@authors, \@stats) if !@signatures;
>>  
>>      save_commits_by_author(@lines) if ($interactive);
>>      save_commits_by_signer(@lines) if ($interactive);
>> @@ -1880,9 +1880,10 @@ sub vcs_file_signoffs {
>>      $cmd =~ s/(\$\w+)/$1/eeg;		# interpolate $cmd
>>  
>>      ($commits, $signers_ref, $authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
>> -    @signers = @{$signers_ref};
>> -    @authors = @{$authors_ref};
>> -    @stats = @{$stats_ref};
>> +
>> +    @signers = @{$signers_ref} if defined $signers_ref;
>> +    @authors = @{$authors_ref} if defined $authors_ref;
>> +    @stats = @{$stats_ref} if defined $stats_ref;
>>  
>>  #    print("commits: <$commits>\nsigners:<@signers>\nauthors: <@authors>\nstats: <@stats>\n");
>>  
>> @@ -1965,8 +1966,8 @@ sub vcs_file_blame {
>>  	    $cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
>>  
>>  	    ($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
>> -	    @commit_authors = @{$commit_authors_ref};
>> -	    @commit_signers = @{$commit_signers_ref};
>> +	    @commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
>> +	    @commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
>>  
>>  	    push(@signers, @commit_signers);
>>  	} else {
>> @@ -1983,8 +1984,8 @@ sub vcs_file_blame {
>>  		$cmd =~ s/(\$\w+)/$1/eeg;	#substitute variables in $cmd
>>  
>>  		($commit_count, $commit_signers_ref, $commit_authors_ref, $stats_ref) = vcs_find_signers($cmd, $file);
>> -		@commit_authors = @{$commit_authors_ref};
>> -		@commit_signers = @{$commit_signers_ref};
>> +		@commit_authors = @{$commit_authors_ref} if defined $commit_authors_ref;
>> +		@commit_signers = @{$commit_signers_ref} if defined $commit_signers_ref;
>>  
>>  		push(@signers, @commit_signers);
>>  	    }
>>
>>
>>
>>
> 
> 


-- 
Chen Gang

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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  2:37         ` Chen Gang
@ 2013-11-05  5:23           ` Joe Perches
  2013-11-05  5:42             ` Chen Gang
  0 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-05  5:23 UTC (permalink / raw)
  To: Chen Gang; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On Tue, 2013-11-05 at 10:37 +0800, Chen Gang wrote:
> But after I let it pure next-20131101 ("git reset HEAD^; git stash"), it
> still cause this issue.

It's also because:

> >> Also, there's a defect in function vcs_find_signers.
> >> It should only return the commit count and array references.
> >>
> >> If there are no signers in the commit history interval specified,
> >> then the "authors" array is added to the "signers" array and
> >> returned as a single array.



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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:23           ` Joe Perches
@ 2013-11-05  5:42             ` Chen Gang
  2013-11-05  5:45               ` Chen Gang
  2013-11-05  5:50               ` Joe Perches
  0 siblings, 2 replies; 15+ messages in thread
From: Chen Gang @ 2013-11-05  5:42 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On 11/05/2013 01:23 PM, Joe Perches wrote:
> On Tue, 2013-11-05 at 10:37 +0800, Chen Gang wrote:
>> But after I let it pure next-20131101 ("git reset HEAD^; git stash"), it
>> still cause this issue.
> 
> It's also because:
> 
>>>> Also, there's a defect in function vcs_find_signers.
>>>> It should only return the commit count and array references.
>>>>
>>>> If there are no signers in the commit history interval specified,
>>>> then the "authors" array is added to the "signers" array and
>>>> returned as a single array.
> 
> 
> 
> 

OK, thanks. Do you mean: in pure next-20131101 contents an author which
commit a patch, but not signed himself? (if so, it seems the related
patch need be re-committed again by the related author).


Thanks.
-- 
Chen Gang

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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:42             ` Chen Gang
@ 2013-11-05  5:45               ` Chen Gang
  2013-11-05  5:54                 ` Joe Perches
  2013-11-05  5:50               ` Joe Perches
  1 sibling, 1 reply; 15+ messages in thread
From: Chen Gang @ 2013-11-05  5:45 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On 11/05/2013 01:42 PM, Chen Gang wrote:
> On 11/05/2013 01:23 PM, Joe Perches wrote:
>> On Tue, 2013-11-05 at 10:37 +0800, Chen Gang wrote:
>>> But after I let it pure next-20131101 ("git reset HEAD^; git stash"), it
>>> still cause this issue.
>>
>> It's also because:
>>
>>>>> Also, there's a defect in function vcs_find_signers.
>>>>> It should only return the commit count and array references.
>>>>>
>>>>> If there are no signers in the commit history interval specified,
>>>>> then the "authors" array is added to the "signers" array and
>>>>> returned as a single array.
>>
>>
>>
>>
> 
> OK, thanks. Do you mean: in pure next-20131101 contents an author which
> commit a patch, but not signed himself? (if so, it seems the related
> patch need be re-committed again by the related author).
> 

If really as what I guess above (some patches no Signed-of-by), is there
a tool to check and find this issue in time?


Thanks.
-- 
Chen Gang

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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:42             ` Chen Gang
  2013-11-05  5:45               ` Chen Gang
@ 2013-11-05  5:50               ` Joe Perches
  2013-11-05  6:01                 ` Chen Gang
  1 sibling, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-05  5:50 UTC (permalink / raw)
  To: Chen Gang; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On Tue, 2013-11-05 at 13:42 +0800, Chen Gang wrote:
> On 11/05/2013 01:23 PM, Joe Perches wrote:
> > On Tue, 2013-11-05 at 10:37 +0800, Chen Gang wrote:
> >> But after I let it pure next-20131101 ("git reset HEAD^; git stash"), it
> >> still cause this issue.
> > 
> > It's also because:
> > 
> >>>> Also, there's a defect in function vcs_find_signers.
> >>>> It should only return the commit count and array references.
> >>>>
> >>>> If there are no signers in the commit history interval specified,
> >>>> then the "authors" array is added to the "signers" array and
> >>>> returned as a single array.
>
> OK, thanks. Do you mean: in pure next-20131101 contents an author which
> commit a patch, but not signed himself?

Yes, I mean that.

> (if so, it seems the related
> patch need be re-committed again by the related author).

No it doesn't mean that.

Prior to this patch, get_maintainer only used "sign-off-by"
style lines to find interested parties to send patches to
when the MAINTAINERS file did not have a specific section
entry with a matching file pattern to the files that that
the patch modified.

And there was a defect in the script when no commit history
at all was found for the files modified during the period
selected (1 year of git log history by default)

Now, using this newly modified get_maintainer.pl script,
the commit authors shown in the git log history as well as
the commit signers are selected.

If there is no git history, the script defect is also fixed.


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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:45               ` Chen Gang
@ 2013-11-05  5:54                 ` Joe Perches
  2013-11-05  6:04                   ` Chen Gang
  0 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-05  5:54 UTC (permalink / raw)
  To: Chen Gang; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On Tue, 2013-11-05 at 13:45 +0800, Chen Gang wrote:
> If really as what I guess above (some patches no Signed-of-by), is there
> a tool to check and find this issue in time?

scripts/checkpatch.pl bleats a message on missing sign-offs.

For instance:

$ cat cache.diff
 include/linux/cache.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/cache.h b/include/linux/cache.h
index 4c57065..17e7e82 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -1,11 +1,11 @@
 #ifndef __LINUX_CACHE_H
 #define __LINUX_CACHE_H
 
-#include <linux/kernel.h>
+#include <uapi/linux/kernel.h>
 #include <asm/cache.h>
 
 #ifndef L1_CACHE_ALIGN
-#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
+#define L1_CACHE_ALIGN(x) __ALIGN_KERNEL(x, L1_CACHE_BYTES)
 #endif
 
 #ifndef SMP_CACHE_BYTES

$ ./scripts/checkpatch.pl cache.diff
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 13 lines checked

cache.diff has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.



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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:50               ` Joe Perches
@ 2013-11-05  6:01                 ` Chen Gang
  0 siblings, 0 replies; 15+ messages in thread
From: Chen Gang @ 2013-11-05  6:01 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel

On 11/05/2013 01:50 PM, Joe Perches wrote:
> On Tue, 2013-11-05 at 13:42 +0800, Chen Gang wrote:
>> On 11/05/2013 01:23 PM, Joe Perches wrote:
>>> On Tue, 2013-11-05 at 10:37 +0800, Chen Gang wrote:
> 
>> (if so, it seems the related
>> patch need be re-committed again by the related author).
> 
> No it doesn't mean that.
> 
> Prior to this patch, get_maintainer only used "sign-off-by"
> style lines to find interested parties to send patches to
> when the MAINTAINERS file did not have a specific section
> entry with a matching file pattern to the files that that
> the patch modified.
> 
> And there was a defect in the script when no commit history
> at all was found for the files modified during the period
> selected (1 year of git log history by default)
> 
> Now, using this newly modified get_maintainer.pl script,
> the commit authors shown in the git log history as well as
> the commit signers are selected.
> 
> If there is no git history, the script defect is also fixed.
> 

Yeah, our "get_maintainer.pl" need be smart enough to bear it (this
patch let our "get_maintainer.pl" smart enough).

But for this kind of patch, need it re-commit again? (for me, I
recommend to re-commit it again by the related author).


Thanks.
-- 
Chen Gang

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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  5:54                 ` Joe Perches
@ 2013-11-05  6:04                   ` Chen Gang
  2013-11-05  6:16                     ` Joe Perches
  0 siblings, 1 reply; 15+ messages in thread
From: Chen Gang @ 2013-11-05  6:04 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel, sfr

On 11/05/2013 01:54 PM, Joe Perches wrote:
> On Tue, 2013-11-05 at 13:45 +0800, Chen Gang wrote:
>> > If really as what I guess above (some patches no Signed-of-by), is there
>> > a tool to check and find this issue in time?
> scripts/checkpatch.pl bleats a message on missing sign-offs.

Yeah, the author/maintainer can use it for checking.

But do we have additional tools to let the version tree integrator (e.g.
sfr) notice about it?


Thanks.
-- 
Chen Gang

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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  6:04                   ` Chen Gang
@ 2013-11-05  6:16                     ` Joe Perches
  2013-11-05  6:36                       ` Chen Gang
  0 siblings, 1 reply; 15+ messages in thread
From: Joe Perches @ 2013-11-05  6:16 UTC (permalink / raw)
  To: Chen Gang; +Cc: Chen Gang F T, Andrew Morton, linux-kernel, sfr

On Tue, 2013-11-05 at 14:04 +0800, Chen Gang wrote:
> On 11/05/2013 01:54 PM, Joe Perches wrote:
> > On Tue, 2013-11-05 at 13:45 +0800, Chen Gang wrote:
> >> > If really as what I guess above (some patches no Signed-of-by), is there
> >> > a tool to check and find this issue in time?
> > scripts/checkpatch.pl bleats a message on missing sign-offs.
> 
> Yeah, the author/maintainer can use it for checking.
> 
> But do we have additional tools to let the version tree integrator (e.g.
> sfr) notice about it?

git pre-commit hooks work.

btw: there's some development efforts going on
     that might help here eventually.

Read this thread:
https://lkml.org/lkml/2013/10/26/158



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

* Re: [PATCH -next] get_maintainer: Improve "Author:" rolestats
  2013-11-05  6:16                     ` Joe Perches
@ 2013-11-05  6:36                       ` Chen Gang
  0 siblings, 0 replies; 15+ messages in thread
From: Chen Gang @ 2013-11-05  6:36 UTC (permalink / raw)
  To: Joe Perches; +Cc: Chen Gang F T, Andrew Morton, linux-kernel, sfr

On 11/05/2013 02:16 PM, Joe Perches wrote:
> On Tue, 2013-11-05 at 14:04 +0800, Chen Gang wrote:
>> On 11/05/2013 01:54 PM, Joe Perches wrote:
>>> On Tue, 2013-11-05 at 13:45 +0800, Chen Gang wrote:
>>>>> If really as what I guess above (some patches no Signed-of-by), is there
>>>>> a tool to check and find this issue in time?
>>> scripts/checkpatch.pl bleats a message on missing sign-offs.
>>
>> Yeah, the author/maintainer can use it for checking.
>>
>> But do we have additional tools to let the version tree integrator (e.g.
>> sfr) notice about it?
> 
> git pre-commit hooks work.
> 
> btw: there's some development efforts going on
>      that might help here eventually.
> 
> Read this thread:
> https://lkml.org/lkml/2013/10/26/158
> 

OK, thanks. It seems it is about commit one patch, and it also seems no
"git pre-commit" command (my git version is "git version 1.7.7.6").

And do we have a tool to type a command to check all patches whether
missing sign-offs? (I guess, the version integrator need not check patch
one by one only for whether contents sign-offs).

Oh, I forgot one thing, the original "scripts/get_maintainers.pl" (e.g.
in next-20130927), it is already smart enough. So can we treat our patch
as the fix patch for the latest changes?


Thanks.
-- 
Chen Gang

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

end of thread, other threads:[~2013-11-05  6:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 11:20 [Suggestion] about latest commit for "scripts/get_maintainers.pl" Chen Gang
2013-11-01 18:32 ` Joe Perches
2013-11-02 14:07   ` Chen Gang F T
2013-11-04 21:54     ` [PATCH -next] get_maintainer: Improve "Author:" rolestats Joe Perches
2013-11-05  2:22       ` Chen Gang
2013-11-05  2:37         ` Chen Gang
2013-11-05  5:23           ` Joe Perches
2013-11-05  5:42             ` Chen Gang
2013-11-05  5:45               ` Chen Gang
2013-11-05  5:54                 ` Joe Perches
2013-11-05  6:04                   ` Chen Gang
2013-11-05  6:16                     ` Joe Perches
2013-11-05  6:36                       ` Chen Gang
2013-11-05  5:50               ` Joe Perches
2013-11-05  6:01                 ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).