mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: mmarek@suse.cz, yann.morin.1998@free.fr,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/checkkconfig.py: find unused Kconfig parameters
Date: Thu, 24 Oct 2013 00:30:49 -0700	[thread overview]
Message-ID: <1382599849.22433.51.camel@joe-AO722> (raw)
In-Reply-To: <1382592209-10246-1-git-send-email-michael.opdenacker@free-electrons.com>

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]"'


  reply	other threads:[~2013-10-24  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24  5:23 Michael Opdenacker
2013-10-24  7:30 ` Joe Perches [this message]
2013-10-25 13:38   ` Michael Opdenacker
2013-10-25 13:45     ` Michal Marek
2013-10-30  3:07       ` Michael Opdenacker
2013-10-24  9:39 ` Michal Marek
2013-10-29 18:06 ` Yann E. MORIN
2013-10-30  3:14   ` Michael Opdenacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382599849.22433.51.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.opdenacker@free-electrons.com \
    --cc=mmarek@suse.cz \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®