diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-09-20 14:20:18 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-20 23:50:01 +0200 |
commit | e5ad4026b9270532bfbc2fcb73cc74fbb46887d1 (patch) | |
tree | a0a359e60bbbbd0e19794532d68715d1053061d8 /drivers/gpu/drm/i915/i915_sysfs.c | |
parent | d6317290bfd8673d1cf3b6f8a12c72b3297eac36 (diff) | |
download | op-kernel-dev-e5ad4026b9270532bfbc2fcb73cc74fbb46887d1.zip op-kernel-dev-e5ad4026b9270532bfbc2fcb73cc74fbb46887d1.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index 176de44..44f4c1a 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -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) |