Re: [PATCH] drm/i915/gem: Remove unnecessary cast

2024-08-23 Thread Rodrigo Vivi
On Fri, Aug 16, 2024 at 10:20:48AM +0200, Andi Shyti wrote: > Hi Rodrigo, > > On Thu, Aug 15, 2024 at 02:58:25PM -0400, Rodrigo Vivi wrote: > > On Wed, Aug 14, 2024 at 07:59:47PM +0200, Andi Shyti wrote: > > > The cast from "long" to "unsigned long" is unnecessary. Remove > > > it. > > > > I don'

Re: [PATCH] drm/i915/gem: Remove unnecessary cast

2024-08-16 Thread Andi Shyti
Hi Rodrigo, On Thu, Aug 15, 2024 at 02:58:25PM -0400, Rodrigo Vivi wrote: > On Wed, Aug 14, 2024 at 07:59:47PM +0200, Andi Shyti wrote: > > The cast from "long" to "unsigned long" is unnecessary. Remove > > it. > > I don't believe we can be that bold in this statement. > Some static analyzer tool

Re: [PATCH] drm/i915/gem: Remove unnecessary cast

2024-08-15 Thread Rodrigo Vivi
On Wed, Aug 14, 2024 at 07:59:47PM +0200, Andi Shyti wrote: > The cast from "long" to "unsigned long" is unnecessary. Remove > it. I don't believe we can be that bold in this statement. Some static analyzer tools might not agree and tell that if the start or end are negative values we could have u

[PATCH] drm/i915/gem: Remove unnecessary cast

2024-08-14 Thread Andi Shyti
The cast from "long" to "unsigned long" is unnecessary. Remove it. In this case, the variables "start" and "end" are of type long because they need to account for the possibility of negative values. However, they are subsequently moved to "unsigned long" since addresses are typically handled as un