lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/3] remove undocumented type definition alias
From
Date
On Sun, 2014-12-07 at 20:49 -0500, Christoph Jaeger wrote:
> This patchset removes support for the undocumented type definition keyword
> 'boolean', that is used in some config option definitions, in favor of the
> much more widely used 'bool'. Both are semantically equivalent.
>
> % git grep -w bool -- '*Kconfig*' | wc -l
> 7065
> % git grep -w boolean -- '*Kconfig*' | wc -l
> 94

(Side note: I _always_ use: $SOME_GIT_GREP $(git ls-files "*Kconfig*").
Have I been typing too much all those years?)

> Having this alias is more confusing than helpful.

Agree. (boolean is a better keyword than bool. Changing 7065 lines
instead of 94 for that reason alone would be overdoing it.)

> This change was suggested by Daniel Borkmann <dborkman@redhat.com>.
>
>
> Patch 3/3 is purely cosmetic and therefore optional.
>
> Christoph Jaeger (3):
> kconfig: regenerate parser
> kconfig: remove undocumented type definition alias 'boolean'
> kconfig: rename S_BOOLEAN to S_BOOL for consistency

For the record. I tested these three patches, on top of next-20141208,
with this bit of perl:

use 5.016;
use warnings;
use autodie;

exit main ( @ARGV );

sub main {
my ($tree) = @ARGV;

open( my $git_ls_tree, "-|", "git", "ls-tree", "-r", $tree );
my $slurp = do { local $/ = undef; <$git_ls_tree> };
my @lines = split( /\n/, $slurp );
foreach my $line ( @lines ) {
my ( @tmp ) = split( /\s/, $line );
if ($tmp[3] =~ 'defconfig$' ) {
my $arch;
my $defconfig = $tmp[3];
($arch = $tmp[3]) =~ s/arch\/(\w+)\/.*/$1/;

`cp $defconfig .config`;
`yes "" | make ARCH=$arch oldconfig`;
my $out = `md5sum .config`;
my (@tmp) = split( /\s/, $out );
say( $tmp[0] );
}
}
close( $git_ls_tree );

0;
}

Note how I have trouble following my own whitespace rules. If someone
spots a flaw in this approach I'm all ears.

I'll add further feedback on the patches themselves.

Thanks,


Paul Bolle



\
 
 \ /
  Last update: 2014-12-08 22:01    [W:0.064 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site