Re: [PATCH] treewide: Add missing semicolons to __assign_str uses
On Fri, Jun 04, 2021 at 12:38:07PM -0700, Joe Perches wrote: > 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. Acked-by: Jason Gunthorpe Jason
[PATCH] treewide: Add missing semicolons to __assign_str uses
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/1e068d21106bb6db05b735b4916bb420e6c9842a.ca...@perches.com/ Signed-off-by: Joe Perches --- Resending without all the direct cc's, only the mailing lists as it seems not to have gone through via vger. Compiled x84-64 allyesconfig On Fri, 2021-06-04 at 12:21 -0400, Steven Rostedt wrote: > I have no problem taking a clean up patch that adds semicolons to all > use cases of "__assign_str()" and ever remove the one from where it is > defined. As long as it doesn't break any builds, I'm fine with that. Removing the semicolon from the macro definition is left for another patch. drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 14 drivers/gpu/drm/lima/lima_trace.h | 2 +- drivers/infiniband/hw/hfi1/trace_misc.h| 4 +-- drivers/infiniband/hw/hfi1/trace_rc.h | 4 +-- drivers/infiniband/hw/hfi1/trace_tid.h | 6 ++-- drivers/infiniband/hw/hfi1/trace_tx.h | 8 ++--- drivers/infiniband/sw/rdmavt/trace_cq.h| 4 +-- drivers/infiniband/sw/rdmavt/trace_mr.h| 2 +- drivers/infiniband/sw/rdmavt/trace_qp.h| 4 +-- drivers/infiniband/sw/rdmavt/trace_rc.h| 2 +- drivers/infiniband/sw/rdmavt/trace_tx.h| 4 +-- drivers/misc/mei/mei-trace.h | 6 ++-- .../net/ethernet/marvell/octeontx2/af/rvu_trace.h | 12 +++ drivers/net/fjes/fjes_trace.h | 4 +-- drivers/usb/cdns3/cdnsp-trace.h| 2 +- fs/nfs/nfs4trace.h | 6 ++-- fs/nfs/nfstrace.h | 4 +-- include/trace/events/btrfs.h | 2 +- include/trace/events/dma_fence.h | 4 +-- include/trace/events/rpcgss.h | 4 +-- include/trace/events/sunrpc.h | 40 +++--- net/mac80211/trace.h | 2 +- 22 files changed, 70 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index 0527772fe1b80..d855cb53c7e09 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h @@ -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", @@ -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", @@ -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; @@ -424,7 +424,7 @@ TRACE_EVENT(amdgpu_vm_flush,
[PATCH] treewide: Add missing semicolons to __assign_str uses
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/1e068d21106bb6db05b735b4916bb420e6c9842a.ca...@perches.com/ Signed-off-by: Joe Perches --- Compiled x84-64 allyesconfig On Fri, 2021-06-04 at 12:21 -0400, Steven Rostedt wrote: > I have no problem taking a clean up patch that adds semicolons to all > use cases of "__assign_str()" and ever remove the one from where it is > defined. As long as it doesn't break any builds, I'm fine with that. Removing the semicolon from the macro definition is left for another patch. drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 14 drivers/gpu/drm/lima/lima_trace.h | 2 +- drivers/infiniband/hw/hfi1/trace_misc.h| 4 +-- drivers/infiniband/hw/hfi1/trace_rc.h | 4 +-- drivers/infiniband/hw/hfi1/trace_tid.h | 6 ++-- drivers/infiniband/hw/hfi1/trace_tx.h | 8 ++--- drivers/infiniband/sw/rdmavt/trace_cq.h| 4 +-- drivers/infiniband/sw/rdmavt/trace_mr.h| 2 +- drivers/infiniband/sw/rdmavt/trace_qp.h| 4 +-- drivers/infiniband/sw/rdmavt/trace_rc.h| 2 +- drivers/infiniband/sw/rdmavt/trace_tx.h| 4 +-- drivers/misc/mei/mei-trace.h | 6 ++-- .../net/ethernet/marvell/octeontx2/af/rvu_trace.h | 12 +++ drivers/net/fjes/fjes_trace.h | 4 +-- drivers/usb/cdns3/cdnsp-trace.h| 2 +- fs/nfs/nfs4trace.h | 6 ++-- fs/nfs/nfstrace.h | 4 +-- include/trace/events/btrfs.h | 2 +- include/trace/events/dma_fence.h | 4 +-- include/trace/events/rpcgss.h | 4 +-- include/trace/events/sunrpc.h | 40 +++--- net/mac80211/trace.h | 2 +- 22 files changed, 70 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index 0527772fe1b80..d855cb53c7e09 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h @@ -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", @@ -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", @@ -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; @@ -424,7 +424,7 @@ TRACE_EVENT(amdgpu_vm_flush, ), TP_fast_assign( - __assign_str(ring, ring->name) +