From patchwork Wed Jan 4 14:12:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9496965 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 7C4C3606B5 for ; Wed, 4 Jan 2017 14:12:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F9F527F94 for ; Wed, 4 Jan 2017 14:12:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64AE627FA5; Wed, 4 Jan 2017 14:12:33 +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=unavailable 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 3B63D27F99 for ; Wed, 4 Jan 2017 14:12:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65CC46E729; Wed, 4 Jan 2017 14:12:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1DC3E6E26D; Wed, 4 Jan 2017 14:12:28 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id u144so91693659wmu.0; Wed, 04 Jan 2017 06:12:28 -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=g8dJPcc6mnR/XKZjEplM4U9zYadLGjmM/G0F7hrLWvo=; b=ZBY74ZZlfPaMlGCQT59b/OrojujozD4XmLCKGeMaVJ1BngyXrejhY08NzAhDZdkS8u 7Cs62XJhUx4gXcuNkhbyoezwnVwKOyD2cQ9+RZb/hIVg/fttxipAO5gKaPDLLeTQEipy gKVpN+TyliHqIiLP+kzybdzAL3SZR62HY9SoMVRXxlYh90QhANzEpVhz74s26722e3xk 6K7SdcKf0Me1oNvlS8WrQk9ioN1h+fAnX+tvvz8g60O6QfZxS6RhDcZUmd4CcTaW6xww XXG9Vh4cJOlRf1kfOnIi2zyS3bSdfoLq2pzj9rl+6uVYRfVtjac9vnj4rilVwBoadoZv 7X4w== 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=g8dJPcc6mnR/XKZjEplM4U9zYadLGjmM/G0F7hrLWvo=; b=RQ+UOoBFkbK8JWRIHzGOkRxodnRJmeg4O1b4I7vpegPkaBRXl7AzWugVx8ZDNAM0fv qbANOV1bul8MqDfs0CAIgJUZgrODEdL/z3IMzOiOW1ScLTePOl9bWSCo4z3ynBP8Dxdq F5kf7xltv5vd07Ev/PCVWB7dSZPK1ZUg6HqM3MUyQxYqcVIArix0uMWRZW23Ardqbua9 Ui0XYg8nrJM9AVMkZVmP7SqzwQoZDHSvRfNfp1Szb7bKBtFQ9fvwRlmiHmv7YRDt3sRx l15+RS82EO7uDj03Tp4WVk0d+MSlvtqg9v+hON9Beu8eGp77R+E6bfiTggax39eacvEg 6/Pw== X-Gm-Message-State: AIkVDXLYsQyuCBF9W4vDShzzBQwFM1U9Ka9ySi+u8Ec/8KMwVUlOwEJ6XkWG5BNHSNkkUQ== X-Received: by 10.28.72.3 with SMTP id v3mr65700583wma.20.1483539146139; Wed, 04 Jan 2017 06:12:26 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id y4sm98658888wjp.0.2017.01.04.06.12.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 06:12:25 -0800 (PST) From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] dma-fence: Clear fence->status during dma_fence_init() Date: Wed, 4 Jan 2017 14:12:20 +0000 Message-Id: <20170104141222.6992-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 Reviewed-by: Daniel Vetter Reviewed-by: Sumit Semwal --- 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); }