public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] greybus: remove h from printk format specifier
@ 2020-12-15 14:53 trix
  2020-12-15 15:36 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2020-12-15 14:53 UTC (permalink / raw)
  To: johan, elder, gregkh; +Cc: greybus-dev, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

See Documentation/core-api/printk-formats.rst.
h should no longer be used in the format specifier for printk.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/greybus/greybus_trace.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/greybus/greybus_trace.h b/drivers/greybus/greybus_trace.h
index 1bc9f1275c65..616a3bd61aa6 100644
--- a/drivers/greybus/greybus_trace.h
+++ b/drivers/greybus/greybus_trace.h
@@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(gb_message,
 		__entry->result = message->header->result;
 	),
 
-	TP_printk("size=%hu operation_id=0x%04x type=0x%02x result=0x%02x",
+	TP_printk("size=%u operation_id=0x%04x type=0x%02x result=0x%02x",
 		  __entry->size, __entry->operation_id,
 		  __entry->type, __entry->result)
 );
@@ -317,7 +317,7 @@ DECLARE_EVENT_CLASS(gb_interface,
 		__entry->mode_switch = intf->mode_switch;
 	),
 
-	TP_printk("intf_id=%hhu device_id=%hhu module_id=%hhu D=%d J=%d A=%d E=%d M=%d",
+	TP_printk("intf_id=%u device_id=%u module_id=%u D=%d J=%d A=%d E=%d M=%d",
 		__entry->id, __entry->device_id, __entry->module_id,
 		__entry->disconnected, __entry->ejected, __entry->active,
 		__entry->enabled, __entry->mode_switch)
@@ -391,7 +391,7 @@ DECLARE_EVENT_CLASS(gb_module,
 		__entry->disconnected = module->disconnected;
 	),
 
-	TP_printk("hd_bus_id=%d module_id=%hhu num_interfaces=%zu disconnected=%d",
+	TP_printk("hd_bus_id=%d module_id=%u num_interfaces=%zu disconnected=%d",
 		__entry->hd_bus_id, __entry->module_id,
 		__entry->num_interfaces, __entry->disconnected)
 );
-- 
2.27.0


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

* Re: [PATCH] greybus: remove h from printk format specifier
  2020-12-15 14:53 [PATCH] greybus: remove h from printk format specifier trix
@ 2020-12-15 15:36 ` Alex Elder
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2020-12-15 15:36 UTC (permalink / raw)
  To: trix, johan, elder, gregkh; +Cc: greybus-dev, linux-kernel

On 12/15/20 8:53 AM, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> See Documentation/core-api/printk-formats.rst.
> h should no longer be used in the format specifier for printk.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
>   drivers/greybus/greybus_trace.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/greybus/greybus_trace.h b/drivers/greybus/greybus_trace.h
> index 1bc9f1275c65..616a3bd61aa6 100644
> --- a/drivers/greybus/greybus_trace.h
> +++ b/drivers/greybus/greybus_trace.h
> @@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(gb_message,
>   		__entry->result = message->header->result;
>   	),
>   
> -	TP_printk("size=%hu operation_id=0x%04x type=0x%02x result=0x%02x",
> +	TP_printk("size=%u operation_id=0x%04x type=0x%02x result=0x%02x",
>   		  __entry->size, __entry->operation_id,
>   		  __entry->type, __entry->result)
>   );
> @@ -317,7 +317,7 @@ DECLARE_EVENT_CLASS(gb_interface,
>   		__entry->mode_switch = intf->mode_switch;
>   	),
>   
> -	TP_printk("intf_id=%hhu device_id=%hhu module_id=%hhu D=%d J=%d A=%d E=%d M=%d",
> +	TP_printk("intf_id=%u device_id=%u module_id=%u D=%d J=%d A=%d E=%d M=%d",
>   		__entry->id, __entry->device_id, __entry->module_id,
>   		__entry->disconnected, __entry->ejected, __entry->active,
>   		__entry->enabled, __entry->mode_switch)
> @@ -391,7 +391,7 @@ DECLARE_EVENT_CLASS(gb_module,
>   		__entry->disconnected = module->disconnected;
>   	),
>   
> -	TP_printk("hd_bus_id=%d module_id=%hhu num_interfaces=%zu disconnected=%d",
> +	TP_printk("hd_bus_id=%d module_id=%u num_interfaces=%zu disconnected=%d",
>   		__entry->hd_bus_id, __entry->module_id,
>   		__entry->num_interfaces, __entry->disconnected)
>   );
> 


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

end of thread, other threads:[~2020-12-15 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-15 14:53 [PATCH] greybus: remove h from printk format specifier trix
2020-12-15 15:36 ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox