Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbbKZOva (ORCPT ); Thu, 26 Nov 2015 09:51:30 -0500 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]:56591 "EHLO smtp-outbound-2.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbbKZOv1 (ORCPT ); Thu, 26 Nov 2015 09:51:27 -0500 Subject: Re: [PATCH 2/7] drm/vmwgfx: fix a problematic usage of WARN_ON() To: Geliang Tang , David Airlie , Sinclair Yeh , Charmaine Lee References: <86c73f180d3054c1bf17bdac8c89026209167c9b.1448456395.git.geliangtang@163.com> <8bb789c0803579a01e1ee977ed67408c422acd79.1448456395.git.geliangtang@163.com> CC: , From: Thomas Hellstrom Message-ID: <56571C6A.1030606@vmware.com> Date: Thu, 26 Nov 2015 15:51:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <8bb789c0803579a01e1ee977ed67408c422acd79.1448456395.git.geliangtang@163.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1270 Lines: 36 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/