All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH v2 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
Date: Fri, 16 Nov 2018 14:07:27 +0200	[thread overview]
Message-ID: <20181116120729.7580-3-jani.nikula@intel.com> (raw)
In-Reply-To: <20181116120729.7580-1-jani.nikula@intel.com>

No need to use a compound statement enclosed in parenthesis where a C99
compound literal will do. No functional changes.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_fixed.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_fixed.h b/drivers/gpu/drm/i915/i915_fixed.h
index 6c914940b4a9..da43c930dfa2 100644
--- a/drivers/gpu/drm/i915/i915_fixed.h
+++ b/drivers/gpu/drm/i915/i915_fixed.h
@@ -10,11 +10,7 @@ typedef struct {
 	u32 val;
 } uint_fixed_16_16_t;
 
-#define FP_16_16_MAX ({ \
-	uint_fixed_16_16_t fp; \
-	fp.val = UINT_MAX; \
-	fp; \
-})
+#define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
 
 static inline bool is_fixed16_zero(uint_fixed_16_16_t val)
 {
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-11-16 12:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 12:07 [PATCH v2 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
2018-11-16 12:07 ` [PATCH v2 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
2018-11-16 19:27   ` Rodrigo Vivi
2018-11-16 12:07 ` Jani Nikula [this message]
2018-11-16 12:07 ` [PATCH v2 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
2018-11-16 12:07 ` [PATCH v2 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
2018-11-16 12:16 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/5] drm/i915: extract fixed point math to i915_fixed.h Patchwork
2018-11-16 12:19 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-16 12:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-16 23:18 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-20 11:11 ` [PATCH v2 1/5] " Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181116120729.7580-3-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.