From patchwork Tue May 31 19:59:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9145567 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 64A9860761 for ; Tue, 31 May 2016 20:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5957A208C2 for ; Tue, 31 May 2016 20:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DB6A25D97; Tue, 31 May 2016 20:01:29 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AF51208C2 for ; Tue, 31 May 2016 20:01:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 574256E735; Tue, 31 May 2016 20:01:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.161.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91BEB6E730 for ; Tue, 31 May 2016 20:01:03 +0000 (UTC) Received: by mail-yw0-f194.google.com with SMTP id y6so20378702ywe.0 for ; Tue, 31 May 2016 13:01:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zGsvKMEvEIaHD24gy6HXDfRWnpcDzoYMl0+Aa2+GYfw=; b=UefdOT5i/NSyN5KXPgiEbIgQIjZNaIIDKSwWCRZNweBT+aVDEzf3kgrL3uguIUCN1U wLvMjpentQRT8XV28zX31+XiaELGME0+JM9KRGw+R6JNzBqTtIyjuK8hdXLC70h0Ucux t3OlYeAWQ1+QvysaOvEW4hN5rf8UkBwQjGC2pQ1FSJSDIIGo16N6FlBK+WkQraEromt6 nhKpQs8Kt+uonk/uQbnE/VwSNXSVanI/PtOF86ZFfT8WRL3lTaj+8nrn3DNTWGX3v3QO +i6oRihz+Mn8ASddl5vINh9SG4xodR04WYw90u4WDspsF7YL7oCfIZ7CZCgW32Xgdspy wT6g== X-Gm-Message-State: ALyK8tJ5OGmq/qgr2d/cZpD2ratu3fY1RhKgsXtn8QPi0q8YYkCaOfbUEILQGwx4LlJ8dw== X-Received: by 10.13.254.67 with SMTP id o64mr23683714ywf.145.1464724862413; Tue, 31 May 2016 13:01:02 -0700 (PDT) Received: from jade.localdomain ([187.64.210.186]) by smtp.gmail.com with ESMTPSA id w185sm17322549ywe.1.2016.05.31.13.00.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 May 2016 13:00:58 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH 07/18] staging/android: remove unnecessary check for fence Date: Tue, 31 May 2016 16:59:02 -0300 Message-Id: <1464724753-2490-8-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464724753-2490-1-git-send-email-gustavo@padovan.org> References: <1464724753-2490-1-git-send-email-gustavo@padovan.org> Cc: devel@driverdev.osuosl.org, Daniel Stone , Daniel Vetter , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Gustavo Padovan , John Harrison 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 From: Gustavo Padovan When we call sync_print_fence() fence is always valid. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sync_debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c index dc85d5f..6282046 100644 --- a/drivers/staging/android/sync_debug.c +++ b/drivers/staging/android/sync_debug.c @@ -109,7 +109,7 @@ static void sync_print_fence(struct seq_file *s, struct fence *fence, bool show) seq_printf(s, "@%lld.%09ld", (s64)ts64.tv_sec, ts64.tv_nsec); } - if ((!fence || fence->ops->timeline_value_str) && + if (fence->ops->timeline_value_str && fence->ops->fence_value_str) { char value[64]; bool success; @@ -117,10 +117,9 @@ static void sync_print_fence(struct seq_file *s, struct fence *fence, bool show) fence->ops->fence_value_str(fence, value, sizeof(value)); success = strlen(value); - if (success) + if (success) { seq_printf(s, ": %s", value); - if (success && fence) { fence->ops->timeline_value_str(fence, value, sizeof(value));