Re: [PATCH] drm/i915/pages: some more unsigned long conversions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Matthew Auld (2020-04-17 10:30:46)
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> index 54ee658bb168..0399940fff94 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object_types.h
> @@ -236,7 +236,7 @@ struct drm_i915_gem_object {
>  
>                 struct i915_gem_object_page_iter {
>                         struct scatterlist *sg_pos;
> -                       unsigned int sg_idx; /* in pages, but 32bit eek! */
> +                       unsigned long sg_idx; /* in pages */

iirc sg_idx is still unsigned int.

Could you keep this and idx as int but add some GEM_BUG_ON(overflows_type)
Hmm, or probably better would be overflows_type(sg->len) which is I
think the trouble iirc.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux