From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH 3/8] drm/i915: Make the intel_device_info structure kept in dev_priv writable Date: Thu, 12 Dec 2013 15:38:05 +0000 Message-ID: <20131212153805.GA14545@strange.amr.corp.intel.com> References: <1386859003-17246-1-git-send-email-damien.lespiau@intel.com> <1386859003-17246-4-git-send-email-damien.lespiau@intel.com> <87y53q84u1.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id F05BCFB892 for ; Thu, 12 Dec 2013 07:38:26 -0800 (PST) Content-Disposition: inline In-Reply-To: <87y53q84u1.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Dec 12, 2013 at 05:30:14PM +0200, Jani Nikula wrote: > > -#define INTEL_INFO(dev) (to_i915(dev)->info) > > +#define INTEL_INFO(dev) ((const struct intel_device_info *)&to_i915(dev)->info) > > If that were an inline function you wouldn't have to cast to add const: > > static inline const struct intel_device_info * > intel_info(const struct drm_device *dev) > { > return to_i915(dev)->info; > } > > I'm not insisting on this bikeshed, though. True, I'd happily review a follow-up patch once the series has landed :) -- Damien