Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1392304

[PATCH 07/13] staging/android: remove unnecessary check for fence

From Gustavo Padovan <gustavo@padovan.org>
Newsgroups linux.kernel
Subject [PATCH 07/13] staging/android: remove unnecessary check for fence
Date 2016-05-02 17:30 +0200
Message-ID <runXm-5Ww-45@gated-at.bofh.it> (permalink)
References <runXl-5Ww-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

When we call sync_print_fence() fence is always valid.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 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));
 
-- 
2.5.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] staging/android: clean up SW_SYNC Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
  [PATCH 09/13] staging/android: bring struct sync_pt back Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
  [PATCH 13/13] staging/android: make sw_ioctl info internal to sw_sync.c Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
  [PATCH 07/13] staging/android: remove unnecessary check for fence Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
  [PATCH 01/13] staging/android: store last signaled value on sync timeline Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:40 +0200
  [PATCH 10/13] staging/android: move sw_sync related code to sw_sync.c Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
  [PATCH 05/13] staging/android: remove sw_sync.[ch] files Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
  [PATCH 12/13] staging/android: make sync_timeline internal to sw_sync Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
  [PATCH 02/13] staging/android: remove .{fence,timeline}_value_str() from timeline_ops Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:20 +0200
  [PATCH 06/13] staging/android: rename android_fence to timeline_fence Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:30 +0200
  [PATCH 03/13] staging/android: remove struct sync_timeline_ops Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:30 +0200
  [PATCH 04/13] staging/android: remove sw_sync_timeline and sw_sync_pt Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:40 +0200

csiph-web