]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
vchiq_arm: Tweak the logging output
authorPhil Elwell <phil@raspberrypi.org>
Mon, 7 Mar 2016 15:05:11 +0000 (15:05 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 10:07:54 +0000 (12:07 +0200)
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index d6757ee263fb61a689c0d38c0dbb65c57a8e39bb..7fd63cf6800d7ec35fbcb215a283630c11120c7f 100644 (file)
@@ -873,16 +873,14 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service,
                                                error_count);
                                        return VCHIQ_ERROR;
                                }
-                               if (i == 0) {
-                                       if (SRVTRACE_ENABLED(service,
-                                                       VCHIQ_LOG_INFO))
-                                               vchiq_log_dump_mem("Sent", 0,
-                                                       header->data + pos,
-                                                       min(64u,
-                                                       elements[0].size));
-                               }
                        }
 
+               if (SRVTRACE_ENABLED(service,
+                               VCHIQ_LOG_INFO))
+                       vchiq_log_dump_mem("Sent", 0,
+                               header->data,
+                               min(16, pos));
+
                spin_lock(&quota_spinlock);
                service_quota->message_use_count++;
 
@@ -1019,16 +1017,13 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service,
                                                error_count);
                                        return VCHIQ_ERROR;
                                }
-                               if (i == 0) {
-                                       if (vchiq_sync_log_level >=
-                                               VCHIQ_LOG_TRACE)
-                                               vchiq_log_dump_mem("Sent Sync",
-                                                       0, header->data + pos,
-                                                       min(64u,
-                                                       elements[0].size));
-                               }
                        }
 
+               if (vchiq_sync_log_level >= VCHIQ_LOG_TRACE)
+                       vchiq_log_dump_mem("Sent Sync",
+                               0, header->data,
+                               min(16, pos));
+
                VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count);
                VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size);
        } else {
@@ -1691,7 +1686,7 @@ parse_rx_slots(VCHIQ_STATE_T *state)
                                remoteport, localport, size);
                        if (size > 0)
                                vchiq_log_dump_mem("Rcvd", 0, header->data,
-                                       min(64, size));
+                                       min(16, size));
                }
 
                if (((unsigned long)header & VCHIQ_SLOT_MASK) +
@@ -2148,7 +2143,7 @@ sync_func(void *v)
                                remoteport, localport, size);
                        if (size > 0)
                                vchiq_log_dump_mem("Rcvd", 0, header->data,
-                                       min(64, size));
+                                       min(16, size));
                }
 
                switch (type) {