[PATCH 2/2] trace-cmd: Make tracecmd_unpair_peer() return void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

The return value of tracecmd_unpair_peer() is useless. Just make it a void
function call.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
 include/trace-cmd/trace-cmd.h | 2 +-
 lib/trace-cmd/trace-input.c   | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index 76fcffaea235..f3c95f3087a2 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -147,7 +147,7 @@ struct tracecmd_input *tracecmd_open_head(const char *file);
 struct tracecmd_input *tracecmd_open_fd(int fd);
 int tracecmd_pair_peer(struct tracecmd_input *handle,
 		       struct tracecmd_input *peer);
-int tracecmd_unpair_peer(struct tracecmd_input *handle);
+void tracecmd_unpair_peer(struct tracecmd_input *handle);
 void tracecmd_ref(struct tracecmd_input *handle);
 void tracecmd_close(struct tracecmd_input *handle);
 int tracecmd_read_headers(struct tracecmd_input *handle);
diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c
index 50d52f49a8f0..55c3d80a6057 100644
--- a/lib/trace-cmd/trace-input.c
+++ b/lib/trace-cmd/trace-input.c
@@ -3245,18 +3245,16 @@ fail:
  *
  * This removes any peer that is linked to the  @handle.
  */
-int tracecmd_unpair_peer(struct tracecmd_input *handle)
+void tracecmd_unpair_peer(struct tracecmd_input *handle)
 {
 	if (!handle)
-		return -1;
+		return;
 
 	if (handle->host.peer_data) {
 		tracecmd_close(handle->host.peer_data);
 		handle->host.peer_data = NULL;
 		tsync_check_enable(handle);
 	}
-
-	return 0;
 }
 
 /**
-- 
2.25.1





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux