mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 23:59:55 +07:00
drm/i915: cleanup a min_t() cast
The lower layers of sysfs will not allow an "offset" of more than GEN7_L3LOG_SIZE and also l3_access_valid() caps it a second time. But it's a little easier to audit if we don't have to worry that the subtraction will result in negative values. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
d6317290bf
commit
e5ad4026b9
@ -131,7 +131,7 @@ i915_l3_read(struct file *filp, struct kobject *kobj,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
count = min_t(int, GEN7_L3LOG_SIZE-offset, count);
|
||||
count = min_t(size_t, GEN7_L3LOG_SIZE - offset, count);
|
||||
|
||||
ret = i915_mutex_lock_interruptible(drm_dev);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user