From: Linus Torvalds Date: Mon, 20 Oct 2008 21:14:25 +0000 (-0700) Subject: Fix sprintf format warnings in drm_proc.c X-Git-Tag: MMI-PSA29.97-13-9~31176 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1ae87786800b5e0411847974b211797b6ada63c4;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Fix sprintf format warnings in drm_proc.c Use "%zd" for size_t, and make sure to have a space between the numbers instead of depending on the field width. I don't like warnings in my default targeted build. Signed-off-by: Linus Torvalds --- diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index d490db4c0de0..ae73b7f7249a 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c @@ -522,12 +522,12 @@ static int drm_gem_one_name_info(int id, void *ptr, void *data) struct drm_gem_object *obj = ptr; struct drm_gem_name_info_data *nid = data; - DRM_INFO("name %d size %d\n", obj->name, obj->size); + DRM_INFO("name %d size %zd\n", obj->name, obj->size); if (nid->eof) return 0; nid->len += sprintf(&nid->buf[nid->len], - "%6d%9d%8d%9d\n", + "%6d %8zd %7d %8d\n", obj->name, obj->size, atomic_read(&obj->handlecount.refcount), atomic_read(&obj->refcount.refcount));