From patchwork Tue Oct 11 13:21:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9370993 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 1937B6048F for ; Tue, 11 Oct 2016 13:22:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05CC82900C for ; Tue, 11 Oct 2016 13:22:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA83C2901D; Tue, 11 Oct 2016 13:22:38 +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 555152900C for ; Tue, 11 Oct 2016 13:22:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D110A6E66C; Tue, 11 Oct 2016 13:22:34 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65E986E661 for ; Tue, 11 Oct 2016 13:22:15 +0000 (UTC) Received: by mail-lf0-x241.google.com with SMTP id p80so3751891lfp.1 for ; Tue, 11 Oct 2016 06:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3o57TRTEQXs5onhFk6bwrMXjcIhj9xJm8Mb59IXltr4=; b=Ybbq/GAe/R+LNxmBH6h73vWdrkr9BxEdb790BSSD6VuMsdC/AeiS1c6SQ2cJ4zK0NM 7xA7Dnd2c2mEa333v9VG63RWOCtmNwoSs0Paz2WBgTwTVJDkXektSkgq0uKutqXxiASh BNUNxIfZMw01eAVIa1N/FrE2kQCsobUUZULfkLHs6xsPXL6llg/uvE6aY6ae8EEvscYH Qr92424AhWgksNzwLtNEbUfKdMMx/D2uh4VdqCns5zeBXTUHtY1EM1sruxM+9WMoB5ab n9jUdjSPPHZHFrNTRqmmMecTNHvWMpsEdRTLG0mqn+4Vht2CYYDuCLgcKTelVkeRTDD5 vFQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3o57TRTEQXs5onhFk6bwrMXjcIhj9xJm8Mb59IXltr4=; b=QnelmRJYJPN0XO5882RmYC7uuKUuj7Pyu74ev+aTZ/af6qKZKgnmZbytWlwM1mt6ll IJ7eNlsctHPtDy4Y0XonSI0UJPFBuFwfJ2bZyfjJxc2ZHszHYvcmmiZL3x7o9j183PRF G9nRj5D7z6kUYWgQIdeY2QsIYZxILbhZKNNjBVwnxBCNqChbdHudmTied7lZb6EzmKqx HAaTI7AtQxvoYwaCwlRMhQER52ewt12TF+Q84yy4bL4Umti98nU00p2iq+bfTBzqXXDz T+bkEJAU2nHP9nxQexkqm1tPEoFyqsob1ywPbaDh24PcLTPM30vCGKdCl3Qrd0VtWjDm 1IDg== X-Gm-Message-State: AA6/9RmON2Ku8+IoEf7GgAgZj0qb4bUa4HhDL3G6CJAq3rWzeb4rcrC/+kgm2zLBJHkhkQ== X-Received: by 10.194.59.18 with SMTP id v18mr5070555wjq.69.1476192133445; Tue, 11 Oct 2016 06:22:13 -0700 (PDT) Received: from localhost.localdomain ([2a02:c7d:9b6d:e300:916a:6cab:ac67:71c2]) by smtp.gmail.com with ESMTPSA id zz9sm6387037wjb.36.2016.10.11.06.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Oct 2016 06:22:13 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Tue, 11 Oct 2016 14:21:39 +0100 Message-Id: <1476192112-25336-7-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476192112-25336-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1476192112-25336-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 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 --- 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 aac9375cccb3..58045cd7a087 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2616,7 +2616,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)); \ @@ -2626,7 +2626,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))); \ }) /*