linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec_trace: Fix format warnings
@ 2021-08-23 20:01 Gwendal Grignou
  2021-08-25 15:00 ` Guenter Roeck
  2021-08-31  0:13 ` Benson Leung
  0 siblings, 2 replies; 4+ messages in thread
From: Gwendal Grignou @ 2021-08-23 20:01 UTC (permalink / raw)
  To: bleung, enric.balletbo, groeck; +Cc: linux-kernel, Gwendal Grignou

Fix printf format issues in new tracing events.

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

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 drivers/platform/chrome/cros_ec_trace.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_trace.h b/drivers/platform/chrome/cros_ec_trace.h
index f50b9f9b8610..a2052db55671 100644
--- a/drivers/platform/chrome/cros_ec_trace.h
+++ b/drivers/platform/chrome/cros_ec_trace.h
@@ -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,
-- 
2.33.0.rc2.250.ged5fa647cd-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_trace: Fix format warnings
  2021-08-23 20:01 [PATCH] platform/chrome: cros_ec_trace: Fix format warnings Gwendal Grignou
@ 2021-08-25 15:00 ` Guenter Roeck
  2021-08-31  0:13 ` Benson Leung
  1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-08-25 15:00 UTC (permalink / raw)
  To: Gwendal Grignou
  Cc: Benson Leung, Enric Balletbo i Serra, Guenter Roeck, linux-kernel

On Mon, Aug 23, 2021 at 1:01 PM Gwendal Grignou <gwendal@chromium.org> wrote:
>
> Fix printf format issues in new tracing events.
>
> Fixes: 814318242 ("platform/chrome: cros_ec_trace: Add fields to command traces")
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
>  drivers/platform/chrome/cros_ec_trace.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_trace.h b/drivers/platform/chrome/cros_ec_trace.h
> index f50b9f9b8610..a2052db55671 100644
> --- a/drivers/platform/chrome/cros_ec_trace.h
> +++ b/drivers/platform/chrome/cros_ec_trace.h
> @@ -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) ?

>                   __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

>                   __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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_trace: Fix format warnings
  2021-08-23 20:01 [PATCH] platform/chrome: cros_ec_trace: Fix format warnings Gwendal Grignou
  2021-08-25 15:00 ` Guenter Roeck
@ 2021-08-31  0:13 ` Benson Leung
  2021-08-31  0:29   ` Benson Leung
  1 sibling, 1 reply; 4+ messages in thread
From: Benson Leung @ 2021-08-31  0:13 UTC (permalink / raw)
  To: Gwendal Grignou, enric.balletbo, groeck; +Cc: linux-kernel, bleung, bleung

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

Hi Gwendal,

On Mon, 23 Aug 2021 13:01:32 -0700, Gwendal Grignou wrote:
> 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,
-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_trace: Fix format warnings
  2021-08-31  0:13 ` Benson Leung
@ 2021-08-31  0:29   ` Benson Leung
  0 siblings, 0 replies; 4+ messages in thread
From: Benson Leung @ 2021-08-31  0:29 UTC (permalink / raw)
  To: Gwendal Grignou, enric.balletbo, groeck; +Cc: linux-kernel, bleung

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

Hi Gwendal,

On Mon, Aug 30, 2021 at 05:13:54PM -0700, Benson Leung wrote:
> Hi Gwendal,
> 
> On Mon, 23 Aug 2021 13:01:32 -0700, Gwendal Grignou wrote:
> > 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,
> -- 
> Benson Leung
> Staff Software Engineer
> Chrome OS Kernel
> Google Inc.
> bleung@google.com
> Chromium OS Project
> bleung@chromium.org

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

Benson

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-31  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 20:01 [PATCH] platform/chrome: cros_ec_trace: Fix format warnings Gwendal Grignou
2021-08-25 15:00 ` Guenter Roeck
2021-08-31  0:13 ` Benson Leung
2021-08-31  0:29   ` Benson Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).