Skip to content
Commit b63e6aa5 authored by David Howells's avatar David Howells Committed by Al Viro
Browse files

drm: proc: Use minor->index to label things, not PDE->name



Use minor->index to label things, not the name field from the proc_dir_entry
of the /proc/dwm/<minor>/ directory.

Also, use "%u" not "%d" to render the value and use a 12-byte buffer in which
to render the integer, not a 16-byte buffer.  The longest string an unsigned
int can give you is 10 chars (4294967295) plus a NUL, so round up to 12 as the
stack is likely to be 4- or 8-byte aligned.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ce089b54
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment