intel-gem: checkpatch.pl on drm_proc.c new contents.

main
Eric Anholt 2008-07-28 16:33:50 -07:00
parent 1d2bb68d28
commit e68b57c17d
1 changed files with 20 additions and 20 deletions

View File

@ -594,16 +594,16 @@ struct drm_gem_name_info_data {
int eof; int eof;
}; };
static int drm_gem_one_name_info (int id, void *ptr, void *data) static int drm_gem_one_name_info(int id, void *ptr, void *data)
{ {
struct drm_gem_object *obj = ptr; struct drm_gem_object *obj = ptr;
struct drm_gem_name_info_data *nid = data; struct drm_gem_name_info_data *nid = data;
DRM_INFO ("name %d size %d\n", obj->name, obj->size); DRM_INFO("name %d size %d\n", obj->name, obj->size);
if (nid->eof) if (nid->eof)
return 0; return 0;
nid->len += sprintf (&nid->buf[nid->len], nid->len += sprintf(&nid->buf[nid->len],
"%6d%9d%8d%9d\n", "%6d%9d%8d%9d\n",
obj->name, obj->size, obj->name, obj->size,
atomic_read(&obj->handlecount.refcount), atomic_read(&obj->handlecount.refcount),
@ -627,10 +627,10 @@ static int drm_gem_name_info(char *buf, char **start, off_t offset,
return 0; return 0;
} }
nid.len = sprintf (buf, " name size handles refcount\n"); nid.len = sprintf(buf, " name size handles refcount\n");
nid.buf = buf; nid.buf = buf;
nid.eof = 0; nid.eof = 0;
idr_for_each (&dev->object_name_idr, drm_gem_one_name_info, &nid); idr_for_each(&dev->object_name_idr, drm_gem_one_name_info, &nid);
*start = &buf[offset]; *start = &buf[offset];
*eof = 0; *eof = 0;
@ -654,11 +654,11 @@ static int drm_gem_object_info(char *buf, char **start, off_t offset,
*start = &buf[offset]; *start = &buf[offset];
*eof = 0; *eof = 0;
DRM_PROC_PRINT("%d objects\n", atomic_read (&dev->object_count)); DRM_PROC_PRINT("%d objects\n", atomic_read(&dev->object_count));
DRM_PROC_PRINT("%d object bytes\n", atomic_read (&dev->object_memory)); DRM_PROC_PRINT("%d object bytes\n", atomic_read(&dev->object_memory));
DRM_PROC_PRINT("%d pinned\n", atomic_read (&dev->pin_count)); DRM_PROC_PRINT("%d pinned\n", atomic_read(&dev->pin_count));
DRM_PROC_PRINT("%d pin bytes\n", atomic_read (&dev->pin_memory)); DRM_PROC_PRINT("%d pin bytes\n", atomic_read(&dev->pin_memory));
DRM_PROC_PRINT("%d gtt bytes\n", atomic_read (&dev->gtt_memory)); DRM_PROC_PRINT("%d gtt bytes\n", atomic_read(&dev->gtt_memory));
DRM_PROC_PRINT("%d gtt total\n", dev->gtt_total); DRM_PROC_PRINT("%d gtt total\n", dev->gtt_total);
if (len > request + offset) if (len > request + offset)
return request; return request;