lkml.org 
[lkml]   [2020]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Re: [PATCH v3 1/2] checkpatch: support deprecated terms checking
From
Date
On Wed, 2020-06-10 at 10:01 +0200, SeongJae Park wrote:
> On Wed, 10 Jun 2020 00:13:42 -0700 Joe Perches <joe@perches.com> wrote:
[]
> > This is a direct copy of the spelling dictionary
> > loading code, so maybe these could be consolidated.
>
> Agreed, how about below one?
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 524df88f9364..226f24e1f1f3 100755
[]
> +sub read_word_corrections {
> + my ($file) = @_;
> + my $suspects;
> + my %fixes;

Right.

But I think this should take a hash reference
as the second argument so the complete hash
isn't created and returned.

[]

> +# Load deprecated terms and build regular expression list.
> +my %deprecated_terms_fix = read_word_corrections($deprecated_terms_file);

So this might be something like:

my %deprecated_terms;
read_word_corrections($deprecated_terms_file, \%deprecated_terms);

etc...


\
 
 \ /
  Last update: 2020-06-10 10:46    [W:0.773 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site