Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition
Date: Tue, 20 Nov 2018 13:12:36 +0200	[thread overview]
Message-ID: <87d0r0f1ej.fsf@intel.com> (raw)
In-Reply-To: <154236556861.24263.3741843176505793704@skylake-alporthouse-com>

On Fri, 16 Nov 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-11-15 12:01:24)
>> No need to use a compound statement enclosed in parenthesis where a C99
>> compound literal will do. No functional changes.
>> 
>> 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 08316e50167a..927c59395569 100644
>> --- a/drivers/gpu/drm/i915/i915_fixed.h
>> +++ b/drivers/gpu/drm/i915/i915_fixed.h
>> @@ -7,11 +7,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 })
>
> Following the standard set by pgprot_t
>
> #define u16_16(x) ((u16_16_t){ .val = (x) })
> #define U16_16_MAX u16_16(U32_MAX)

I left that for follow-up, and pushed v2 of the series.

I think the uint_fixed_16_16_t type name is a bit unwieldy, should we
rename that while at it...

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-11-20 11:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 12:01 [PATCH 1/5] drm/i915: extract fixed point math to i915_fixed.h Jani Nikula
2018-11-15 12:01 ` [PATCH 2/5] drm/i915/fixed: prefer kernel types over stdint types Jani Nikula
2018-11-16 10:38   ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 3/5] drm/i915/fixed: simplify FP_16_16_MAX definition Jani Nikula
2018-11-16 10:40   ` Joonas Lahtinen
2018-11-16 10:54     ` Jani Nikula
2018-11-16 10:52   ` Chris Wilson
2018-11-20 11:12     ` Jani Nikula [this message]
2018-11-15 12:01 ` [PATCH 4/5] drm/i915/fixed: simplify is_fixed16_zero() Jani Nikula
2018-11-16 10:40   ` Joonas Lahtinen
2018-11-15 12:01 ` [PATCH 5/5] drm/i915/fixed: cosmetic cleanup Jani Nikula
2018-11-16 10:56   ` Joonas Lahtinen
2018-11-15 12:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: extract fixed point math to i915_fixed.h Patchwork
2018-11-15 13:00 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-15 13:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-15 15:55 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-16 10:36 ` [PATCH 1/5] " Joonas Lahtinen
2018-11-16 10:52   ` 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=87d0r0f1ej.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox