From patchwork Wed Dec 11 10:35:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3324111 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE7B1C0D4A for ; Wed, 11 Dec 2013 10:36:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B69C20172 for ; Wed, 11 Dec 2013 10:36:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CCF0920164 for ; Wed, 11 Dec 2013 10:36:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 637DE10579A for ; Wed, 11 Dec 2013 02:36:27 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C55EFB54D for ; Wed, 11 Dec 2013 02:35:33 -0800 (PST) Received: by mail-ea0-f173.google.com with SMTP id o10so2818568eaj.4 for ; Wed, 11 Dec 2013 02:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d19RFP/FfPQd00FiSb0uDz7L4eWPRLVm74maj8N1uxY=; b=hJwBlX2KxZg5oj87ATAyrxoPb3faYkOllBClh22ip8XlgzDWiWMnrLtKoYIcIv4x19 W5qHUSVLZ0CKBLJvaA7oVClOCpUdm9P6n0TFupRlXXoOOA+5CJ0cVXG3oPojfFkDT4Mz bNzSKpHWzK5q6r8JLDCurcnoMEstTJGcvL+QU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d19RFP/FfPQd00FiSb0uDz7L4eWPRLVm74maj8N1uxY=; b=MeoRqJJ2xtnHjuX/wiQM07Wzp3Lp2Tu6z/WkSJn7lFIgd0FN2NyOj7C2xbIQz/LNLr mRrcKL1MQZhPRDD872uSR7Qg0ZwYRCkZKsOeEe8sf2ukIZoqjLKRzgN4loEVLhHan80D MxhpvZvzVaGgzM6mNT19znKZTvgtzuCK6ok4S3VS8k5t294jjAN7RRJDvf4OFydvzVOE vdQZiKDOs+P8ClaevNTOvaaFxLVLM+rqRyE9HkrH6XtBWsvJmJBWhDPZ42CHH7yM3hlX 2KVXK9V4k64KgOadtecbT6YBnrN1dKzprNMNpa8qWGLlUlKOeiReefBtNtb5e4OdgOh8 7mhw== X-Gm-Message-State: ALoCoQmJBiNY5zROKVTQefcmexCa4knUgb7qFX/CNdKQxfXmyDYLja7EkUqYN4wTwc8N7jEPLt3G X-Received: by 10.14.93.197 with SMTP id l45mr883092eef.53.1386758133305; Wed, 11 Dec 2013 02:35:33 -0800 (PST) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id b41sm51932269eef.16.2013.12.11.02.35.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Dec 2013 02:35:32 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 48/50] drm: Kill file_priv->ioctl_count tracking Date: Wed, 11 Dec 2013 11:35:09 +0100 Message-Id: <1386758111-3446-49-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1386758111-3446-1-git-send-email-daniel.vetter@ffwll.ch> References: <1386758111-3446-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's racy, and it's only used in debugfs. There are simpler ways to know whether something is going on (like looking at dmesg with full debugging enabled). And they're all much more useful. So let's just rip this out. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 2 -- drivers/gpu/drm/drm_fops.c | 1 - drivers/gpu/drm/drm_info.c | 6 +++--- include/drm/drmP.h | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 9fd4dd476d33..345be03c23db 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -315,8 +315,6 @@ long drm_ioctl(struct file *filp, if (drm_device_is_unplugged(dev)) return -ENODEV; - ++file_priv->ioctl_count; - if ((nr >= DRM_CORE_IOCTL_COUNT) && ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END))) goto err_i1; diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 97ebc828de5b..330f3dd8e9d0 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c @@ -232,7 +232,6 @@ static int drm_open_helper(struct inode *inode, struct file *filp, goto out_put_pid; } - priv->ioctl_count = 0; /* for compatibility root is always authenticated */ priv->always_authenticated = capable(CAP_SYS_ADMIN); priv->authenticated = priv->always_authenticated; diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index 2cafa3f16cd3..9337f8e210f8 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c @@ -184,14 +184,14 @@ int drm_clients_info(struct seq_file *m, void *data) struct drm_file *priv; mutex_lock(&dev->struct_mutex); - seq_printf(m, "a dev pid uid magic ioctls\n\n"); + seq_printf(m, "a dev pid uid magic\n\n"); list_for_each_entry(priv, &dev->filelist, lhead) { - seq_printf(m, "%c %3d %5d %5d %10u %10lu\n", + seq_printf(m, "%c %3d %5d %5d %10u\n", priv->authenticated ? 'y' : 'n', priv->minor->index, pid_vnr(priv->pid), from_kuid_munged(seq_user_ns(m), priv->uid), - priv->magic, priv->ioctl_count); + priv->magic); } mutex_unlock(&dev->struct_mutex); return 0; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 2644ba1564eb..a61d09b857a5 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -416,7 +416,6 @@ struct drm_file { struct pid *pid; kuid_t uid; drm_magic_t magic; - unsigned long ioctl_count; struct list_head lhead; struct drm_minor *minor; unsigned long lock_count;