From patchwork Tue Sep 10 22:36:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 2868181 Return-Path: X-Original-To: patchwork-intel-gfx@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 E20E09F485 for ; Tue, 10 Sep 2013 23:16:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23A44203DA for ; Tue, 10 Sep 2013 23:16:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 568AF20357 for ; Tue, 10 Sep 2013 23:16:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57363E64A5 for ; Tue, 10 Sep 2013 16:16:01 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ye0-f182.google.com (mail-ye0-f182.google.com [209.85.213.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C54AE76F6 for ; Tue, 10 Sep 2013 15:37:29 -0700 (PDT) Received: by mail-ye0-f182.google.com with SMTP id l10so2345605yen.27 for ; Tue, 10 Sep 2013 15:37:29 -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=SHdO9ZS+wN2JSl7xvITYfvmNFfNrPHW89r3+1eBacl8=; b=FGx66qXK7iZABSbSYPijd00b9/Anov+9+8LHyP/k04JBHlhbRpcObFf1CbQBswFtzS KQyiChuyPrng/cY50Oj4dx/Yt8yLZ1YekfGYQJbo4ZkvdUjtsV5NdTcV+x+PWXkOEz8H ri3txEkgbFUhCbps+X+zQhrqzsBFyGXbTkrHGKzNsHKS3Da106d0+ryJDjASH5yHnVBK zhatEu2cYNb07QSrrq6A/5g5Td0l6kE9X2dws30qp7PJmOAmFcLdwZsX2B6v0ZY3IqnJ gMFXbBqxr3uolfWjRicWC/scUQJvy2ZdHk1nUq3ge7RFtn2pDwKa0JLwWu57TlbYafHj IrCQ== X-Received: by 10.236.60.70 with SMTP id t46mr125632yhc.117.1378852649051; Tue, 10 Sep 2013 15:37:29 -0700 (PDT) Received: from localhost.localdomain ([186.204.164.107]) by mx.google.com with ESMTPSA id v22sm27925176yhn.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Sep 2013 15:37:28 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Sep 2013 19:36:45 -0300 Message-Id: <1378852608-30281-17-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1378852608-30281-1-git-send-email-rodrigo.vivi@gmail.com> References: <1378852608-30281-1-git-send-email-rodrigo.vivi@gmail.com> Cc: Ben Widawsky , Ben Widawsky Subject: [Intel-gfx] [PATCH 16/19] drm/i915: Fix l3 parity buffer offset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.7 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: Ben Widawsky The buf pointer used during l3_write is just char *, therefore it does not require the silly /4. Signed-off-by: Ben Widawsky Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_sysfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index 05195c0..70de7a9 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -184,9 +184,7 @@ i915_l3_write(struct file *filp, struct kobject *kobj, if (temp) dev_priv->l3_parity.remap_info = temp; - memcpy(dev_priv->l3_parity.remap_info + (offset/4), - buf + (offset/4), - count); + memcpy(dev_priv->l3_parity.remap_info + (offset/4), buf, count); i915_gem_l3_remap(drm_dev);