Message ID | 20181114011509.3667-3-lucas.demarchi@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/3] drm/i915/icl: replace check for combo phy | expand |
On Tue, 13 Nov 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote: > Do like it's done for list.h macros, and use "reverse" suffix rather > than "rev". > > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/intel_display.h | 6 +++--- > drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h > index 5d50decbcbb5..43eb4ebbcc35 100644 > --- a/drivers/gpu/drm/i915/intel_display.h > +++ b/drivers/gpu/drm/i915/intel_display.h > @@ -368,7 +368,7 @@ struct intel_link_m_n { > (__dev_priv)->power_domains.power_well_count; \ > (__power_well)++) > > -#define for_each_power_well_rev(__dev_priv, __power_well) \ > +#define for_each_power_well_reverse(__dev_priv, __power_well) \ > for ((__power_well) = (__dev_priv)->power_domains.power_wells + \ > (__dev_priv)->power_domains.power_well_count - 1; \ > (__power_well) - (__dev_priv)->power_domains.power_wells >= 0; \ > @@ -378,8 +378,8 @@ struct intel_link_m_n { > for_each_power_well(__dev_priv, __power_well) \ > for_each_if((__power_well)->desc->domains & (__domain_mask)) > > -#define for_each_power_domain_well_rev(__dev_priv, __power_well, __domain_mask) \ > - for_each_power_well_rev(__dev_priv, __power_well) \ > +#define for_each_power_domain_well_reverse(__dev_priv, __power_well, __domain_mask) \ > + for_each_power_well_reverse(__dev_priv, __power_well) \ > for_each_if((__power_well)->desc->domains & (__domain_mask)) > > #define for_each_new_intel_plane_in_state(__state, plane, new_plane_state, __i) \ > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c > index f945db6ea420..7aa5f07f1356 100644 > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c > @@ -208,7 +208,7 @@ bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv, > > is_enabled = true; > > - for_each_power_domain_well_rev(dev_priv, power_well, BIT_ULL(domain)) { > + for_each_power_domain_well_reverse(dev_priv, power_well, BIT_ULL(domain)) { > if (power_well->desc->always_on) > continue; > > @@ -1651,7 +1651,7 @@ void intel_display_power_put(struct drm_i915_private *dev_priv, > intel_display_power_domain_str(domain)); > power_domains->domain_use_count[domain]--; > > - for_each_power_domain_well_rev(dev_priv, power_well, BIT_ULL(domain)) > + for_each_power_domain_well_reverse(dev_priv, power_well, BIT_ULL(domain)) > intel_power_well_put(dev_priv, power_well); > > mutex_unlock(&power_domains->lock);
diff --git a/drivers/gpu/drm/i915/intel_display.h b/drivers/gpu/drm/i915/intel_display.h index 5d50decbcbb5..43eb4ebbcc35 100644 --- a/drivers/gpu/drm/i915/intel_display.h +++ b/drivers/gpu/drm/i915/intel_display.h @@ -368,7 +368,7 @@ struct intel_link_m_n { (__dev_priv)->power_domains.power_well_count; \ (__power_well)++) -#define for_each_power_well_rev(__dev_priv, __power_well) \ +#define for_each_power_well_reverse(__dev_priv, __power_well) \ for ((__power_well) = (__dev_priv)->power_domains.power_wells + \ (__dev_priv)->power_domains.power_well_count - 1; \ (__power_well) - (__dev_priv)->power_domains.power_wells >= 0; \ @@ -378,8 +378,8 @@ struct intel_link_m_n { for_each_power_well(__dev_priv, __power_well) \ for_each_if((__power_well)->desc->domains & (__domain_mask)) -#define for_each_power_domain_well_rev(__dev_priv, __power_well, __domain_mask) \ - for_each_power_well_rev(__dev_priv, __power_well) \ +#define for_each_power_domain_well_reverse(__dev_priv, __power_well, __domain_mask) \ + for_each_power_well_reverse(__dev_priv, __power_well) \ for_each_if((__power_well)->desc->domains & (__domain_mask)) #define for_each_new_intel_plane_in_state(__state, plane, new_plane_state, __i) \ diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index f945db6ea420..7aa5f07f1356 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -208,7 +208,7 @@ bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv, is_enabled = true; - for_each_power_domain_well_rev(dev_priv, power_well, BIT_ULL(domain)) { + for_each_power_domain_well_reverse(dev_priv, power_well, BIT_ULL(domain)) { if (power_well->desc->always_on) continue; @@ -1651,7 +1651,7 @@ void intel_display_power_put(struct drm_i915_private *dev_priv, intel_display_power_domain_str(domain)); power_domains->domain_use_count[domain]--; - for_each_power_domain_well_rev(dev_priv, power_well, BIT_ULL(domain)) + for_each_power_domain_well_reverse(dev_priv, power_well, BIT_ULL(domain)) intel_power_well_put(dev_priv, power_well); mutex_unlock(&power_domains->lock);
Do like it's done for list.h macros, and use "reverse" suffix rather than "rev". Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/i915/intel_display.h | 6 +++--- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)