[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1382599849.22433.51.camel@joe-AO722>
Date: Thu, 24 Oct 2013 00:30:49 -0700
From: Joe Perches <joe@...ches.com>
To: Michael Opdenacker <michael.opdenacker@...e-electrons.com>
Cc: mmarek@...e.cz, yann.morin.1998@...e.fr, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts/checkkconfig.py: find unused Kconfig parameters
On Thu, 2013-10-24 at 07:23 +0200, Michael Opdenacker wrote:
> This is the first version of a script to look for
> Kconfig parameters which are still defined but no longer
> used in the kernel source code.
[]
> diff --git a/scripts/checkkconfig.py b/scripts/checkkconfig.py
[]
> +def count_param(param):
> +
> + global source_file, bad_params_in_file
> +
> + if os.path.isdir('.git'):
> + # Use git grep when available
> + count = subprocess.check_output('git grep ' + param + '| grep -v defconfig | wc -l', shell=True)
> + else:
> + # Fallback to regular grep
> + count = subprocess.check_output('grep -R ' + param + ' . | grep -v defconfig | wc -l', shell=True)
Doesn't the grep need -w?
Also, the regular grep could probably use something like
'grep -R -w --max-count=2 --include="*.[chS]"'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists