[PATCH] drm: fix LOCK_TEST_WITH_RETURN macro

From: Roel Kluin
Date: Thu Jan 22 2009 - 10:55:15 EST


fix LOCK_TEST_WITH_RETURN macro:

When this macro isn't called with 'file_priv' this will result in a
build failure.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index afb7858..7437927 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -237,15 +237,15 @@ struct drm_device;
* \param dev DRM device.
* \param filp file pointer of the caller.
*/
-#define LOCK_TEST_WITH_RETURN( dev, file_priv ) \
-do { \
- if (!_DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock) || \
- file_priv->master->lock.file_priv != file_priv) { \
+#define LOCK_TEST_WITH_RETURN( dev, _file_priv ) \
+do { \
+ if (!_DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock) || \
+ _file_priv->master->lock.file_priv != _file_priv) { \
DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
- __func__, _DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock),\
- file_priv->master->lock.file_priv, file_priv); \
- return -EINVAL; \
- } \
+ __func__, _DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock),\
+ _file_priv->master->lock.file_priv, _file_priv); \
+ return -EINVAL; \
+ } \
} while (0)

/**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/