[PATCH 12/13] drm/i2c/tda998x: Fix signed overflow issue

2014-04-07 Thread Ian Romanick
On 04/05/2014 02:45 AM, Daniel Vetter wrote: > This is C standard hair-splitting, but afaict > - sum will be promoted to signed int in computation since > uint8_t fits > - signed overflow is undefined. > > No we need to add up an awful lot of bytes to actually make it ^^ Now > overflow. But I

[PATCH 12/13] drm/i2c/tda998x: Fix signed overflow issue

2014-04-05 Thread Jean-Francois Moine
On Sat Apr 5 02:45:01 PDT 2014, Daniel Vetter wrote: > This is C standard hair-splitting, but afaict > - sum will be promoted to signed int in computation since > uint8_t fits > - signed overflow is undefined. [snip] > drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- > 1 file changed, 1 inser

[PATCH 12/13] drm/i2c/tda998x: Fix signed overflow issue

2014-04-05 Thread Daniel Vetter
This is C standard hair-splitting, but afaict - sum will be promoted to signed int in computation since uint8_t fits - signed overflow is undefined. No we need to add up an awful lot of bytes to actually make it overflow. But I guess the real risk is gcc spotting this and going bananas. Fix this