From patchwork Tue Oct 29 08:55:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 3106841 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 367719F2B7 for ; Tue, 29 Oct 2013 08:56:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17C202016A for ; Tue, 29 Oct 2013 08:56:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 800B1201CD for ; Tue, 29 Oct 2013 08:56:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14F57EEA12; Tue, 29 Oct 2013 01:56:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from relay.fireflyinternet.com (server109-228-28-164.live-servers.net [109.228.28.164]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C329EEA12 for ; Tue, 29 Oct 2013 01:56:08 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.73.22; Received: from haswell.alporthouse.com (unverified [78.156.73.22]) by relay.fireflyinternet.com (FireflyRelay1) with ESMTP id 9861343-2000100 for multiple; Tue, 29 Oct 2013 08:59:19 +0000 From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm: Compact booleans within struct drm_file Date: Tue, 29 Oct 2013 08:55:58 +0000 Message-Id: <1383036958-20842-2-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1383036958-20842-1-git-send-email-chris@chris-wilson.co.uk> References: <1383036958-20842-1-git-send-email-chris@chris-wilson.co.uk> X-Authenticated-User: chris.alporthouse@surfanytime.net 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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Replace the sparse array of booleans with a bitfield. Signed-off-by: Chris Wilson --- include/drm/drmP.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 3a90857bd0ee..02c685f70a72 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -412,8 +412,12 @@ struct drm_prime_file_private { /** File private data */ struct drm_file { - int always_authenticated; - int authenticated; + unsigned always_authenticated :1; + unsigned authenticated :1; + unsigned is_master :1; /* this file private is a master for a minor */ + /* true when the client has asked us to expose stereo 3D mode flags */ + unsigned stereo_allowed :1; + struct pid *pid; kuid_t uid; drm_magic_t magic; @@ -430,13 +434,8 @@ struct drm_file { struct file *filp; void *driver_priv; - int is_master; /* this file private is a master for a minor */ struct drm_master *master; /* master this node is currently associated with N.B. not always minor->master */ - - /* true when the client has asked us to expose stereo 3D mode flags */ - bool stereo_allowed; - /** * fbs - List of framebuffers associated with this file. *