Re: [PATCH v7 5/6] drm/i915/guc: Check the locking status of GuC WOPCM registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 01/31/2018 11:41 PM, Chris Wilson wrote:

  - Fixed patch format issues

Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Signed-off-by: Jackie Li <yaodong.li@xxxxxxxxx>
---
+static inline bool __reg_locked(struct drm_i915_private *dev_priv,
+                               i915_reg_t reg)
+{
+       return !!(I915_READ(reg) & GUC_WOPCM_REG_LOCKED);
Why the double cast to bool?
My thought was the code would be clearer to use bool as the return type and
have a explicit cast to bool. Are you suggesting I should use a return type such as *int*
and remove the double cast?

Regards,
-Jackie

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux