Skip to content

Commit

Permalink
treewide: Add missing semicolons to __assign_str uses
Browse files Browse the repository at this point in the history
The __assign_str macro has an unusual ending semicolon but the vast
majority of uses of the macro already have semicolon termination.

$ git grep -P '\b__assign_str\b' | wc -l
551
$ git grep -P '\b__assign_str\b.*;' | wc -l
480

Add semicolons to the __assign_str() uses without semicolon termination
and all the other uses without semicolon termination via additional defines
that are equivalent to __assign_str() with the eventual goal of removing
the semicolon from the __assign_str() macro definition.

Link: https://lore.kernel.org/lkml/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
  • Loading branch information
JoePerches authored and rostedt committed Jun 30, 2021
1 parent bfbf8d1 commit 78c14b3
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 69 deletions.
14 changes: 7 additions & 7 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ TRACE_EVENT(amdgpu_cs_ioctl,

TP_fast_assign(
__entry->sched_job_id = job->base.id;
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job));
__entry->context = job->base.s_fence->finished.context;
__entry->seqno = job->base.s_fence->finished.seqno;
__assign_str(ring, to_amdgpu_ring(job->base.sched)->name)
__assign_str(ring, to_amdgpu_ring(job->base.sched)->name);
__entry->num_ibs = job->num_ibs;
),
TP_printk("sched_job=%llu, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
Expand All @@ -201,10 +201,10 @@ TRACE_EVENT(amdgpu_sched_run_job,

TP_fast_assign(
__entry->sched_job_id = job->base.id;
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job));
__entry->context = job->base.s_fence->finished.context;
__entry->seqno = job->base.s_fence->finished.seqno;
__assign_str(ring, to_amdgpu_ring(job->base.sched)->name)
__assign_str(ring, to_amdgpu_ring(job->base.sched)->name);
__entry->num_ibs = job->num_ibs;
),
TP_printk("sched_job=%llu, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
Expand All @@ -229,7 +229,7 @@ TRACE_EVENT(amdgpu_vm_grab_id,

TP_fast_assign(
__entry->pasid = vm->pasid;
__assign_str(ring, ring->name)
__assign_str(ring, ring->name);
__entry->vmid = job->vmid;
__entry->vm_hub = ring->funcs->vmhub,
__entry->pd_addr = job->vm_pd_addr;
Expand Down Expand Up @@ -424,7 +424,7 @@ TRACE_EVENT(amdgpu_vm_flush,
),

TP_fast_assign(
__assign_str(ring, ring->name)
__assign_str(ring, ring->name);
__entry->vmid = vmid;
__entry->vm_hub = ring->funcs->vmhub;
__entry->pd_addr = pd_addr;
Expand Down Expand Up @@ -525,7 +525,7 @@ TRACE_EVENT(amdgpu_ib_pipe_sync,
),

TP_fast_assign(
__assign_str(ring, sched_job->base.sched->name)
__assign_str(ring, sched_job->base.sched->name);
__entry->id = sched_job->base.id;
__entry->fence = fence;
__entry->ctx = fence->context;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/lima/lima_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DECLARE_EVENT_CLASS(lima_task,
__entry->task_id = task->base.id;
__entry->context = task->base.s_fence->finished.context;
__entry->seqno = task->base.s_fence->finished.seqno;
__assign_str(pipe, task->base.sched->name)
__assign_str(pipe, task->base.sched->name);
),

TP_printk("task=%llu, context=%u seqno=%u pipe=%s",
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/hfi1/trace_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TRACE_EVENT(hfi1_interrupt,
__array(char, buf, 64)
__field(int, src)
),
TP_fast_assign(DD_DEV_ASSIGN(dd)
TP_fast_assign(DD_DEV_ASSIGN(dd);
is_entry->is_name(__entry->buf, 64,
src - is_entry->start);
__entry->src = src;
Expand Down Expand Up @@ -100,7 +100,7 @@ TRACE_EVENT(hfi1_fault_opcode,
__field(u32, qpn)
__field(u8, opcode)
),
TP_fast_assign(DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
TP_fast_assign(DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->opcode = opcode;
),
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/hfi1/trace_rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ DECLARE_EVENT_CLASS(hfi1_rc_template,
__field(u32, r_psn)
),
TP_fast_assign(
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->s_flags = qp->s_flags;
__entry->psn = psn;
Expand Down Expand Up @@ -130,7 +130,7 @@ DECLARE_EVENT_CLASS(/* rc_ack */
__field(u32, lpsn)
),
TP_fast_assign(/* assign */
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->aeth = aeth;
__entry->psn = psn;
Expand Down
6 changes: 3 additions & 3 deletions drivers/infiniband/hw/hfi1/trace_tid.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ DECLARE_EVENT_CLASS(/* sender_info */
__field(u8, s_retry)
),
TP_fast_assign(/* assign */
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->state = qp->state;
__entry->s_cur = qp->s_cur;
Expand Down Expand Up @@ -1285,7 +1285,7 @@ DECLARE_EVENT_CLASS(/* rc_rcv_err */
__field(int, diff)
),
TP_fast_assign(/* assign */
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->s_flags = qp->s_flags;
__entry->state = qp->state;
Expand Down Expand Up @@ -1574,7 +1574,7 @@ DECLARE_EVENT_CLASS(/* tid_ack */
__field(u32, resync_psn)
),
TP_fast_assign(/* assign */
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->aeth = aeth;
__entry->psn = psn;
Expand Down
8 changes: 4 additions & 4 deletions drivers/infiniband/hw/hfi1/trace_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ DECLARE_EVENT_CLASS(hfi1_qpsleepwakeup_template,
__field(unsigned long, iow_flags)
),
TP_fast_assign(
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->flags = flags;
__entry->qpn = qp->ibqp.qp_num;
__entry->s_flags = qp->s_flags;
Expand Down Expand Up @@ -868,7 +868,7 @@ TRACE_EVENT(
__field(int, send_flags)
),
TP_fast_assign(
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->wqe = wqe;
__entry->wr_id = wqe->wr.wr_id;
__entry->qpn = qp->ibqp.qp_num;
Expand Down Expand Up @@ -904,7 +904,7 @@ DECLARE_EVENT_CLASS(
__field(bool, flag)
),
TP_fast_assign(
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device))
DD_DEV_ASSIGN(dd_from_ibdev(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->flag = flag;
),
Expand Down Expand Up @@ -952,7 +952,7 @@ DECLARE_EVENT_CLASS(/* AIP */
__field(u8, stopped)
),
TP_fast_assign(/* assign */
DD_DEV_ASSIGN(txq->priv->dd)
DD_DEV_ASSIGN(txq->priv->dd);
__entry->txq = txq;
__entry->sde = txq->sde;
__entry->head = txq->tx_ring.head;
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/sw/rdmavt/trace_cq.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ DECLARE_EVENT_CLASS(rvt_cq_template,
__field(int, comp_vector_cpu)
__field(u32, flags)
),
TP_fast_assign(RDI_DEV_ASSIGN(cq->rdi)
TP_fast_assign(RDI_DEV_ASSIGN(cq->rdi);
__entry->ip = cq->ip;
__entry->cqe = attr->cqe;
__entry->comp_vector = attr->comp_vector;
Expand Down Expand Up @@ -123,7 +123,7 @@ DECLARE_EVENT_CLASS(
__field(u32, imm)
),
TP_fast_assign(
RDI_DEV_ASSIGN(cq->rdi)
RDI_DEV_ASSIGN(cq->rdi);
__entry->wr_id = wc->wr_id;
__entry->status = wc->status;
__entry->opcode = wc->opcode;
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rdmavt/trace_mr.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TRACE_EVENT(
__field(uint, sg_offset)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(to_imr(ibmr)->mr.pd->device))
RDI_DEV_ASSIGN(ib_to_rvt(to_imr(ibmr)->mr.pd->device));
__entry->ibmr_iova = ibmr->iova;
__entry->iova = to_imr(ibmr)->mr.iova;
__entry->user_base = to_imr(ibmr)->mr.user_base;
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/sw/rdmavt/trace_qp.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DECLARE_EVENT_CLASS(rvt_qphash_template,
__field(u32, bucket)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->bucket = bucket;
),
Expand Down Expand Up @@ -97,7 +97,7 @@ DECLARE_EVENT_CLASS(
__field(u32, to)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->hrtimer = &qp->s_rnr_timer;
__entry->s_flags = qp->s_flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rdmavt/trace_rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ DECLARE_EVENT_CLASS(rvt_rc_template,
__field(u32, r_psn)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device));
__entry->qpn = qp->ibqp.qp_num;
__entry->s_flags = qp->s_flags;
__entry->psn = psn;
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/sw/rdmavt/trace_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ TRACE_EVENT(
__field(int, wr_num_sge)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device));
__entry->wqe = wqe;
__entry->wr_id = wqe->wr.wr_id;
__entry->qpn = qp->ibqp.qp_num;
Expand Down Expand Up @@ -170,7 +170,7 @@ TRACE_EVENT(
__field(int, send_flags)
),
TP_fast_assign(
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device))
RDI_DEV_ASSIGN(ib_to_rvt(qp->ibqp.device));
__entry->wqe = wqe;
__entry->wr_id = wqe->wr.wr_id;
__entry->qpn = qp->ibqp.qp_num;
Expand Down
6 changes: 3 additions & 3 deletions drivers/misc/mei/mei-trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TRACE_EVENT(mei_reg_read,
__field(u32, val)
),
TP_fast_assign(
__assign_str(dev, dev_name(dev))
__assign_str(dev, dev_name(dev));
__entry->reg = reg;
__entry->offs = offs;
__entry->val = val;
Expand All @@ -45,7 +45,7 @@ TRACE_EVENT(mei_reg_write,
__field(u32, val)
),
TP_fast_assign(
__assign_str(dev, dev_name(dev))
__assign_str(dev, dev_name(dev));
__entry->reg = reg;
__entry->offs = offs;
__entry->val = val;
Expand All @@ -64,7 +64,7 @@ TRACE_EVENT(mei_pci_cfg_read,
__field(u32, val)
),
TP_fast_assign(
__assign_str(dev, dev_name(dev))
__assign_str(dev, dev_name(dev));
__entry->reg = reg;
__entry->offs = offs;
__entry->val = val;
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TRACE_EVENT(otx2_msg_alloc,
__field(u16, id)
__field(u64, size)
),
TP_fast_assign(__assign_str(dev, pci_name(pdev))
TP_fast_assign(__assign_str(dev, pci_name(pdev));
__entry->id = id;
__entry->size = size;
),
Expand All @@ -36,7 +36,7 @@ TRACE_EVENT(otx2_msg_send,
__field(u16, num_msgs)
__field(u64, msg_size)
),
TP_fast_assign(__assign_str(dev, pci_name(pdev))
TP_fast_assign(__assign_str(dev, pci_name(pdev));
__entry->num_msgs = num_msgs;
__entry->msg_size = msg_size;
),
Expand All @@ -52,7 +52,7 @@ TRACE_EVENT(otx2_msg_check,
__field(u16, rspid)
__field(int, rc)
),
TP_fast_assign(__assign_str(dev, pci_name(pdev))
TP_fast_assign(__assign_str(dev, pci_name(pdev));
__entry->reqid = reqid;
__entry->rspid = rspid;
__entry->rc = rc;
Expand All @@ -69,8 +69,8 @@ TRACE_EVENT(otx2_msg_interrupt,
__string(str, msg)
__field(u64, intr)
),
TP_fast_assign(__assign_str(dev, pci_name(pdev))
__assign_str(str, msg)
TP_fast_assign(__assign_str(dev, pci_name(pdev));
__assign_str(str, msg);
__entry->intr = intr;
),
TP_printk("[%s] mbox interrupt %s (0x%llx)\n", __get_str(dev),
Expand All @@ -84,7 +84,7 @@ TRACE_EVENT(otx2_msg_process,
__field(u16, id)
__field(int, err)
),
TP_fast_assign(__assign_str(dev, pci_name(pdev))
TP_fast_assign(__assign_str(dev, pci_name(pdev));
__entry->id = id;
__entry->err = err;
),
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/fjes/fjes_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ TRACE_EVENT(fjes_hw_start_debug_err,
__string(err, err)
),
TP_fast_assign(
__assign_str(err, err)
__assign_str(err, err);
),
TP_printk("%s", __get_str(err))
);
Expand All @@ -258,7 +258,7 @@ TRACE_EVENT(fjes_hw_stop_debug_err,
__string(err, err)
),
TP_fast_assign(
__assign_str(err, err)
__assign_str(err, err);
),
TP_printk("%s", __get_str(err))
);
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/cdns3/cdnsp-trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ DECLARE_EVENT_CLASS(cdnsp_log_simple,
__string(text, msg)
),
TP_fast_assign(
__assign_str(text, msg)
__assign_str(text, msg);
),
TP_printk("%s", __get_str(text))
);
Expand Down
6 changes: 3 additions & 3 deletions fs/nfs/nfs4trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ TRACE_EVENT(nfs4_state_mgr,

TP_fast_assign(
__entry->state = clp->cl_state;
__assign_str(hostname, clp->cl_hostname)
__assign_str(hostname, clp->cl_hostname);
),

TP_printk(
Expand Down Expand Up @@ -1637,7 +1637,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_callback_event,
__entry->fileid = 0;
__entry->dev = 0;
}
__assign_str(dstaddr, clp ? clp->cl_hostname : "unknown")
__assign_str(dstaddr, clp ? clp->cl_hostname : "unknown");
),

TP_printk(
Expand Down Expand Up @@ -1694,7 +1694,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_callback_event,
__entry->fileid = 0;
__entry->dev = 0;
}
__assign_str(dstaddr, clp ? clp->cl_hostname : "unknown")
__assign_str(dstaddr, clp ? clp->cl_hostname : "unknown");
__entry->stateid_seq =
be32_to_cpu(stateid->seqid);
__entry->stateid_hash =
Expand Down
4 changes: 2 additions & 2 deletions fs/nfs/nfstrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -1431,8 +1431,8 @@ DECLARE_EVENT_CLASS(nfs_xdr_event,
__entry->version = task->tk_client->cl_vers;
__entry->error = error;
__assign_str(program,
task->tk_client->cl_program->name)
__assign_str(procedure, task->tk_msg.rpc_proc->p_name)
task->tk_client->cl_program->name);
__assign_str(procedure, task->tk_msg.rpc_proc->p_name);
),

TP_printk(
Expand Down
2 changes: 1 addition & 1 deletion include/trace/events/btrfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ TRACE_EVENT(btrfs_trigger_flush,
__entry->flags = flags;
__entry->bytes = bytes;
__entry->flush = flush;
__assign_str(reason, reason)
__assign_str(reason, reason);
),

TP_printk_btrfs("%s: flush=%d(%s) flags=%llu(%s) bytes=%llu",
Expand Down
4 changes: 2 additions & 2 deletions include/trace/events/dma_fence.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ DECLARE_EVENT_CLASS(dma_fence,
),

TP_fast_assign(
__assign_str(driver, fence->ops->get_driver_name(fence))
__assign_str(timeline, fence->ops->get_timeline_name(fence))
__assign_str(driver, fence->ops->get_driver_name(fence));
__assign_str(timeline, fence->ops->get_timeline_name(fence));
__entry->context = fence->context;
__entry->seqno = fence->seqno;
),
Expand Down
Loading

0 comments on commit 78c14b3

Please sign in to comment.