Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Michał Grzelak" <michal.grzelak@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 2/7] tools/intel_display_poller: Fix long opts
Date: Fri, 3 Oct 2025 00:22:31 +0300	[thread overview]
Message-ID: <aN7tFzkOavE9bLOF@intel.com> (raw)
In-Reply-To: <254536f4-6be1-80ff-d87d-b8671f2d7bd1@intel.com>

On Thu, Oct 02, 2025 at 09:54:07PM +0200, Michał Grzelak wrote:
> On Mon, 22 Sep 2025, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Fix the long option handling by providing a .val for each that
> > matches the short option.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tools/intel_display_poller.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
> > index 6089be3f1ffa..69906d557a37 100644
> > --- a/tools/intel_display_poller.c
> > +++ b/tools/intel_display_poller.c
> > @@ -1352,14 +1352,14 @@ int main(int argc, char *argv[])
> >
> > 	for (;;) {
> > 		static const struct option long_options[] = {
> > -			{ .name = "test", .has_arg = required_argument, },
> > -			{ .name = "pipe", .has_arg = required_argument, },
> > -			{ .name = "bit", .has_arg = required_argument, },
> > -			{ .name = "line", .has_arg = required_argument, },
> > -			{ .name = "fuzz", .has_arg = required_argument, },
> > -			{ .name = "pixel", .has_arg = no_argument, },
> > -			{ .name = "async", .has_arg = no_argument, },
> > -			{ .name = "vrr-push", .has_arg = required_argument, },
> > +			{ .name = "test", .has_arg = required_argument, .val = 't', },
> > +			{ .name = "pipe", .has_arg = required_argument, .val = 'b', },
> 
> I'm unsure about this since I can't find the definition for struct
> option,

"man getopt_long" is probably the fastest way to find it.

> but shouldn't be here a .val = 'p'? Seems like it will clash
> with --bit option. Otherwise,

Aye, good catch. I must have still been using the short option to
specify the pipe when testing this.

> 
> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>

Thanks.

Fixed the 'd' vs. 'p' fumble while pushing. And I also noticed
that a few hunks from the --dsb-id patch ended up in the 
previous patch, so I moved those over as well.

> 
> > +			{ .name = "bit", .has_arg = required_argument, .val = 'b', },
> > +			{ .name = "line", .has_arg = required_argument, .val = 'l', },
> > +			{ .name = "fuzz", .has_arg = required_argument, .val = 'f', },
> > +			{ .name = "pixel", .has_arg = no_argument, .val = 'x', },
> > +			{ .name = "async", .has_arg = no_argument, .val = 'a', },
> > +			{ .name = "vrr-push", .has_arg = required_argument, .val = 'v', },
> > 			{ },
> > 		};
> >
> > -- 
> > 2.49.1
> >
> >
> 
> BR,
> Michał


-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-10-02 21:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 16:09 [PATCH i-g-t 0/7] tools/intel_display_poller: Various things Ville Syrjala
2025-09-22 16:09 ` [PATCH i-g-t 1/7] lib/gt: Fix IGT_NO_FORCEWAKE handling Ville Syrjala
2025-09-24 13:22   ` Lucas De Marchi
2025-09-29 18:11     ` Ville Syrjälä
2025-10-02 19:52   ` Michał Grzelak
2025-09-22 16:09 ` [PATCH i-g-t 2/7] tools/intel_display_poller: Fix long opts Ville Syrjala
2025-10-02 19:54   ` Michał Grzelak
2025-10-02 21:22     ` Ville Syrjälä [this message]
2025-09-22 16:09 ` [PATCH i-g-t 3/7] tools/intel_display_poller: Use intel_display_ver() instead of intel_gen() Ville Syrjala
2025-10-02 19:54   ` Michał Grzelak
2025-09-22 16:09 ` [PATCH i-g-t 4/7] tools/intel_display_poller: Add --scanline-offset/-o command line option Ville Syrjala
2025-10-02 19:54   ` Michał Grzelak
2025-09-22 16:09 ` [PATCH i-g-t 5/7] tools/intel_display_poller: Add --auto-scanline-offset/-O comamnd " Ville Syrjala
2025-10-02 19:54   ` Michał Grzelak
2025-09-22 16:09 ` [PATCH i-g-t 6/7] tools/intel_display_poller: Add dsb-status-live test Ville Syrjala
2025-10-02 19:55   ` Michał Grzelak
2025-09-22 16:09 ` [PATCH i-g-t 7/7] tools/intel_display_poller: Add --dsb-id/-d command line option Ville Syrjala
2025-10-02 19:55   ` Michał Grzelak
2025-09-22 18:41 ` ✓ i915.CI.BAT: success for tools/intel_display_poller: Various things Patchwork
2025-09-22 18:50 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-22 20:45 ` ✗ i915.CI.Full: failure " Patchwork
2025-09-22 23:21 ` ✓ Xe.CI.Full: success " Patchwork

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=aN7tFzkOavE9bLOF@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=michal.grzelak@intel.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