Re: [Intel-gfx] [PATCH] drm/i915: Fix erroneous conversion to u8

2014-08-08 Thread Daniel Vetter
On Fri, Aug 08, 2014 at 09:32:20PM +0300, Ville Syrjälä wrote: > On Fri, Aug 08, 2014 at 07:25:57PM +0100, Damien Lespiau wrote: > > adj was defined as u8. The issue is last_adj can be negative and adj is > > initialized with: > > > > adj = dev_priv->rps.last_adj; > > > > and we were also happi

Re: [Intel-gfx] [PATCH] drm/i915: Fix erroneous conversion to u8

2014-08-08 Thread Ville Syrjälä
On Fri, Aug 08, 2014 at 07:25:57PM +0100, Damien Lespiau wrote: > adj was defined as u8. The issue is last_adj can be negative and adj is > initialized with: > > adj = dev_priv->rps.last_adj; > > and we were also happily doing things like: > > if (adj < 0) > > (thank static analysers!) > >

Re: [Intel-gfx] [PATCH] drm/i915: Fix erroneous conversion to u8

2014-08-08 Thread Ville Syrjälä
On Fri, Aug 08, 2014 at 06:34:48PM +0100, Damien Lespiau wrote: > adj was defined as u8. The issue is last_adj can be negative and adj is > initialized with: > > adj = dev_priv->rps.last_adj; > > and we were also happily doing things like: > > if (adj < 0) > > (thank static analysers!) > >