[Intel-gfx] [PATCH] drm/i915: Fix comparison bug

2015-09-30 Thread Rasmus Villemoes
->stolen->start has type u64 aka unsigned long long; relying on the difference (effectively cast to int) for sorting is wrong. It wouldn't be a problem in practice if the values compared are always within INT_MAX of each other (so that the difference is actually representable in an int), but

Re: [Intel-gfx] [PATCH] drm/i915: Fix comparison bug

2015-09-29 Thread Jani Nikula
On Tue, 29 Sep 2015, Rasmus Villemoes wrote: > ->stolen->start has type u64 aka unsigned long long; relying on the > difference (effectively cast to int) for sorting is wrong. > > It wouldn't be a problem in practice if the values compared are always > within INT_MAX of

Re: [Intel-gfx] [PATCH] drm/i915: Fix comparison bug

2015-09-29 Thread Daniel Vetter
On Tue, Sep 29, 2015 at 10:37:30AM +0300, Jani Nikula wrote: > On Tue, 29 Sep 2015, Rasmus Villemoes wrote: > > ->stolen->start has type u64 aka unsigned long long; relying on the > > difference (effectively cast to int) for sorting is wrong. > > > > It wouldn't be a