diff options
author | Andres Salomon <dilinger@collabora.co.uk> | 2009-11-17 17:41:23 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-11-17 19:02:49 -0500 |
commit | 156822f7175d9ceb9d7e808502d3c5de8841e047 (patch) | |
tree | 1eb79f8e11c1ce4710dcdd83210d1acb5cd95b39 /include/drm | |
parent | 420a457088669e055e767dfb8468909cd1799cf9 (diff) |
drm: kill more unused DRM macros
There are a few more macros in drmP.h that are unused; DRM_GET_PRIV_SAREA,
DRM_ARRAY_SIZE, and DRM_WAITCOUNT can go away completely.
Unfortunately, DRM_COPY is still used in one place, but we can at least
move it to where it's used. It's an awful looking macro..
[akpm: fix overeagerness]
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4977fa9038d9..1b72a526ba64 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -255,19 +255,8 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
255 | 255 | ||
256 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) | 256 | #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1)) |
257 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) | 257 | #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) |
258 | #define DRM_WAITCOUNT(dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist) | ||
259 | 258 | ||
260 | #define DRM_IF_VERSION(maj, min) (maj << 16 | min) | 259 | #define DRM_IF_VERSION(maj, min) (maj << 16 | min) |
261 | /** | ||
262 | * Get the private SAREA mapping. | ||
263 | * | ||
264 | * \param _dev DRM device. | ||
265 | * \param _ctx context number. | ||
266 | * \param _map output mapping. | ||
267 | */ | ||
268 | #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do { \ | ||
269 | (_map) = (_dev)->context_sareas[_ctx]; \ | ||
270 | } while(0) | ||
271 | 260 | ||
272 | /** | 261 | /** |
273 | * Test that the hardware lock is held by the caller, returning otherwise. | 262 | * Test that the hardware lock is held by the caller, returning otherwise. |
@@ -287,18 +276,6 @@ do { \ | |||
287 | } while (0) | 276 | } while (0) |
288 | 277 | ||
289 | /** | 278 | /** |
290 | * Copy and IOCTL return string to user space | ||
291 | */ | ||
292 | #define DRM_COPY( name, value ) \ | ||
293 | len = strlen( value ); \ | ||
294 | if ( len > name##_len ) len = name##_len; \ | ||
295 | name##_len = strlen( value ); \ | ||
296 | if ( len && name ) { \ | ||
297 | if ( copy_to_user( name, value, len ) ) \ | ||
298 | return -EFAULT; \ | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * Ioctl function type. | 279 | * Ioctl function type. |
303 | * | 280 | * |
304 | * \param inode device inode. | 281 | * \param inode device inode. |