From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] igt_core: Fix docs for SLOW_QUICK
Date: Wed, 17 Nov 2021 08:44:30 -0800 [thread overview]
Message-ID: <87mtm2wx3l.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211117104229.18663-1-petri.latvala@intel.com>
On Wed, 17 Nov 2021 02:42:29 -0800, Petri Latvala wrote:
>
> The macro is for choosing between two values depending on whether IGT
> has been told it's running in simulation mode. The parameter names and
> their documentation was the opposite of what actually happened.
>
> The only user, gem_lut_handle, uses the macro correctly, having the
> "use this value in simulation mode" value as the second parameter.
>
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Arkadiusz Hiler <arek@hiler.eu>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> lib/igt_core.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index 6b8dbf34..077e1bf3 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -1170,7 +1170,7 @@ bool igt_run_in_simulation(void);
> * Simple macro to select between two values (e.g. number of test rounds or test
> * buffer size) depending upon whether i-g-t is run in simulation mode or not.
> */
> -#define SLOW_QUICK(slow,quick) (igt_run_in_simulation() ? (quick) : (slow))
> +#define SLOW_QUICK(quick,slow) (igt_run_in_simulation() ? (slow) : (quick))
Previous code assumes slow/quick refer to number of iterations whereas this
patch assumes slow/quick refer to similation speed, correct? It seems to be
12 of one, dozen of the other to me. How about:
#define SLOW_QUICK(x, y) (igt_run_in_simulation() ? (y) : (x))
:-)
I prefer the previous interpretation where quick is assumed to be much
smaller than slow.
next prev parent reply other threads:[~2021-11-17 17:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 10:42 [igt-dev] [PATCH i-g-t] igt_core: Fix docs for SLOW_QUICK Petri Latvala
2021-11-17 11:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-17 16:44 ` Dixit, Ashutosh [this message]
2021-11-17 20:34 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
2021-11-18 8:30 ` Petri Latvala
2021-11-17 19:51 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2021-11-18 8:31 ` Petri Latvala
2021-11-18 16:27 ` Vudum, Lakshminarayana
2021-11-18 8:36 ` [igt-dev] [PATCH i-g-t v2] " Petri Latvala
2021-11-18 8:52 ` Dixit, Ashutosh
2021-11-18 10:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt_core: Fix docs for SLOW_QUICK (rev2) Patchwork
2021-11-18 10:19 ` Petri Latvala
2021-11-18 16:14 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-11-19 5:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=87mtm2wx3l.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.