Skip to contentSkip to conversation

platform/chrome: cros_ec_trace: Fix format warnings

PATCH Applied Gwendal Grignou 3 participants 4 messages Aug 23, 2021 – Aug 31, 2021

Subsystems (2)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_trace: Fix format warnings

Fix printf format issues in new tracing events.

Fixes 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")
---
 drivers/platform/chrome/cros_ec_trace.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/chrome/cros_ec_trace.h +3 -3
index f50b9f9b8610..a2052db55671 100644
@@ -92,7 +92,7 @@ TRACE_EVENT(cros_ec_sensorhub_timestamp,
 		__entry->current_time = current_time;
 		__entry->delta = current_timestamp - current_time;
 	),
-	TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
+	TP_printk("ec_ts: %9d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
 		  __entry->ec_sample_timestamp,
 		__entry->ec_fifo_timestamp,
 		__entry->fifo_timestamp,
@@ -122,7 +122,7 @@ TRACE_EVENT(cros_ec_sensorhub_data,
 		__entry->current_time = current_time;
 		__entry->delta = current_timestamp - current_time;
 	),
-	TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
+	TP_printk("ec_num: %4d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
 		  __entry->ec_sensor_num,
 		__entry->ec_fifo_timestamp,
 		__entry->fifo_timestamp,
@@ -153,7 +153,7 @@ TRACE_EVENT(cros_ec_sensorhub_filter,
 		__entry->x = state->x_offset;
 		__entry->y = state->y_offset;
 	),
-	TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
+	TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %lld x: %12lld y: %12lld",
 		  __entry->dx,
 		__entry->dy,
 		__entry->median_m,
Signature · 1 line
2.33.0.rc2.250.ged5fa647cd-goog
#1 lore raw
Quoted 15 lines · Gwendal Grignou

Fix printf format issues in new tracing events.

Fixes 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")
---
 drivers/platform/chrome/cros_ec_trace.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/platform/chrome/cros_ec_trace.h +0 -0
index f50b9f9b8610..a2052db55671 100644

drivers/platform/chrome/cros_ec_trace.h TRACE_EVENT(cros_ec_sensorhub_timestamp, · line 95

Quoted 5 lines
drivers/platform/chrome/cros_ec_trace.h +1 -1
@@ -92,7 +92,7 @@ TRACE_EVENT(cros_ec_sensorhub_timestamp,
                __entry->current_time = current_time;
                __entry->delta = current_timestamp - current_time;
        ),
-       TP_printk("ec_ts: %12lld, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
+       TP_printk("ec_ts: %9d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",

Should that be %u (the variables are u32) ?

drivers/platform/chrome/cros_ec_trace.h TRACE_EVENT(cros_ec_sensorhub_data, · line 125

Quoted 9 lines
drivers/platform/chrome/cros_ec_trace.h +1 -1
                  __entry->ec_sample_timestamp,
                __entry->ec_fifo_timestamp,
                __entry->fifo_timestamp,
@@ -122,7 +122,7 @@ TRACE_EVENT(cros_ec_sensorhub_data,
                __entry->current_time = current_time;
                __entry->delta = current_timestamp - current_time;
        ),
-       TP_printk("ec_num: %4d, ec_fifo_ts: %12lld, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",
+       TP_printk("ec_num: %4d, ec_fifo_ts: %9d, fifo_ts: %12lld, curr_ts: %12lld, curr_time: %12lld, delta %12lld",

Same here.

Thanks,
Guenter

Quoted 15 lines
drivers/platform/chrome/cros_ec_trace.h +1 -2
                  __entry->ec_sensor_num,
                __entry->ec_fifo_timestamp,
                __entry->fifo_timestamp,
@@ -153,7 +153,7 @@ TRACE_EVENT(cros_ec_sensorhub_filter,
                __entry->x = state->x_offset;
                __entry->y = state->y_offset;
        ),
-       TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %d x: %12lld y: %12lld",
+       TP_printk("dx: %12lld. dy: %12lld median_m: %12lld median_error: %12lld len: %lld x: %12lld y: %12lld",
                  __entry->dx,
                __entry->dy,
                __entry->median_m,
--

2.33.0.rc2.250.ged5fa647cd-goog

Applied
#2 lore raw
In reply to Gwendal Grignou

Hi Gwendal,

Quoted 3 lines · Gwendal Grignou

Fix printf format issues in new tracing events.

Fixes 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")

Applied, thanks!

[1/1] platform/chrome: cros_ec_trace: Fix format warnings

      commit: 5a51bdb0ae26cac8764bfb59839a34ea13155a47

Best regards,

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]
#3 lore raw

Hi Gwendal,

Quoted 5 lines · Benson Leung

Hi Gwendal,

Quoted 2 lines · Gwendal Grignou

Fix printf format issues in new tracing events.

Quoted 16 lines
Quoted 1 line
Fixes 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")

Applied, thanks!

[1/1] platform/chrome: cros_ec_trace: Fix format warnings

      commit: 5a51bdb0ae26cac8764bfb59839a34ea13155a47

Best regards,

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]

Sorry about this, I merged v1 incorrectly, so I've repushed v3. Disregard this thank you.

Benson

Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]