From patchwork Wed May 22 15:04:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10956101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E5A36C5 for ; Wed, 22 May 2019 15:04:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F89328B47 for ; Wed, 22 May 2019 15:04:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 241A128B95; Wed, 22 May 2019 15:04:20 +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=-5.2 required=2.0 tests=BAYES_00,HK_RANDOM_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB9E528B47 for ; Wed, 22 May 2019 15:04:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38F7F89B4D; Wed, 22 May 2019 15:04:19 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id A45A089015; Wed, 22 May 2019 15:04:17 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 08:04:17 -0700 X-ExtLoop1: 1 Received: from dmironox-mobl5.ccr.corp.intel.com (HELO localhost.localdomain) ([10.252.20.122]) by orsmga006.jf.intel.com with ESMTP; 22 May 2019 08:04:15 -0700 From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Wed, 22 May 2019 16:04:13 +0100 Message-Id: <20190522150413.27697-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib/i915: Fix pointer cast build issue X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Use from_user_pointer when casting __u64 to a pointer. Signed-off-by: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Chris Wilson Reviewed-by: Andi Shyti --- lib/i915/gem_engine_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c index dd26fae00853..7ca3616687b9 100644 --- a/lib/i915/gem_engine_topology.c +++ b/lib/i915/gem_engine_topology.c @@ -81,7 +81,7 @@ static void ctx_map_engines(int fd, struct intel_engine_data *ed, struct drm_i915_gem_context_param *param) { struct i915_context_param_engines *engines = - (struct i915_context_param_engines *) param->value; + from_user_pointer(param->value); int i = 0; for (typeof(engines->engines[0]) *p =