From patchwork Thu Oct 13 10:02:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9374679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A218607FD for ; Thu, 13 Oct 2016 10:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D7E029F7C for ; Thu, 13 Oct 2016 10:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0291F29F80; Thu, 13 Oct 2016 10:03:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B13FF29F7C for ; Thu, 13 Oct 2016 10:03:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EEB4E6EA0F; Thu, 13 Oct 2016 10:03:41 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A86556EA03 for ; Thu, 13 Oct 2016 10:03:23 +0000 (UTC) Received: by mail-qk0-x244.google.com with SMTP id z190so5480860qkc.3 for ; Thu, 13 Oct 2016 03:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=puYZ5SIiY9xk/KSgeMbCeHVREZUyG0U13tbM9XzaAS0=; b=Eyg+nVzuj6/NHDPo0WiEaFF1H5DOGP1S6CdX6tnJh3uT4v8BRuDYq3EdKpgiEEYYtr b6GbDLQ6rmJNPb8A/0Ww4vUBoIj1JhxDLUQArdioEAfMHLxHOcH18FDUsA8VobnvTudN xA89yvf3ce8Oxuu3I+3JssNOtee9tR1wLihyeMADplhCHklUT7iWj/vlmhaDPpe2ctrM dYz8YyG5aXszXKTnVo751NnU7FxLj4turquSPWfysfr+rw4c+zjnv73E3aDfAd+SdMVA YiAj80w4voKQS+8TMP4lM8hloGdJO+LYv9ey1R/7zcCHHD1qR/Dhot3h2VvbdpRetMkx 06Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=puYZ5SIiY9xk/KSgeMbCeHVREZUyG0U13tbM9XzaAS0=; b=CbSG+s7c7mfTz7H8Z8clrZeYqoS1r3mjYLsKw+9X94xKukouSPUcrQa63HfwtczegY pxWbOwIdPAf43sgJpr/08/cQlxtA6PaYeLgZnInISzjTsfqFnqa3UZ/9yunbdCadklli mkeCkMhp2dWy7rbWwynZzskkGCTWcPdkTyi2sxFKFtkAoZEffsSNE/KiYNVpHxVxuiMM jyk3y1irYnKzmr/H9y6gbY7f1kYe1TYy88vHfnpgbjZs5xTTQ+3ZKmos/AVIJuIBi761 sRO9NRm33hoK/RNwZ9+AfyxPqZ3b8c2Deq1koqudEKsaKbljvFpqGavl8Fv7cd1fuY/+ 2cug== X-Gm-Message-State: AA6/9Rn8Mtls7SWQ8NaJfLsfJW9netoSRvf8j1qGq+iXD7TqpyXvTM2QmaXwwTCAZ2/tMQ== X-Received: by 10.194.189.198 with SMTP id gk6mr6396848wjc.167.1476353002561; Thu, 13 Oct 2016 03:03:22 -0700 (PDT) Received: from localhost.localdomain ([2a02:c7d:9b6d:e300:916a:6cab:ac67:71c2]) by smtp.gmail.com with ESMTPSA id yo1sm21209210wjc.16.2016.10.13.03.03.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 03:03:22 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Thu, 13 Oct 2016 11:02:57 +0100 Message-Id: <1476352990-2504-6-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476352990-2504-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1476352990-2504-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [CI 06/19] drm/i915: Make IS_GEN-range macro only take dev_priv X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Saves 944 bytes of .rodata strings. v2: Add parantheses around dev_priv. (Ville Syrjala) Signed-off-by: Tvrtko Ursulin Reviewed-by: David Weinehall Acked-by: Daniel Vetter Acked-by: Jani Nikula Acked-by: Chris Wilson Acked-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 407be9f02b9b..756ec7ac628a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2619,7 +2619,7 @@ struct drm_i915_cmd_table { * * Use GEN_FOREVER for unbound start and or end. */ -#define IS_GEN(p, s, e) ({ \ +#define IS_GEN(dev_priv, s, e) ({ \ unsigned int __s = (s), __e = (e); \ BUILD_BUG_ON(!__builtin_constant_p(s)); \ BUILD_BUG_ON(!__builtin_constant_p(e)); \ @@ -2629,7 +2629,7 @@ struct drm_i915_cmd_table { __e = BITS_PER_LONG - 1; \ else \ __e = (e) - 1; \ - !!(INTEL_INFO(p)->gen_mask & GENMASK((__e), (__s))); \ + !!((dev_priv)->info.gen_mask & GENMASK((__e), (__s))); \ }) /*