From patchwork Fri Feb 21 07:55:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 3694951 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 A11CDBF40C for ; Fri, 21 Feb 2014 07:56:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC58C20142 for ; Fri, 21 Feb 2014 07:56:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 14FA220149 for ; Fri, 21 Feb 2014 07:56:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0C11FB436; Thu, 20 Feb 2014 23:55:55 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by gabe.freedesktop.org (Postfix) with ESMTP id C41C5FB426 for ; Thu, 20 Feb 2014 23:55:49 -0800 (PST) Received: by mail-bk0-f44.google.com with SMTP id r7so945433bkg.3 for ; Thu, 20 Feb 2014 23:55:48 -0800 (PST) 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=CtY8gvvPPcCONPWOVJbXyR06TrzksNFD+869qLrBg4k=; b=GnZZmjiwRjtv5bXR11wzKIdh0/aZK45/FbazLXAEMMagrseeuN1/EAHysrGMkHGuVt H38LbQezdfmyl7clbwgtI3rRlDUvfrJ1QEW9l9CpU/1QKp1dg3KX/IEuyfzyCQJlD60G k3QI5a/8Oc16Crs7aOqcTcJfRr5NTJ3GCli1biSsdxqzJ4jNbxYfRrygvXKL7TZJYEuO J0HUZX79PQP1H6JiDYmsJLArwdbGgPw32VgdLNQF0yxoCMVsSLSf47esNRDPjEE5tgKN tIuga8fj+5Z+5Z1WFl16BVSuEPTXhB5PbNYQw+TtPCA9lPNkflXQb9Mdy34WjdQn9owz oBSA== X-Received: by 10.204.72.130 with SMTP id m2mr1559029bkj.137.1392969348714; Thu, 20 Feb 2014 23:55:48 -0800 (PST) Received: from localhost (port-15573.pppoe.wtnet.de. [84.46.61.18]) by mx.google.com with ESMTPSA id v12sm5891027bko.17.2014.02.20.23.55.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2014 23:55:48 -0800 (PST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [RFC 11/12] drm/i915: Remove dead code Date: Fri, 21 Feb 2014 08:55:27 +0100 Message-Id: <1392969328-23133-12-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1392969328-23133-1-git-send-email-thierry.reding@gmail.com> References: <1392969328-23133-1-git-send-email-thierry.reding@gmail.com> 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=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 From: Thierry Reding The i915 driver sets DRIVER_GEM unconditionally, so testing for the feature will always fail. Signed-off-by: Thierry Reding --- drivers/gpu/drm/i915/i915_gem_context.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index e9bba3c29ec6..da74522f377d 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -746,9 +746,6 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data, struct i915_hw_context *ctx; int ret; - if (!drm_core_check_feature(dev, DRIVER_GEM)) - return -ENODEV; - if (!HAS_HW_CONTEXTS(dev)) return -ENODEV; @@ -775,9 +772,6 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data, struct i915_hw_context *ctx; int ret; - if (!drm_core_check_feature(dev, DRIVER_GEM)) - return -ENODEV; - if (args->ctx_id == DEFAULT_CONTEXT_ID) return -ENOENT;