diff mbox

drm/i915/mocs: || vs | typo in get_mocs_settings()

Message ID 20160613065422.GB5993@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter June 13, 2016, 6:54 a.m. UTC
It seems pretty clear that bitwise OR was intended here and not logical
OR.

Fixes: 6fc29133eafb ('drm/i915/gen9: Add WaDisableSkipCaching')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Mika Kuoppala June 13, 2016, 10:40 a.m. UTC | #1
Dan Carpenter <dan.carpenter@oracle.com> writes:

> It seems pretty clear that bitwise OR was intended here and not logical
> OR.
>
> Fixes: 6fc29133eafb ('drm/i915/gen9: Add WaDisableSkipCaching')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

>
> diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
> index 8f96c40..3c1482b 100644
> --- a/drivers/gpu/drm/i915/intel_mocs.c
> +++ b/drivers/gpu/drm/i915/intel_mocs.c
> @@ -162,7 +162,7 @@ static bool get_mocs_settings(struct drm_i915_private *dev_priv,
>  
>  		for (i = 0; i < table->size; i++)
>  			if (WARN_ON(table->table[i].l3cc_value &
> -				    (L3_ESC(1) || L3_SCC(0x7))))
> +				    (L3_ESC(1) | L3_SCC(0x7))))
>  				return false;
>  	}
>
Mika Kuoppala June 13, 2016, 2:40 p.m. UTC | #2
Dan Carpenter <dan.carpenter@oracle.com> writes:

> It seems pretty clear that bitwise OR was intended here and not logical
> OR.
>
> Fixes: 6fc29133eafb ('drm/i915/gen9: Add WaDisableSkipCaching')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Pushed to drm-intel-next-queued. Thanks for patch.
-Mika


>
> diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
> index 8f96c40..3c1482b 100644
> --- a/drivers/gpu/drm/i915/intel_mocs.c
> +++ b/drivers/gpu/drm/i915/intel_mocs.c
> @@ -162,7 +162,7 @@ static bool get_mocs_settings(struct drm_i915_private *dev_priv,
>  
>  		for (i = 0; i < table->size; i++)
>  			if (WARN_ON(table->table[i].l3cc_value &
> -				    (L3_ESC(1) || L3_SCC(0x7))))
> +				    (L3_ESC(1) | L3_SCC(0x7))))
>  				return false;
>  	}
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
index 8f96c40..3c1482b 100644
--- a/drivers/gpu/drm/i915/intel_mocs.c
+++ b/drivers/gpu/drm/i915/intel_mocs.c
@@ -162,7 +162,7 @@  static bool get_mocs_settings(struct drm_i915_private *dev_priv,
 
 		for (i = 0; i < table->size; i++)
 			if (WARN_ON(table->table[i].l3cc_value &
-				    (L3_ESC(1) || L3_SCC(0x7))))
+				    (L3_ESC(1) | L3_SCC(0x7))))
 				return false;
 	}