diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-07-12 04:03:32 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-07-12 04:03:32 +0000 |
commit | bc7f3a30378ce1a9427f631ea11668330aebda9f (patch) | |
tree | bc7b4fee5c6e98596f0284c01794865bd8e0193f /sys/dev | |
parent | a7833fe25aa8da6672450a5bbe03f40694946644 (diff) |
drm/amdgpu: fix the warning about the expression (int)size - len
From Jesse Zhang
3fac5aecb59336c9ae808a2cf4733f9f185e3fa2 in linux-6.6.y/6.6.39
ea686fef5489ef7a2450a9fdbcc732b837fb46a8 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c index 418ff7cd662..1c2c9ff9d39 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c @@ -2052,12 +2052,13 @@ static ssize_t amdgpu_reset_dump_register_list_write(struct file *f, struct amdgpu_device *adev = (struct amdgpu_device *)file_inode(f)->i_private; char reg_offset[11]; uint32_t *new = NULL, *tmp = NULL; - int ret, i = 0, len = 0; + unsigned int len = 0; + int ret, i = 0; do { memset(reg_offset, 0, 11); if (copy_from_user(reg_offset, buf + len, - min(10, ((int)size-len)))) { + min(10, (size-len)))) { ret = -EFAULT; goto error_free; } |