Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751665AbdILRfi (ORCPT ); Tue, 12 Sep 2017 13:35:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47540 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbdILRff (ORCPT ); Tue, 12 Sep 2017 13:35:35 -0400 From: Colin King To: VMware Graphics , Sinclair Yeh , Thomas Hellstrom , David Airlie , dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/vmwgfx: remove DRM_ERROR message, stops log spamming Date: Tue, 12 Sep 2017 18:35:30 +0100 Message-Id: <20170912173530.14132-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 30 From: Colin Ian King mmap'ing the device multiple times will spam the kernel log with the DRM_ERROR message about illegal mmap'ing the old fifo space. Since the mmap'ing will fail with an -EINVAL there is no need to emit this message, so just remove it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c index e771091d2cd3..1e633c602fb1 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c @@ -33,10 +33,8 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma) struct drm_file *file_priv; struct vmw_private *dev_priv; - if (unlikely(vma->vm_pgoff < VMWGFX_FILE_PAGE_OFFSET)) { - DRM_ERROR("Illegal attempt to mmap old fifo space.\n"); + if (unlikely(vma->vm_pgoff < VMWGFX_FILE_PAGE_OFFSET)) return -EINVAL; - } file_priv = filp->private_data; dev_priv = vmw_priv(file_priv->minor->dev); -- 2.14.1