From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH v2] drm/i915: Rename defines for selection of ddi buffer translation slot Date: Wed, 27 Aug 2014 14:16:13 +0300 Message-ID: <20140827111613.GQ4193@intel.com> References: <1407500245-11436-1-git-send-email-sonika.jindal@intel.com> <20140808123617.GB2751@strange.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F37E892DE for ; Wed, 27 Aug 2014 04:18:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140808123617.GB2751@strange.ger.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Aug 08, 2014 at 01:36:17PM +0100, Damien Lespiau wrote: > On Fri, Aug 08, 2014 at 05:47:25PM +0530, sonika.jindal@intel.com wrote: > > /* Start the training iterating through available voltages and emphas= is, > > * testing each value twice. */ > > - for (i =3D 0; i < ARRAY_SIZE(hsw_ddi_buf_ctl_values) * 2; i++) { > > + for (i =3D 0; i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) { > = > This is correct but obsfucated. You're actually doing > ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 * 2 and we might as well give > the ARRAY_SIZE(hsw_ddi_translations_fdi) / 2 a proper name like I > suggested. I've been wondering why we don't have something like: struct ddi_buf_trans { u32 deemp; u32 vswing; } and use that instead of having the magic /2 appear in places. -- = Ville Syrj=E4l=E4 Intel OTC