From b63e6aa5028dfde3b360945564290de28b47c2d7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 12 Apr 2013 15:34:31 +0100 Subject: 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// 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: David Howells cc: dri-devel@lists.freedesktop.org Signed-off-by: Al Viro --- include/drm/drmP.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/drm/drmP.h') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index af5332059328..60c33f14408f 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1546,8 +1546,7 @@ extern struct idr drm_minors_idr; extern struct drm_local_map *drm_getsarea(struct drm_device *dev); /* Proc support (drm_proc.h) */ -extern int drm_proc_init(struct drm_minor *minor, int minor_id, - struct proc_dir_entry *root); +extern int drm_proc_init(struct drm_minor *minor, struct proc_dir_entry *root); extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root); /* Debugfs support */ -- cgit v1.2.3