diff mbox series

[v2,3/6] drm/i915/display: return 0 instead of false for disabled power wakeref

Message ID 263b062a37e7b9c345b5d3335282558ac38c5b73.1726680898.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: wakeref fixes and improvements | expand

Commit Message

Jani Nikula Sept. 18, 2024, 5:35 p.m. UTC
We can use 0 for intel_wakeref_t, but not false. Fix it.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409190032.ZCHBxK9e-lkp@intel.com/
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rodrigo Vivi Sept. 26, 2024, 8:46 p.m. UTC | #1
On Wed, Sep 18, 2024 at 08:35:45PM +0300, Jani Nikula wrote:
> We can use 0 for intel_wakeref_t, but not false. Fix it.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202409190032.ZCHBxK9e-lkp@intel.com/

my bad, sorry!

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 40727a22f18b..7b16ba1a8226 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -545,7 +545,7 @@ intel_display_power_get_if_enabled(struct drm_i915_private *dev_priv,
>  
>  	wakeref = intel_runtime_pm_get_if_in_use(&dev_priv->runtime_pm);
>  	if (!wakeref)
> -		return false;
> +		return 0;
>  
>  	mutex_lock(&power_domains->lock);
>  
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 40727a22f18b..7b16ba1a8226 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -545,7 +545,7 @@  intel_display_power_get_if_enabled(struct drm_i915_private *dev_priv,
 
 	wakeref = intel_runtime_pm_get_if_in_use(&dev_priv->runtime_pm);
 	if (!wakeref)
-		return false;
+		return 0;
 
 	mutex_lock(&power_domains->lock);