Re: [PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-26 Thread Thomas Hellstrom
Thanks for reporting!

This fix was already reported by Dan Carpenter and has already been
queued in vmwgfx-fixes-4.4

/Thomas


On 11/25/2015 02:12 PM, Geliang Tang wrote:
> WARN_ON() takes a condition rather than a format string. This patch
> converted WARN_ON() to WARN() instead.
>
> Signed-off-by: Geliang Tang 
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> index a8baf5f..b6a0806 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> @@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
> uint32_t bytes,
>   else if (ctx_id == SVGA3D_INVALID_ID)
>   ret = vmw_local_fifo_reserve(dev_priv, bytes);
>   else {
> - WARN_ON("Command buffer has not been allocated.\n");
> + WARN(1, "Command buffer has not been allocated.\n");
>   ret = NULL;
>   }
>   if (IS_ERR_OR_NULL(ret)) {

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


Re: [PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-26 Thread Thomas Hellstrom
Thanks for reporting!

This fix was already reported by Dan Carpenter and has already been
queued in vmwgfx-fixes-4.4

/Thomas


On 11/25/2015 02:12 PM, Geliang Tang wrote:
> WARN_ON() takes a condition rather than a format string. This patch
> converted WARN_ON() to WARN() instead.
>
> Signed-off-by: Geliang Tang 
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> index a8baf5f..b6a0806 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> @@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
> uint32_t bytes,
>   else if (ctx_id == SVGA3D_INVALID_ID)
>   ret = vmw_local_fifo_reserve(dev_priv, bytes);
>   else {
> - WARN_ON("Command buffer has not been allocated.\n");
> + WARN(1, "Command buffer has not been allocated.\n");
>   ret = NULL;
>   }
>   if (IS_ERR_OR_NULL(ret)) {

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


Re: [PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-25 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh 

On Wed, Nov 25, 2015 at 09:12:15PM +0800, Geliang Tang wrote:
> WARN_ON() takes a condition rather than a format string. This patch
> converted WARN_ON() to WARN() instead.
> 
> Signed-off-by: Geliang Tang 
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> index a8baf5f..b6a0806 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> @@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
> uint32_t bytes,
>   else if (ctx_id == SVGA3D_INVALID_ID)
>   ret = vmw_local_fifo_reserve(dev_priv, bytes);
>   else {
> - WARN_ON("Command buffer has not been allocated.\n");
> + WARN(1, "Command buffer has not been allocated.\n");
>   ret = NULL;
>   }
>   if (IS_ERR_OR_NULL(ret)) {
> -- 
> 2.5.0
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-25 Thread Geliang Tang
WARN_ON() takes a condition rather than a format string. This patch
converted WARN_ON() to WARN() instead.

Signed-off-by: Geliang Tang 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index a8baf5f..b6a0806 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
uint32_t bytes,
else if (ctx_id == SVGA3D_INVALID_ID)
ret = vmw_local_fifo_reserve(dev_priv, bytes);
else {
-   WARN_ON("Command buffer has not been allocated.\n");
+   WARN(1, "Command buffer has not been allocated.\n");
ret = NULL;
}
if (IS_ERR_OR_NULL(ret)) {
-- 
2.5.0


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


Re: [PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-25 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh 

On Wed, Nov 25, 2015 at 09:12:15PM +0800, Geliang Tang wrote:
> WARN_ON() takes a condition rather than a format string. This patch
> converted WARN_ON() to WARN() instead.
> 
> Signed-off-by: Geliang Tang 
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> index a8baf5f..b6a0806 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> @@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
> uint32_t bytes,
>   else if (ctx_id == SVGA3D_INVALID_ID)
>   ret = vmw_local_fifo_reserve(dev_priv, bytes);
>   else {
> - WARN_ON("Command buffer has not been allocated.\n");
> + WARN(1, "Command buffer has not been allocated.\n");
>   ret = NULL;
>   }
>   if (IS_ERR_OR_NULL(ret)) {
> -- 
> 2.5.0
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON()

2015-11-25 Thread Geliang Tang
WARN_ON() takes a condition rather than a format string. This patch
converted WARN_ON() to WARN() instead.

Signed-off-by: Geliang Tang 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index a8baf5f..b6a0806 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -390,7 +390,7 @@ void *vmw_fifo_reserve_dx(struct vmw_private *dev_priv, 
uint32_t bytes,
else if (ctx_id == SVGA3D_INVALID_ID)
ret = vmw_local_fifo_reserve(dev_priv, bytes);
else {
-   WARN_ON("Command buffer has not been allocated.\n");
+   WARN(1, "Command buffer has not been allocated.\n");
ret = NULL;
}
if (IS_ERR_OR_NULL(ret)) {
-- 
2.5.0


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