lkml.org 
[lkml]   [2019]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] ocxl: Clean up printf formats
From
Date


Le 27/02/2019 à 05:57, Alastair D'Silva a écrit :
> From: Alastair D'Silva <alastair@d-silva.org>
>
> Use %# instead of using a literal '0x'
>
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> ---

I don't really care either way, but it looks ok.

Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>


> drivers/misc/ocxl/config.c | 6 +++---
> drivers/misc/ocxl/context.c | 2 +-
> drivers/misc/ocxl/trace.h | 10 +++++-----
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c
> index 8f2c5d8bd2ee..0ee7856b033d 100644
> --- a/drivers/misc/ocxl/config.c
> +++ b/drivers/misc/ocxl/config.c
> @@ -178,9 +178,9 @@ static int read_dvsec_vendor(struct pci_dev *dev)
> pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_DLX_VERS, &dlx);
>
> dev_dbg(&dev->dev, "Vendor specific DVSEC:\n");
> - dev_dbg(&dev->dev, " CFG version = 0x%x\n", cfg);
> - dev_dbg(&dev->dev, " TLX version = 0x%x\n", tlx);
> - dev_dbg(&dev->dev, " DLX version = 0x%x\n", dlx);
> + dev_dbg(&dev->dev, " CFG version = %#x\n", cfg);
> + dev_dbg(&dev->dev, " TLX version = %#x\n", tlx);
> + dev_dbg(&dev->dev, " DLX version = %#x\n", dlx);
> return 0;
> }
>
> diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
> index c10a940e3b38..3498a0199bde 100644
> --- a/drivers/misc/ocxl/context.c
> +++ b/drivers/misc/ocxl/context.c
> @@ -134,7 +134,7 @@ static vm_fault_t ocxl_mmap_fault(struct vm_fault *vmf)
> vm_fault_t ret;
>
> offset = vmf->pgoff << PAGE_SHIFT;
> - pr_debug("%s: pasid %d address 0x%lx offset 0x%llx\n", __func__,
> + pr_debug("%s: pasid %d address %#lx offset %#llx\n", __func__,
> ctx->pasid, vmf->address, offset);
>
> if (offset < ctx->afu->irq_base_offset)
> diff --git a/drivers/misc/ocxl/trace.h b/drivers/misc/ocxl/trace.h
> index bcb7ff330c1e..8d2f53812edd 100644
> --- a/drivers/misc/ocxl/trace.h
> +++ b/drivers/misc/ocxl/trace.h
> @@ -28,7 +28,7 @@ DECLARE_EVENT_CLASS(ocxl_context,
> __entry->tidr = tidr;
> ),
>
> - TP_printk("linux pid=%d spa=0x%p pasid=0x%x pidr=0x%x tidr=0x%x",
> + TP_printk("linux pid=%d spa=%p pasid=%#x pidr=%#x tidr=%#x",
> __entry->pid,
> __entry->spa,
> __entry->pasid,
> @@ -61,7 +61,7 @@ TRACE_EVENT(ocxl_terminate_pasid,
> __entry->rc = rc;
> ),
>
> - TP_printk("pasid=0x%x rc=%d",
> + TP_printk("pasid=%#x rc=%d",
> __entry->pasid,
> __entry->rc
> )
> @@ -87,7 +87,7 @@ DECLARE_EVENT_CLASS(ocxl_fault_handler,
> __entry->tfc = tfc;
> ),
>
> - TP_printk("spa=%p pe=0x%llx dsisr=0x%llx dar=0x%llx tfc=0x%llx",
> + TP_printk("spa=%p pe=%#llx dsisr=%#llx dar=%#llx tfc=%#llx",
> __entry->spa,
> __entry->pe,
> __entry->dsisr,
> @@ -127,7 +127,7 @@ TRACE_EVENT(ocxl_afu_irq_alloc,
> __entry->irq_offset = irq_offset;
> ),
>
> - TP_printk("pasid=0x%x irq_id=%d virq=%u hw_irq=%d irq_offset=0x%llx",
> + TP_printk("pasid=%#x irq_id=%d virq=%u hw_irq=%d irq_offset=0x%llx",
> __entry->pasid,
> __entry->irq_id,
> __entry->virq,
> @@ -150,7 +150,7 @@ TRACE_EVENT(ocxl_afu_irq_free,
> __entry->irq_id = irq_id;
> ),
>
> - TP_printk("pasid=0x%x irq_id=%d",
> + TP_printk("pasid=%#x irq_id=%d",
> __entry->pasid,
> __entry->irq_id
> )
>

\
 
 \ /
  Last update: 2019-02-27 14:40    [W:0.302 / U:15.264 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site