From patchwork Wed Aug 3 18:04:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 9261689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C40AE60754 for ; Wed, 3 Aug 2016 18:05:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B934428236 for ; Wed, 3 Aug 2016 18:05:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADD5628306; Wed, 3 Aug 2016 18:05:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63AE328236 for ; Wed, 3 Aug 2016 18:05:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A7106E897; Wed, 3 Aug 2016 18:05:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB7C96E894 for ; Wed, 3 Aug 2016 18:04:57 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id o80so37486273wme.0 for ; Wed, 03 Aug 2016 11:04:57 -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:in-reply-to:references; bh=AKkHbm8mfgBsaZue5jJkgiyLb3kOLlLsZkSq0Db2kqc=; b=wKE8Q6xX5yZBrPjyP10d5ijZwsWk4HkBQ/jP6FW4aVtr/k17O1/bvL6ErZCYRdxUwx QioDZAhix297NxGhqUPc22N/WJJ6tS5MzC16CmijnP2rSvyu0HHZHyZX9HKGIaYckOij qmIwzV93dOJMFjEoNd8qhpUzv2a0r8zHk/RC5coUpBHTv5eDgu0YfNgAJURpuqP0rlPM VeBnYFI9HZGy+8qOQNBDeJZ8hif5hQ9lqly3NR9+nzc5tp9BOuITzu2TGaGJloPvINzh lRBlQWO4K34B0kemb41p4/Cqania84gpIIu/xqpNXolu8sW46W+E1dH33zJTWP0m9xTx Q/qw== 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=AKkHbm8mfgBsaZue5jJkgiyLb3kOLlLsZkSq0Db2kqc=; b=RBtw+/JsNKKS9pMXBWirY66g7mmYJPSJeXGGKSuaJj4NVf0skRXZZNGylLyGuekYbn heErpBITJ8hsjnYeW8fVArPnYOkJQUYF4Vmdeerxd3PfsSZOPXi1mhf5QbcJINmUEePj +jAPpshzHl9rwo9giVKDxwemdPygaAryd+BKlL0QzuMQ4Jt1EKU5hpB4JoxLgu43i1mq jeCa6yrANJ4DHJoSWG9wBlaGme3jPSa3J60W5iL7fluG+jRz4b+Y4T2bq2qr+PpjJxbU BzZ0uEnv22PdXX6VFI3UJi5KyY0Zlnu5vRUIEM3Zpv2AffnIPjCFDCcZBiFAaCGIEigG /pwg== X-Gm-Message-State: AEkoouvzwPWF9t4ipJcL65EvmTJAR+GbOjNyoQv+FKwT1xnEgew3KRwB6OVKcnXvWRL9iQ== X-Received: by 10.194.21.200 with SMTP id x8mr69335827wje.129.1470247495315; Wed, 03 Aug 2016 11:04:55 -0700 (PDT) Received: from localhost.localdomain ([37.120.18.65]) by smtp.gmail.com with ESMTPSA id va3sm8854296wjb.18.2016.08.03.11.04.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 11:04:54 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/8] drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY Date: Wed, 3 Aug 2016 20:04:25 +0200 Message-Id: <20160803180432.1341-2-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160803180432.1341-1-dh.herrmann@gmail.com> References: <20160803180432.1341-1-dh.herrmann@gmail.com> 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-Virus-Scanned: ClamAV using ClamSMTP The minor referred to by "DRM_MINOR_LEGACY" is called 'dev->primary' and gets 'cardX' as name assigned. Lets reduce this magnificent number of names for the same concept by one and rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY (to match the actual struct-member name). Furthermore, this is in no way a legacy node, so lets not call it that. Signed-off-by: David Herrmann Reviewed-by: Frank Binns --- drivers/gpu/drm/drm_drv.c | 14 +++++++------- include/drm/drmP.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index be27ed3..57ce973 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -112,7 +112,7 @@ static struct drm_minor **drm_minor_get_slot(struct drm_device *dev, unsigned int type) { switch (type) { - case DRM_MINOR_LEGACY: + case DRM_MINOR_PRIMARY: return &dev->primary; case DRM_MINOR_RENDER: return &dev->render; @@ -512,7 +512,7 @@ int drm_dev_init(struct drm_device *dev, goto err_minors; } - ret = drm_minor_alloc(dev, DRM_MINOR_LEGACY); + ret = drm_minor_alloc(dev, DRM_MINOR_PRIMARY); if (ret) goto err_minors; @@ -545,7 +545,7 @@ err_ctxbitmap: drm_legacy_ctxbitmap_cleanup(dev); drm_ht_remove(&dev->map_hash); err_minors: - drm_minor_free(dev, DRM_MINOR_LEGACY); + drm_minor_free(dev, DRM_MINOR_PRIMARY); drm_minor_free(dev, DRM_MINOR_RENDER); drm_minor_free(dev, DRM_MINOR_CONTROL); drm_fs_inode_free(dev->anon_inode); @@ -608,7 +608,7 @@ static void drm_dev_release(struct kref *ref) drm_ht_remove(&dev->map_hash); drm_fs_inode_free(dev->anon_inode); - drm_minor_free(dev, DRM_MINOR_LEGACY); + drm_minor_free(dev, DRM_MINOR_PRIMARY); drm_minor_free(dev, DRM_MINOR_RENDER); drm_minor_free(dev, DRM_MINOR_CONTROL); @@ -684,7 +684,7 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) if (ret) goto err_minors; - ret = drm_minor_register(dev, DRM_MINOR_LEGACY); + ret = drm_minor_register(dev, DRM_MINOR_PRIMARY); if (ret) goto err_minors; @@ -701,7 +701,7 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) goto out_unlock; err_minors: - drm_minor_unregister(dev, DRM_MINOR_LEGACY); + drm_minor_unregister(dev, DRM_MINOR_PRIMARY); drm_minor_unregister(dev, DRM_MINOR_RENDER); drm_minor_unregister(dev, DRM_MINOR_CONTROL); out_unlock: @@ -741,7 +741,7 @@ void drm_dev_unregister(struct drm_device *dev) list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head) drm_legacy_rmmap(dev, r_list->map); - drm_minor_unregister(dev, DRM_MINOR_LEGACY); + drm_minor_unregister(dev, DRM_MINOR_PRIMARY); drm_minor_unregister(dev, DRM_MINOR_RENDER); drm_minor_unregister(dev, DRM_MINOR_CONTROL); } diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d377865..d488a72 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -642,7 +642,7 @@ struct drm_driver { }; enum drm_minor_type { - DRM_MINOR_LEGACY, + DRM_MINOR_PRIMARY, DRM_MINOR_CONTROL, DRM_MINOR_RENDER, DRM_MINOR_CNT, @@ -856,7 +856,7 @@ static inline bool drm_is_control_client(const struct drm_file *file_priv) static inline bool drm_is_primary_client(const struct drm_file *file_priv) { - return file_priv->minor->type == DRM_MINOR_LEGACY; + return file_priv->minor->type == DRM_MINOR_PRIMARY; } /******************************************************************/