[PATCH 2/8] trace-cmd: Rename error_operation_for_server

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

 



No changes in behavior intended.

Signed-off-by: Slavomir Kaslev <kaslevs@xxxxxxxxxx>
---
 tracecmd/trace-msg.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/tracecmd/trace-msg.c b/tracecmd/trace-msg.c
index 418a22d..ffebce7 100644
--- a/tracecmd/trace-msg.c
+++ b/tracecmd/trace-msg.c
@@ -345,6 +345,12 @@ void tracecmd_msg_set_done(struct tracecmd_msg_handle *msg_handle)
 	msg_server->done = true;
 }
 
+static void error_operation(struct tracecmd_msg *msg)
+{
+	warning("Message: cmd=%d size=%d\n",
+		ntohl(msg->hdr.cmd), ntohl(msg->hdr.size));
+}
+
 /*
  * A return value of 0 indicates time-out
  */
@@ -432,15 +438,6 @@ static bool process_option(struct tracecmd_msg_handle *msg_handle,
 	return false;
 }
 
-static void error_operation_for_server(struct tracecmd_msg *msg)
-{
-	u32 cmd;
-
-	cmd = ntohl(msg->hdr.cmd);
-
-	warning("Message: cmd=%d size=%d\n", cmd, ntohl(msg->hdr.size));
-}
-
 struct tracecmd_msg_handle *
 tracecmd_msg_handle_alloc(int fd, unsigned long flags)
 {
@@ -545,7 +542,7 @@ int tracecmd_msg_initial_setting(struct tracecmd_msg_handle *msg_handle)
 	return pagesize;
 
 error:
-	error_operation_for_server(&msg);
+	error_operation(&msg);
 	return ret;
 }
 
@@ -670,7 +667,7 @@ int tracecmd_msg_read_data(struct tracecmd_msg_handle *msg_handle, int ofd)
 	return 0;
 
 error:
-	error_operation_for_server(&msg);
+	error_operation(&msg);
 	msg_free(&msg);
 	return ret;
 }
@@ -709,7 +706,7 @@ int tracecmd_msg_collect_data(struct tracecmd_msg_handle *msg_handle, int ofd)
 	return 0;
 
 error:
-	error_operation_for_server(&msg);
+	error_operation(&msg);
 	msg_free(&msg);
 	return ret;
 }
-- 
2.19.1




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

  Powered by Linux