From: Masahiro Yamada <masahiroy@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Brian Masney <bmasney@redhat.com>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 2/2] scripts: add kconfig lookup script
Date: Tue, 29 Jul 2025 23:03:40 +0900 [thread overview]
Message-ID: <CAK7LNAQSoU6cnAJ4ayNG44hez+tK1ixrE+CJQzKoE1Tgdw5okw@mail.gmail.com> (raw)
In-Reply-To: <249abbe2-0f2a-4e58-b7f2-bb286c0a4f8f@infradead.org>
On Mon, Jul 28, 2025 at 3:38 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Hi,
> Sorry about the very late feedback.
>
>
> On 8/2/23 11:23 PM, Masahiro Yamada wrote:
> > On Wed, Aug 2, 2023 at 2:49 AM Brian Masney <bmasney@redhat.com> wrote:
> >>
> >> Add a script that allows looking up the full Kconfig entry based on
> >> the symbol name. Documentation and example usage is found at the top
> >> of the script itself.
> >>
> >> Signed-off-by: Brian Masney <bmasney@redhat.com>
> >> ---
> >> scripts/kconfig/lookup.sh | 77 +++++++++++++++++++++++++++++++++++++++
> >> 1 file changed, 77 insertions(+)
> >> create mode 100755 scripts/kconfig/lookup.sh
> >
> >
> >
> > Everyone tends to have their own utility scripts
> > on their machines.
> >
> > I think this patch set falls into that category
> > as "create a wrapper script of grep" is what everyone
> > does to reduce typing.
> >
> >
> >
> >
> > FWIW, I have the following scripts in my ~/bin directory.
> >
> >
> >
> > $ cat ~/bin/kgrep
> > #!/bin/sh
> >
> > exec find . -name .repo -prune -o -name .git -prune -o -type f \
> > \( -name 'Kconfig*' -o -name 'Config.in' \) \
> > -print0 | xargs -0 grep --color -n "$@"
> >
>
> Sometimes I just want to see a symbol's definition. So using
> $ kgrep -A8 config.TSL2772
> finds only the config|menuconfig definition for the symbol
> without printing other mentions of it (in selects or depends on
> or help text or comments etc.).
>
> >
> > $ cat ~/bin/mgrep
> > #!/bin/sh
> >
> > exec find . -name .repo -prune -o -name .git -prune -o -type f \
> > \( -name 'Makefile*' -o -name 'Kbuild*' -o -name "*.mk" \) \
> > -print0 | xargs -0 grep --color -n "$@"
> >
> >
>
> Using
> $ mgrep floppy.o
> shows me nothing. It never completes, just hangs (OK, I killed it
> after 30 seconds). Any ideas?
>
> Thanks for the tooling.
I do not know.
It worked for me.
masahiro@zoe:~/ref/linux(master)$ mgrep floppy.o
./drivers/block/Makefile:17:obj-$(CONFIG_BLK_DEV_FD) += floppy.o
--
Best Regards
Masahiro Yamada
prev parent reply other threads:[~2025-07-29 14:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 17:49 [PATCH 0/2] scripts: add two new scripts to look up Kconfigs Brian Masney
2023-08-01 17:49 ` [PATCH 1/2] scripts: add mod-to-kconfig.sh Brian Masney
2023-08-01 17:49 ` [PATCH 2/2] scripts: add kconfig lookup script Brian Masney
2023-08-03 6:23 ` Masahiro Yamada
2023-08-03 10:14 ` Brian Masney
2023-08-06 12:45 ` Masahiro Yamada
2025-07-27 18:38 ` Randy Dunlap
2025-07-29 14:03 ` Masahiro Yamada [this message]
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=CAK7LNAQSoU6cnAJ4ayNG44hez+tK1ixrE+CJQzKoE1Tgdw5okw@mail.gmail.com \
--to=masahiroy@kernel.org \
--cc=bmasney@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).