diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2016-07-02 02:01:11 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-02 19:00:54 +0300 |
commit | ad4210823bf379660ebfeb85100b7743094ca7be (patch) | |
tree | d0ad9684ed7e4246dd6a5fce1c68232db91326f7 /drivers/infiniband/hw/hfi1/trace_ctxts.h | |
parent | 462b6b21709fb65ee42ddea722d5cf745251417a (diff) | |
download | linux-ad4210823bf379660ebfeb85100b7743094ca7be.tar.xz |
IB/hfi1: Fix trace sparse errors
Fix sparse errors by making sure the fast assign destinations
are host cpu typed.
For the void __iomem *, just make the field match source
data.
Fix a bug where the hw_free trace printed the pointer vs.
the dereferenced value.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/trace_ctxts.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/trace_ctxts.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hfi1/trace_ctxts.h b/drivers/infiniband/hw/hfi1/trace_ctxts.h index 5052d497df19..31654bbac1cf 100644 --- a/drivers/infiniband/hw/hfi1/trace_ctxts.h +++ b/drivers/infiniband/hw/hfi1/trace_ctxts.h @@ -56,7 +56,7 @@ #define TRACE_SYSTEM hfi1_ctxts #define UCTXT_FMT \ - "cred:%u, credaddr:0x%llx, piobase:0x%llx, rcvhdr_cnt:%u, " \ + "cred:%u, credaddr:0x%llx, piobase:0x%p, rcvhdr_cnt:%u, " \ "rcvbase:0x%llx, rcvegrc:%u, rcvegrb:0x%llx" TRACE_EVENT(hfi1_uctxtdata, TP_PROTO(struct hfi1_devdata *dd, struct hfi1_ctxtdata *uctxt), @@ -65,7 +65,7 @@ TRACE_EVENT(hfi1_uctxtdata, __field(unsigned int, ctxt) __field(u32, credits) __field(u64, hw_free) - __field(u64, piobase) + __field(void __iomem *, piobase) __field(u16, rcvhdrq_cnt) __field(u64, rcvhdrq_phys) __field(u32, eager_cnt) @@ -74,8 +74,8 @@ TRACE_EVENT(hfi1_uctxtdata, TP_fast_assign(DD_DEV_ASSIGN(dd); __entry->ctxt = uctxt->ctxt; __entry->credits = uctxt->sc->credits; - __entry->hw_free = (u64)uctxt->sc->hw_free; - __entry->piobase = (u64)uctxt->sc->base_addr; + __entry->hw_free = le64_to_cpu(*uctxt->sc->hw_free); + __entry->piobase = uctxt->sc->base_addr; __entry->rcvhdrq_cnt = uctxt->rcvhdrq_cnt; __entry->rcvhdrq_phys = uctxt->rcvhdrq_phys; __entry->eager_cnt = uctxt->egrbufs.alloced; |