From patchwork Wed Aug 8 17:15:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1296941 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 87416DF223 for ; Wed, 8 Aug 2012 17:20:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FD149E787 for ; Wed, 8 Aug 2012 10:20:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 71CCAA0A95 for ; Wed, 8 Aug 2012 10:16:28 -0700 (PDT) Received: by mail-yx0-f177.google.com with SMTP id r9so1099933yen.36 for ; Wed, 08 Aug 2012 10:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=8VFzrr+0lhGK5xdzySRPpb53Qny1TFNlUPJ6MXlrDn4=; b=inhvNSZQ0u/FHXm2S8x8P+DsFavI6x8ExAXEZmrFOkqxoQ/ArMqDDOpatBH53VpBxb loqRs9X5VGUWqSKgGPZ5Cz8i534ND3QfR+rkByEyXvcMUhNtQ1XgaMGaQUUEbatptQr1 za+EPpRqRNU0SdTQEXpTocVFE81zrnEfULRidH8VqGzuzJgqLn/9e95u0MN/Et8U1tS9 Ib6+8hxeu2NUnUuCCtGcybTRPuSYovklLa1H/GOOw2tW4nOD8MRgsF99GXT/JlH98v2f ZA2+t/fMnaLoS1P7ZGkPUDWLuh0pUHduDqdw/re5EuuQasLblLpsUXYkBacvDYVQtuIF pxGg== Received: by 10.236.138.138 with SMTP id a10mr17273920yhj.39.1344446188292; Wed, 08 Aug 2012 10:16:28 -0700 (PDT) Received: from vicky.domain.invalid ([177.40.34.45]) by mx.google.com with ESMTPS id s17sm7583724anj.13.2012.08.08.10.16.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 10:16:27 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 8 Aug 2012 14:15:32 -0300 Message-Id: <1344446134-3704-7-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344446134-3704-1-git-send-email-przanoni@gmail.com> References: <1344446134-3704-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 6/8] drm/i915: add parentheses around PIXCLK_GATE definitions X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni By looking at the current way we're using these definitions I don't think this commit will fix any bug, but programmers from the future are evil and will certainly find ways to combine macro expansion with operator precedence to introduce bugs that are hard to find. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index af41d03..321ae72 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -4395,8 +4395,8 @@ /* LPT PIXCLK_GATE */ #define PIXCLK_GATE 0xC6020 -#define PIXCLK_GATE_UNGATE 1<<0 -#define PIXCLK_GATE_GATE 0<<0 +#define PIXCLK_GATE_UNGATE (1<<0) +#define PIXCLK_GATE_GATE (0<<0) /* SPLL */ #define SPLL_CTL 0x46020