Re: [PATCH 0/3] remove undocumented type definition alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux