From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1C7B489FD1 for ; Wed, 17 Nov 2021 17:09:58 +0000 (UTC) Date: Wed, 17 Nov 2021 08:44:30 -0800 Message-ID: <87mtm2wx3l.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20211117104229.18663-1-petri.latvala@intel.com> References: <20211117104229.18663-1-petri.latvala@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t] igt_core: Fix docs for SLOW_QUICK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Petri Latvala Cc: igt-dev@lists.freedesktop.org List-ID: 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 > Cc: Arkadiusz Hiler > Cc: Daniel Vetter > --- > 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.