]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
staging: vchiq_core: Add hex prefix to debugfs output
authorStefan Wahren <wahrenst@gmx.net>
Fri, 21 Jun 2024 13:19:56 +0000 (15:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 13:26:56 +0000 (15:26 +0200)
The number format of VCHIQ debugfs isn't always clear. So let's
add a prefix for all hex values, in order to make things clear.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240621131958.98208-9-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index 51cfc366519b84f6b3724e3ec8505e0f448380db..4f65e4021c4d93bd471ae6c086b9f986e88e8820 100644 (file)
@@ -3370,7 +3370,7 @@ vchiq_dump_shared_state(struct seq_file *f, struct vchiq_state *state,
        };
        int i;
 
-       seq_printf(f, "  %s: slots %d-%d tx_pos=%x recycle=%x\n",
+       seq_printf(f, "  %s: slots %d-%d tx_pos=0x%x recycle=0x%x\n",
                   label, shared->slot_first, shared->slot_last,
                   shared->tx_pos, shared->slot_queue_recycle);
 
@@ -3386,7 +3386,7 @@ vchiq_dump_shared_state(struct seq_file *f, struct vchiq_state *state,
        }
 
        for (i = 1; i < shared->debug[DEBUG_ENTRIES]; i++) {
-               seq_printf(f, "    DEBUG: %s = %d(%x)\n",
+               seq_printf(f, "    DEBUG: %s = %d(0x%x)\n",
                           debug_names[i], shared->debug[i], shared->debug[i]);
        }
 }
@@ -3414,7 +3414,7 @@ vchiq_dump_service_state(struct seq_file *f, struct vchiq_service *service)
 
                        if (service->public_fourcc != VCHIQ_FOURCC_INVALID)
                                scnprintf(remoteport + len2, sizeof(remoteport) - len2,
-                                         " (client %x)", service->client_id);
+                                         " (client 0x%x)", service->client_id);
                } else {
                        strscpy(remoteport, "n/a", sizeof(remoteport));
                }
@@ -3475,7 +3475,7 @@ void vchiq_dump_state(struct seq_file *f, struct vchiq_state *state)
        seq_printf(f, "State %d: %s\n", state->id,
                   conn_state_names[state->conn_state]);
 
-       seq_printf(f, "  tx_pos=%x(@%pK), rx_pos=%x(@%pK)\n",
+       seq_printf(f, "  tx_pos=0x%x(@%pK), rx_pos=0x%x(@%pK)\n",
                   state->local->tx_pos,
                   state->tx_data + (state->local_tx_pos & VCHIQ_SLOT_MASK),
                   state->rx_pos,