public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Joe Perches <joe@perches.com>
Cc: Simon Glass <sjg@chromium.org>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Kory Maincent <kory.maincent@bootlin.com>,
	Tom Rini <trini@konsulko.com>,
	Simon Glass <simon.glass@canonical.com>,
	Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: Re: [PATCH v2] checkpatch: Allow to pass config directory
Date: Fri, 27 Mar 2026 10:50:41 +0100	[thread overview]
Message-ID: <20260327095041.GC40147@pevik> (raw)
In-Reply-To: <65fe50aded2d9184bdb3198d0649e3eeb9bb3d18.camel@perches.com>

> On Thu, 2026-03-26 at 21:50 +0100, Petr Vorel wrote:

> > > my $paths = $def_configuration_dirs;
> > > $paths = "$ENV{$env_config_dir}:$paths" if exists($ENV{$env_config_dir});

> > +1, sure, thanks!

> Why have two uses of $ENV{$env_config_dir}?

Your suggestion in v1 :).

> Seems typo error prone and somewhat difficult to read.

In v3 I'll just prepend it without checking, because we do the check later on
if (-e "$path/$conf").

And add a note that one can add more dirs (like in PATH or LD_LIBRARY_PATH).
But again, it looks to me more better to point just a single file.
Check would be done only on the directory to which variable points, that's what
would user probably want (not silently fallbacking into the default
directories). But that would require slightly more code changes.

Kind regards,
Petr

      reply	other threads:[~2026-03-27  9:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 18:16 [PATCH v2] checkpatch: Allow to pass config directory Petr Vorel
2026-03-26 15:47 ` Petr Vorel
2026-03-26 17:48 ` Simon Glass
2026-03-26 20:50   ` Petr Vorel
2026-03-27  0:06     ` Joe Perches
2026-03-27  9:50       ` Petr Vorel [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=20260327095041.GC40147@pevik \
    --to=pvorel@suse.cz \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=kory.maincent@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=simon.glass@canonical.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=visitorckw@gmail.com \
    /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