From patchwork Fri Aug 29 10:12:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 4809851 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 902309F37E for ; Fri, 29 Aug 2014 10:13:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C54B220127 for ; Fri, 29 Aug 2014 10:13:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D3A8020123 for ; Fri, 29 Aug 2014 10:13:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDF506E2AF; Fri, 29 Aug 2014 03:13:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 09C3B6E2AF for ; Fri, 29 Aug 2014 03:13:30 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hi2so8798168wib.16 for ; Fri, 29 Aug 2014 03:13:30 -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=6CLneeDZUSru9LlhLymDseevoSztIHMyMciaWmz67qU=; b=tMbGLqSn0BAjvEa+o7REf/sBSs+tgdeo5lCdJmTxm2IlVXveexgRAup56FXsB/WU/h RJkmMo6rJsA1F3ZWnXxuFvibvAvHMQclru0q3JylWwl80X3BGHKu74e0VmbFpdERrj+4 h+EK20OBq7tYLaiz0kIdeXGuUwxEAXhk9RO6WPtm4gEZfWxX7EwtMUqcIMyQvPIb1rMC HxvGzb95Gbj/ytZp4AwntcO1/noEWmQQyoTx6oUUw9B+jwcAUJ3eh+33TKOsLYFxZHLr ILiBj5sEHNjdiZyD7xelxJOHN2x9Yd9ftCauX/PRAIfbGn1O+BMivtSNTk63ZuUm4YnT GUYg== X-Received: by 10.194.90.233 with SMTP id bz9mr12546662wjb.94.1409307210258; Fri, 29 Aug 2014 03:13:30 -0700 (PDT) Received: from david-tp.localdomain (stgt-4d02e0c1.pool.mediaWays.net. [77.2.224.193]) by mx.google.com with ESMTPSA id la2sm17479347wjb.5.2014.08.29.03.13.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Aug 2014 03:13:29 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/20] drm: replace weird conditional includes Date: Fri, 29 Aug 2014 12:12:33 +0200 Message-Id: <1409307166-12396-8-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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, 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 pte_wrprotect() is only used by drm_vm.c, so move the include there. Also include it unconditionally, all architectures provide this header! Furthermore, replace asm/current.h with sched.h, which includes asm/current.h unconditionally. This way we get the same effect and avoid direct asm/ includes. Furthermore, drop the weird __alpha__ protection. It's safe to include sched.h everywhere (and the wait.h comment doesn't apply, anyway). Signed-off-by: David Herrmann Reviewed-by: Thierry Reding --- drivers/gpu/drm/drm_vm.c | 1 + include/drm/drmP.h | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index be25174..967e570 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include #include "drm_legacy.h" struct drm_vma_entry { diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7a3c73c..31fb300 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -36,12 +36,7 @@ #define _DRM_P_H_ #ifdef __KERNEL__ -#ifdef __alpha__ -/* add include of current.h so that "current" is defined - * before static inline funcs in wait.h. Doing this so we - * can build the DRM (part of PI DRI). 4/21/2000 S + B */ -#include -#endif /* __alpha__ */ +#include #include #include #include @@ -58,9 +53,6 @@ #include #include #include -#if defined(__alpha__) || defined(__powerpc__) -#include /* For pte_wrprotect */ -#endif #include #include #include