From patchwork Fri Mar 1 00:43:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 15186 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9BC9923E1A for ; Fri, 1 Mar 2013 00:44:29 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by fiordland.canonical.com (Postfix) with ESMTP id 5496CA19700 for ; Fri, 1 Mar 2013 00:44:29 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id f13so1607711vcb.40 for ; Thu, 28 Feb 2013 16:44:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=EU5wZuPgFWyAWGWRWC3ULxzwonM9j4hOX92njuF+k9E=; b=ilm2k0syroqjoi3dzCNLEU6sHUjTtwfuMP0WP+BDn9gByLFYpapFxMA7+NMgVF82/W vaJ4A5HDOUseP04ls+oIRvNUugXSm7F7Iacf6Bk7WNUhEA3QiGdOBzYP4o41X8GUFC+E b5AbI7kwVJvlEN/4r0oINyYAtCmVzFK9vc9LBXCoyUfR7D4jocxR/byZJUXcHyXR1XAD vl93DN5kSQULEdGob03j/ULLhwAYTTWSFsRSa47ouZ3+Un6eG2saa/MMNSfAtRI2XTh6 Tsv4sudW6A0VA//ZDI185aQGuu1Rf4gETpBQ45WeswFZFk9q+fFEWC5G1DRssw6HXKBU Vg8A== X-Received: by 10.52.88.237 with SMTP id bj13mr2902661vdb.75.1362098668679; Thu, 28 Feb 2013 16:44:28 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp679veb; Thu, 28 Feb 2013 16:44:28 -0800 (PST) X-Received: by 10.67.22.103 with SMTP id hr7mr13189054pad.2.1362098667808; Thu, 28 Feb 2013 16:44:27 -0800 (PST) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id uc1si10281076pbc.141.2013.02.28.16.44.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 16:44:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) smtp.mail=john.stultz@linaro.org Received: by mail-pa0-f42.google.com with SMTP id kq12so1456464pab.15 for ; Thu, 28 Feb 2013 16:44:27 -0800 (PST) X-Received: by 10.66.27.199 with SMTP id v7mr15676860pag.215.1362098667434; Thu, 28 Feb 2013 16:44:27 -0800 (PST) Received: from localhost.localdomain (c-24-21-54-107.hsd1.or.comcast.net. [24.21.54.107]) by mx.google.com with ESMTPS id dx17sm10914892pac.17.2013.02.28.16.44.25 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 16:44:26 -0800 (PST) From: John Stultz To: lkml Cc: Jamie Gennis , Maarten Lankhorst , Erik Gilling , Daniel Vetter , Rob Clark , Sumit Semwal , Greg KH , dri-devel@lists.freedesktop.org, Android Kernel Team , John Stultz Subject: [PATCH 30/30] staging: sync: Fix timeout = 0 wait behavior Date: Thu, 28 Feb 2013 16:43:26 -0800 Message-Id: <1362098606-26469-31-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362098606-26469-1-git-send-email-john.stultz@linaro.org> References: <1362098606-26469-1-git-send-email-john.stultz@linaro.org> X-Gm-Message-State: ALoCoQls/fkJPw82NruKQKFPpulQvhYsyvt3GuMxWllF4pahTiNdhOcke5gNwjru8nEiyD6o0oiR From: Jamie Gennis Fix wait behavior on timeout == 0 case Cc: Maarten Lankhorst Cc: Erik Gilling Cc: Daniel Vetter Cc: Rob Clark Cc: Sumit Semwal Cc: Greg KH Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team Signed-off-by: Jamie Gennis [jstultz: Added commit message] Signed-off-by: John Stultz --- drivers/staging/android/sync.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 9b8b0e9..b9bb974 100644 --- a/drivers/staging/android/sync.c +++ b/drivers/staging/android/sync.c @@ -616,10 +616,12 @@ int sync_fence_wait(struct sync_fence *fence, long timeout) return fence->status; } - if (fence->status == 0 && timeout > 0) { - pr_info("fence timeout on [%p] after %dms\n", fence, - jiffies_to_msecs(timeout)); - sync_dump(); + if (fence->status == 0) { + if (timeout > 0) { + pr_info("fence timeout on [%p] after %dms\n", fence, + jiffies_to_msecs(timeout)); + sync_dump(); + } return -ETIME; }