From patchwork Wed Mar 5 05:01:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kurtz X-Patchwork-Id: 3770591 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 5AB26BF13A for ; Wed, 5 Mar 2014 05:02:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D21320221 for ; Wed, 5 Mar 2014 05:02:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C34C520218 for ; Wed, 5 Mar 2014 05:02:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84452FA2DE; Tue, 4 Mar 2014 21:02:28 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 37D23FA2DF for ; Tue, 4 Mar 2014 21:02:09 -0800 (PST) Received: by mail-pa0-f44.google.com with SMTP id bj1so577798pad.3 for ; Tue, 04 Mar 2014 21:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P2Nv8JU1hywOErrIVQRZcKOBmN+HgKnsC+GPF0ATYrU=; b=bT0F/cVdlR7SKIY7cakhdtVcDMFYLziOkMFcWT5H5Yc1VHgfMK4dUXJt34AnK4y0+t q7+lGFgHbPXbHibTpKaR1LSAIL0uvyiLmpR1RfzVLe3cj8w1kmEHs5zAnVPhzII8/3pf pVUGGkjS+p/f80UCauqmeHNGH4RQ5cJIA17vs= 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=P2Nv8JU1hywOErrIVQRZcKOBmN+HgKnsC+GPF0ATYrU=; b=A/8gqFewkUHqAQJYKT6EVryAt5OOlGAJv9XSPV3svGnB00IVhPUq/xDaP9wfwoh6pI ZjU+4nP/nOUv9ELkAK0wMAZdG/1e/igEslygjVhUjfedc4GMkIvx9B9b5IbYcPG0V90d ZHZOpj/sfn55N1DlvjYl96tlgk8fk+GO2KQE6AOR4ocOupXYVUvMx7cVDjOtY5b/oJGY BVS/Kha3+LFNAhqCdr9j70grmb5AQ2bB2reGEg22Xu8A/2FbCl2VjGEeFnvn4Gn+j0QC BIuKLtyhpPNhssVcZpcIXVIBD5Ri3YsN0y+mrF+7DFWxgQYX8JOT+F2QyvjaHcUPkAdT OzeQ== X-Gm-Message-State: ALoCoQmupJIl1Sy4UPL0Y1WuPcKcoV7nb1qf4dGUzUqAqONQ+Ww0ucEWd7dI0b9qZoOfpLIFZwwS X-Received: by 10.67.23.135 with SMTP id ia7mr4188815pad.5.1393995728962; Tue, 04 Mar 2014 21:02:08 -0800 (PST) Received: from djkurtzt530-glaptop.corp.google.com ([216.239.55.197]) by mx.google.com with ESMTPSA id ac5sm3266130pbc.37.2014.03.04.21.02.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 21:02:08 -0800 (PST) From: Daniel Kurtz To: dri-devel@lists.freedesktop.org, Inki Dae Subject: [PATCH 6/8] drmOpenByName: remove redundant drmAvailable check Date: Tue, 4 Mar 2014 21:01:42 -0800 Message-Id: <1393995704-29184-7-git-send-email-djkurtz@chromium.org> X-Mailer: git-send-email 1.9.0.rc1.175.g0b1dcb5 In-Reply-To: <1393995704-29184-1-git-send-email-djkurtz@chromium.org> References: <1393995704-29184-1-git-send-email-djkurtz@chromium.org> Cc: Kyungmin Park 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.1 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 drmOpenByName() is a static function that is only called by drmOpen(). drmOpen() already checks drmAvailable(), so the checki in drmOpenByName() is redundant. Signed-off-by: Daniel Kurtz --- xf86drm.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index 720952f..118022c 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -537,19 +537,6 @@ static int drmOpenByName(const char *name) int fd; drmVersionPtr version; char * id; - - if (!drmAvailable()) { - if (!drm_server_info) { - return -1; - } - else { - /* try to load the kernel module now */ - if (!drm_server_info->load_module(name)) { - drmMsg("[drm] failed to load kernel module \"%s\"\n", name); - return -1; - } - } - } /* * Open the first minor number that matches the driver name and isn't