mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
drm: Use max() to make the ioctl alloc size code cleaner
Use max() to make the code to determine the allocation size for the ioctl data easier to read. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
83be003807
commit
53615af7a2
@ -683,9 +683,8 @@ long drm_ioctl(struct file *filp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
drv_size = _IOC_SIZE(ioctl->cmd);
|
drv_size = _IOC_SIZE(ioctl->cmd);
|
||||||
usize = asize = _IOC_SIZE(cmd);
|
usize = _IOC_SIZE(cmd);
|
||||||
if (drv_size > asize)
|
asize = max(usize, drv_size);
|
||||||
asize = drv_size;
|
|
||||||
cmd = ioctl->cmd;
|
cmd = ioctl->cmd;
|
||||||
|
|
||||||
DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n",
|
DRM_DEBUG("pid=%d, dev=0x%lx, auth=%d, %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user