From patchwork Mon May 4 14:05:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 6326941 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A23FC9F32B for ; Mon, 4 May 2015 14:05:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDFD420320 for ; Mon, 4 May 2015 14:05:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D0104202AE for ; Mon, 4 May 2015 14:05:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 180336E3D5; Mon, 4 May 2015 07:05:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by gabe.freedesktop.org (Postfix) with ESMTP id DB6DE6E3D3 for ; Mon, 4 May 2015 07:05:38 -0700 (PDT) Received: by wicmx19 with SMTP id mx19so78240983wic.1 for ; Mon, 04 May 2015 07:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=J8qRBN0QIdrHOEsAIMvNfyHe3qd/ith9gx7X8cgbevY=; b=oJEqHpjLZZ/yntRtq8U+9g/Vy+80GUP2+4SGQE64u/X3Nj/oZxMJtBsUvPnL3YlAnA eH5MJPEfzpezlf7jIaHi7bdoAq7qGUpgju/Gh9zl1FIXoR4SyULfvQFaWDWyeICPCM/7 hU58cuwsJEaxK8Oj3caRQX3XY8LKB6xoquzUZFG+IB96dflnMtkjOg0wXNS/AJQydpyM fMLZxk7+yYc5hvj7f8T9EUkUSIY8t8K22HJlEkDkC2mSspm6i5c2BckSygwrDGI1Hrww wBVxmsnyKnZm/dE83I9Ha5BZ0UaX7SXR1jQLtcMSMdQxSVgNNaMOEKdockw6JYbbQyQu 70WQ== X-Received: by 10.194.87.1 with SMTP id t1mr10530220wjz.96.1430748338098; Mon, 04 May 2015 07:05:38 -0700 (PDT) Received: from david-t2.fritz.box ([37.120.123.242]) by mx.google.com with ESMTPSA id 9sm10665649wjr.11.2015.05.04.07.05.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 May 2015 07:05:37 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm: drop unused 'magicfree' list Date: Mon, 4 May 2015 16:05:12 +0200 Message-Id: <1430748314-862-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.3.7 Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 This list is write-only. It's never used for read-access, so no reason to keep it around. Drop it! Signed-off-by: David Herrmann Reviewed-by: Chris Wilson --- drivers/gpu/drm/drm_auth.c | 3 --- drivers/gpu/drm/drm_drv.c | 1 - include/drm/drmP.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index fc8e8aa..8a37524 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -37,7 +37,6 @@ #include "drm_internal.h" struct drm_magic_entry { - struct list_head head; struct drm_hash_item hash_item; struct drm_file *priv; }; @@ -93,7 +92,6 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv, entry->hash_item.key = (unsigned long)magic; mutex_lock(&dev->struct_mutex); drm_ht_insert_item(&master->magiclist, &entry->hash_item); - list_add_tail(&entry->head, &master->magicfree); mutex_unlock(&dev->struct_mutex); return 0; @@ -123,7 +121,6 @@ int drm_remove_magic(struct drm_master *master, drm_magic_t magic) } pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item); drm_ht_remove_item(&master->magiclist, hash); - list_del(&pt->head); mutex_unlock(&dev->struct_mutex); kfree(pt); diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 48f7359..26ed9fe 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -109,7 +109,6 @@ struct drm_master *drm_master_create(struct drm_minor *minor) kfree(master); return NULL; } - INIT_LIST_HEAD(&master->magicfree); master->minor = minor; return master; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 62c40777..80be07a 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -356,7 +356,6 @@ struct drm_lock_data { * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex. * @unique_len: Length of unique field. Protected by drm_global_mutex. * @magiclist: Hash of used authentication tokens. Protected by struct_mutex. - * @magicfree: List of used authentication tokens. Protected by struct_mutex. * @lock: DRI lock information. * @driver_priv: Pointer to driver-private information. */ @@ -366,7 +365,6 @@ struct drm_master { char *unique; int unique_len; struct drm_open_hash magiclist; - struct list_head magicfree; struct drm_lock_data lock; void *driver_priv; };