[PATCH] drm/i915: error_buffer->ring should be signed

2012-02-27 Thread Daniel Vetter
On Thu, Feb 16, 2012 at 02:16:27PM +0300, Dan Carpenter wrote:
> On Thu, Feb 16, 2012 at 11:03:29AM +0100, Daniel Vetter wrote:
> > gcc seems to get uber-anal recently about these things.
> > 
> 
> Sorry, I should have said that it's not a gcc warning, it's a
> smatch thing.  But also it's not uber-anal.  It's the exact level of
> anality which is required to make the == -1 test work.  You can
> compare unsigned int and longs to -1 and it works but for smaller
> types it doesn't.

I've picked this one here up for -next, thanks for your clarification
(added to the commit message in).
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


Re: [PATCH] drm/i915: error_buffer-ring should be signed

2012-02-27 Thread Daniel Vetter
On Thu, Feb 16, 2012 at 02:16:27PM +0300, Dan Carpenter wrote:
 On Thu, Feb 16, 2012 at 11:03:29AM +0100, Daniel Vetter wrote:
  gcc seems to get uber-anal recently about these things.
  
 
 Sorry, I should have said that it's not a gcc warning, it's a
 smatch thing.  But also it's not uber-anal.  It's the exact level of
 anality which is required to make the == -1 test work.  You can
 compare unsigned int and longs to -1 and it works but for smaller
 types it doesn't.

I've picked this one here up for -next, thanks for your clarification
(added to the commit message in).
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/i915: error_buffer->ring should be signed

2012-02-16 Thread Dan Carpenter
On Thu, Feb 16, 2012 at 11:03:29AM +0100, Daniel Vetter wrote:
> gcc seems to get uber-anal recently about these things.
> 

Sorry, I should have said that it's not a gcc warning, it's a
smatch thing.  But also it's not uber-anal.  It's the exact level of
anality which is required to make the == -1 test work.  You can
compare unsigned int and longs to -1 and it works but for smaller
types it doesn't.

regards,
dan carpenter

-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: 



[PATCH] drm/i915: error_buffer->ring should be signed

2012-02-16 Thread Paul Menzel
Am Donnerstag, den 16.02.2012, 11:03 +0100 schrieb Daniel Vetter:
> gcc seems to get uber-anal recently about these things.

which was introduced by the following commit.

96154f2faba5: "drm/i915: switch ring->id to be a real id"

> Reported-by: Dan Carpenter 

The URL of the report is the following.

http://lists.freedesktop.org/archives/dri-devel/2012-February/019183.html

> Signed-off-by: Daniel Vetter 

Acked-by: Paul Menzel 

> ---
>  drivers/gpu/drm/i915/i915_drv.h |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b839728..35833fc 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -199,7 +199,7 @@ struct drm_i915_error_state {
>   u32 tiling:2;
>   u32 dirty:1;
>   u32 purgeable:1;
> - u32 ring:4;
> + s32 ring:4;
>   u32 cache_level:2;
>   } *active_bo, *pinned_bo;
>   u32 active_bo_count, pinned_bo_count;


Thanks,

Paul
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: 



[PATCH] drm/i915: error_buffer-ring should be signed

2012-02-16 Thread Daniel Vetter
gcc seems to get uber-anal recently about these things.

Reported-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch
---
 drivers/gpu/drm/i915/i915_drv.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b839728..35833fc 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -199,7 +199,7 @@ struct drm_i915_error_state {
u32 tiling:2;
u32 dirty:1;
u32 purgeable:1;
-   u32 ring:4;
+   s32 ring:4;
u32 cache_level:2;
} *active_bo, *pinned_bo;
u32 active_bo_count, pinned_bo_count;
-- 
1.7.9

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/i915: error_buffer-ring should be signed

2012-02-16 Thread Paul Menzel
Am Donnerstag, den 16.02.2012, 11:03 +0100 schrieb Daniel Vetter:
 gcc seems to get uber-anal recently about these things.

which was introduced by the following commit.

96154f2faba5: drm/i915: switch ring-id to be a real id

 Reported-by: Dan Carpenter dan.carpen...@oracle.com

The URL of the report is the following.

http://lists.freedesktop.org/archives/dri-devel/2012-February/019183.html

 Signed-off-by: Daniel Vetter daniel.vet...@ffwll.ch

Acked-by: Paul Menzel paulepan...@users.sourceforge.net

 ---
  drivers/gpu/drm/i915/i915_drv.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
 index b839728..35833fc 100644
 --- a/drivers/gpu/drm/i915/i915_drv.h
 +++ b/drivers/gpu/drm/i915/i915_drv.h
 @@ -199,7 +199,7 @@ struct drm_i915_error_state {
   u32 tiling:2;
   u32 dirty:1;
   u32 purgeable:1;
 - u32 ring:4;
 + s32 ring:4;
   u32 cache_level:2;
   } *active_bo, *pinned_bo;
   u32 active_bo_count, pinned_bo_count;


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/i915: error_buffer-ring should be signed

2012-02-16 Thread Dan Carpenter
On Thu, Feb 16, 2012 at 11:03:29AM +0100, Daniel Vetter wrote:
 gcc seems to get uber-anal recently about these things.
 

Sorry, I should have said that it's not a gcc warning, it's a
smatch thing.  But also it's not uber-anal.  It's the exact level of
anality which is required to make the == -1 test work.  You can
compare unsigned int and longs to -1 and it works but for smaller
types it doesn't.

regards,
dan carpenter



signature.asc
Description: Digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel