diff mbox

[8/8] gem_ring_sync_loop.c: fix an operator error

Message ID 1366700809-18143-9-git-send-email-zhong.li@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

zhong.li@intel.com April 23, 2013, 7:06 a.m. UTC
Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 tests/gem_ring_sync_loop.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ben Widawsky April 27, 2013, 6:50 p.m. UTC | #1
On Tue, Apr 23, 2013 at 03:06:48PM +0800, Zhong Li wrote:
> Signed-off-by: Zhong Li <zhong.li@intel.com>
> ---
>  tests/gem_ring_sync_loop.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
> index 955bf34..cb79e7c 100644
> --- a/tests/gem_ring_sync_loop.c
> +++ b/tests/gem_ring_sync_loop.c
> @@ -68,7 +68,7 @@ get_num_rings(int fd)
>  	gp.param = I915_PARAM_HAS_BSD;
>  	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
>  	
> -	if ((ret == 0) & (*gp.value > 0))
> +	if ((ret == 0) && (*gp.value > 0))
>  		num_rings++;
>  	else
>  		goto skip;
> @@ -76,7 +76,7 @@ get_num_rings(int fd)
>  	gp.param = I915_PARAM_HAS_BLT;
>  	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
>  
> -	if ((ret == 0) & (*gp.value > 0))
> +	if ((ret == 0) && (*gp.value > 0))
>  		num_rings++;
>  	else
>  		goto skip;
> @@ -86,7 +86,7 @@ get_num_rings(int fd)
>  	gp.param = I915_PARAM_HAS_VEBOX;
>  	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
>  
> -	if ((ret == 0) & (*gp.value > 0))
> +	if ((ret == 0) && (*gp.value > 0))
>  		num_rings++;
>  	else
>  		goto skip;
> -- 
> 1.7.9.5
> 

So when I went through the series initially, I had this squashed into
patch 2. Unfortunately, I messed this up before I ended up pushing, so
now we have broken get_num_rings for several patches.

In the future when you submit a series like this, please add this kind
of fix directly into the patch it fixes.

Thanks.
diff mbox

Patch

diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c
index 955bf34..cb79e7c 100644
--- a/tests/gem_ring_sync_loop.c
+++ b/tests/gem_ring_sync_loop.c
@@ -68,7 +68,7 @@  get_num_rings(int fd)
 	gp.param = I915_PARAM_HAS_BSD;
 	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
 	
-	if ((ret == 0) & (*gp.value > 0))
+	if ((ret == 0) && (*gp.value > 0))
 		num_rings++;
 	else
 		goto skip;
@@ -76,7 +76,7 @@  get_num_rings(int fd)
 	gp.param = I915_PARAM_HAS_BLT;
 	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
 
-	if ((ret == 0) & (*gp.value > 0))
+	if ((ret == 0) && (*gp.value > 0))
 		num_rings++;
 	else
 		goto skip;
@@ -86,7 +86,7 @@  get_num_rings(int fd)
 	gp.param = I915_PARAM_HAS_VEBOX;
 	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
 
-	if ((ret == 0) & (*gp.value > 0))
+	if ((ret == 0) && (*gp.value > 0))
 		num_rings++;
 	else
 		goto skip;