sgi-xp: remove h from printk format specifier
diff mbox series

Message ID 20210123160003.1777766-1-trix@redhat.com
State Accepted
Commit c41e21dca8dc6899611c6df1fa4e6b55097ceada
Headers show
Series
  • sgi-xp: remove h from printk format specifier
Related show

Commit Message

Tom Rix Jan. 23, 2021, 4 p.m. UTC
From: Tom Rix <trix@redhat.com>

This change fixes the checkpatch warning described in this commit
commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
  unnecessary %h[xudi] and %hh[xudi]")

Standard integer promotion is already done and %hx and %hhx is useless
so do not encourage the use of %hh[xudi] or %h[xudi].

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/misc/sgi-xp/xpnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Steve Wahl Jan. 25, 2021, 3:29 p.m. UTC | #1
Reviewed-By: Steve Wahl <steve.wahl@hpe.com>

On Sat, Jan 23, 2021 at 08:00:03AM -0800, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> This change fixes the checkpatch warning described in this commit
> commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of
>   unnecessary %h[xudi] and %hh[xudi]")
> 
> Standard integer promotion is already done and %hx and %hhx is useless
> so do not encourage the use of %hh[xudi] or %h[xudi].
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/misc/sgi-xp/xpnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
> index 23837d0d6f4a..2508f83bdc3f 100644
> --- a/drivers/misc/sgi-xp/xpnet.c
> +++ b/drivers/misc/sgi-xp/xpnet.c
> @@ -208,7 +208,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
>  	} else {
>  		dst = (void *)((u64)skb->data & ~(L1_CACHE_BYTES - 1));
>  		dev_dbg(xpnet, "transferring buffer to the skb->data area;\n\t"
> -			"xp_remote_memcpy(0x%p, 0x%p, %hu)\n", dst,
> +			"xp_remote_memcpy(0x%p, 0x%p, %u)\n", dst,
>  					  (void *)msg->buf_pa, msg->size);
>  
>  		ret = xp_remote_memcpy(xp_pa(dst), msg->buf_pa, msg->size);
> @@ -218,7 +218,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
>  			 * !!! appears in_use and we can't just call
>  			 * !!! dev_kfree_skb.
>  			 */
> -			dev_err(xpnet, "xp_remote_memcpy(0x%p, 0x%p, 0x%hx) "
> +			dev_err(xpnet, "xp_remote_memcpy(0x%p, 0x%p, 0x%x) "
>  				"returned error=0x%x\n", dst,
>  				(void *)msg->buf_pa, msg->size, ret);
>  
> -- 
> 2.27.0
>

Patch
diff mbox series

diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index 23837d0d6f4a..2508f83bdc3f 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -208,7 +208,7 @@  xpnet_receive(short partid, int channel, struct xpnet_message *msg)
 	} else {
 		dst = (void *)((u64)skb->data & ~(L1_CACHE_BYTES - 1));
 		dev_dbg(xpnet, "transferring buffer to the skb->data area;\n\t"
-			"xp_remote_memcpy(0x%p, 0x%p, %hu)\n", dst,
+			"xp_remote_memcpy(0x%p, 0x%p, %u)\n", dst,
 					  (void *)msg->buf_pa, msg->size);
 
 		ret = xp_remote_memcpy(xp_pa(dst), msg->buf_pa, msg->size);
@@ -218,7 +218,7 @@  xpnet_receive(short partid, int channel, struct xpnet_message *msg)
 			 * !!! appears in_use and we can't just call
 			 * !!! dev_kfree_skb.
 			 */
-			dev_err(xpnet, "xp_remote_memcpy(0x%p, 0x%p, 0x%hx) "
+			dev_err(xpnet, "xp_remote_memcpy(0x%p, 0x%p, 0x%x) "
 				"returned error=0x%x\n", dst,
 				(void *)msg->buf_pa, msg->size, ret);