From: Masahiro Yamada <masahiroy@kernel.org>
To: Brian Masney <bmasney@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 2/2] scripts: add kconfig lookup script
Date: Sun, 6 Aug 2023 21:45:31 +0900 [thread overview]
Message-ID: <CAK7LNARauVPQPt5SGZ9=i=RcY2eOnhdMOqpW_+s0hfooG37SrA@mail.gmail.com> (raw)
In-Reply-To: <ZMt+DGRQIZ52miGF@brian-x1>
On Thu, Aug 3, 2023 at 7:14 PM Brian Masney <bmasney@redhat.com> wrote:
>
> On Thu, Aug 03, 2023 at 03:23:16PM +0900, Masahiro Yamada wrote:
> > 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 "$@"
> >
> >
> > $ 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 "$@"
> >
> >
> >
> >
> > masahiro@zoe:~/ref/linux(master)$ kgrep -A5 TSL2772
> > ./drivers/iio/light/Kconfig:564:config TSL2772
> > ./drivers/iio/light/Kconfig-565- tristate "TAOS TSL/TMD2x71 and
> > TSL/TMD2x72 Family of light and proximity sensors"
> > ./drivers/iio/light/Kconfig-566- depends on I2C
> > ./drivers/iio/light/Kconfig-567- help
> > ./drivers/iio/light/Kconfig-568- Support for: tsl2571, tsl2671,
> > tmd2671, tsl2771, tmd2771, tsl2572, tsl2672,
> > ./drivers/iio/light/Kconfig-569- tmd2672, tsl2772, tmd2772 devices.
> >
> > masahiro@zoe:~/ref/linux(master)$ mgrep efivarfs.o
> > ./fs/efivarfs/Makefile:6:obj-$(CONFIG_EFIVAR_FS) += efivarfs.o
> > ./fs/efivarfs/Makefile:8:efivarfs-objs := inode.o file.o super.o vars.o
> >
> >
> >
> > That's my local way to satisfy my demand.
> > I do not intend to force my way or merge it in the upstream.
>
> OK, fair enough.
>
> Those are useful little utilities and simpler than what I posted. If
> something like these had been in the scripts/ directory, then I
> wouldn't have spent the time to write yet another script that does
> basically the same thing. I get what you are saying, however having
> a script to lookup a Kconfig by name or module will be useful to other
> people.
>
> Brian
>
I do not want to fill the scripts/ directory
with random trivial scripts.
I need to draw a line between
"the time cost for writing the code by myself" vs
"the time cost for searching for a similar script".
I'd rather write the code by myself
if it is a script of a few lines.
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2023-08-06 12:46 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 [this message]
2025-07-27 18:38 ` Randy Dunlap
2025-07-29 14:03 ` Masahiro Yamada
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='CAK7LNARauVPQPt5SGZ9=i=RcY2eOnhdMOqpW_+s0hfooG37SrA@mail.gmail.com' \
--to=masahiroy@kernel.org \
--cc=bmasney@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).