[Intel-gfx] [PATCH 04/46] drm/i915: Markup paired operations on wakerefs
John Harrison
John.C.Harrison at Intel.com
Wed Jan 9 23:33:40 UTC 2019
On 1/9/2019 03:51, Chris Wilson wrote:
> Quoting Mika Kuoppala (2019-01-09 09:23:53)
>> I should have been more specific. My concern was on documenting
>> the changing return values.
> The interface isn't documented, there's nothing in the header about the
> functions? Where else would it be?
I think Mika's point is that you now have inaccurate comments at the
start of the _get functions:
@@ -4207,7 +4256,7 @@ void intel_runtime_pm_get(struct drm_i915_private *i915)
*
* Returns: True if the wakeref was acquired, or False otherwise.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
-bool intel_runtime_pm_get_if_in_use(struct drm_i915_private *i915)
+intel_wakeref_t intel_runtime_pm_get_if_in_use(struct drm_i915_private *i915)
{
The comment says 'returns: true ... or false' but should actually say 'returns: an intel_wakeref_t if the wakeref was acquired or zero otherwise'. With the assumption that zero is guaranteed to be an invalid value for an intel_wakeref_t.
The other _get functions were previously void but also now return a wakeref_t. Hence, they should have their comments updated too.
John.
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list