From patchwork Tue Jan 3 11:05:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9494719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97C2D60405 for ; Tue, 3 Jan 2017 11:05:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B8D5268AE for ; Tue, 3 Jan 2017 11:05:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6070C26BE9; Tue, 3 Jan 2017 11:05:52 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 D2138268AE for ; Tue, 3 Jan 2017 11:05:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A9926E092; Tue, 3 Jan 2017 11:05:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x243.google.com (mail-wj0-x243.google.com [IPv6:2a00:1450:400c:c01::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19A8B6E092; Tue, 3 Jan 2017 11:05:39 +0000 (UTC) Received: by mail-wj0-x243.google.com with SMTP id j10so71538761wjb.3; Tue, 03 Jan 2017 03:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=U9yDr8jO+aS+azMDJb68tShVjR2ongdOo6lLg/ShzdI=; b=mJkZnCFEWg2ouFECkwkS6XIGe8bXC0omjPbWftecJQXiju1Er1RcrazG4PDI+c8P9T sNg1ppKXqApjORMhWd0mFhVU8IrXtJqIFyDyV9/owfgW/rwlGOfW0l3jBcyvxXO1Qh8F y4r41D88c6utiaSwviPa2A6iICTmb8TBgrrgslaG/FQUnShm7L5INB/7ktgRoavS/yIv K2o9X+P3BpqQgaSgl3sLbgjE0BKVJ+iGh3V0uHzkhUfnFngovV6tiv78WroDdr6reZfY IVYoljW76K5BQHy3IqCUc6ksRkJidS9UXG/lSCZE61Z4VakGwrG72vgMtAc5fkbuFPt0 a+mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=U9yDr8jO+aS+azMDJb68tShVjR2ongdOo6lLg/ShzdI=; b=WBSXUNbNaOkFCKvbiF8WlES/ituXfTmUWSBrjA4A3bsUY5cdwiBA2xKNxN/13s5xjH BoqLrBvPAhsVg2OAr3T/h4J1bGa59GiKgwMWU95yq76CMyd9GNII66UekRivODytVGmJ qAIh+Iz/8/YW5qvUF90THRPUilSRwRKN4YBbAJbbalhAGip2sMzfMGjpzTNfmAyATzX+ yLsQeogXj7dBSpGIh/g7YT9bJHqfWezIc16GR/e2/4b60iTrpWQtyddXtfTUw8n6joHj gZIMfX9gTDuxNSRRgCOUXhJF6VOusM5ctyvF0YNN/nb1S3PCZCvlnh0EzKyu/q8NtMNe faoA== X-Gm-Message-State: AIkVDXJS6Xb40tLgQ+v2FPX/JB+qx2QOBUk2Rlh2EqIW8UnnENbG46k73aS4rFuUAvVJlw== X-Received: by 10.194.86.165 with SMTP id q5mr51800140wjz.178.1483441537064; Tue, 03 Jan 2017 03:05:37 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id o132sm88999068wmo.17.2017.01.03.03.05.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2017 03:05:36 -0800 (PST) From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] dma-fence: Clear fence->status during dma_fence_init() Date: Tue, 3 Jan 2017 11:05:32 +0000 Message-Id: <20170103110533.31880-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 Cc: intel-gfx@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP As the fence->status is an optional field that may be set before dma_fence_signal() is called to convey that the fence completed with an error, we have to ensure that it is always set to zero on initialisation so that the typical use (i.e. unset) always flags a successful completion. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/dma-buf/dma-fence.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 3444f293ad4a..9130f790ebf3 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -534,6 +534,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, fence->context = context; fence->seqno = seqno; fence->flags = 0UL; + fence->status = 0; trace_dma_fence_init(fence); }