linux/drivers/dma-buf
Steven Rostedt (Google) 2c92ca849f tracing/treewide: Remove second parameter of __assign_str()
With the rework of how the __string() handles dynamic strings where it
saves off the source string in field in the helper structure[1], the
assignment of that value to the trace event field is stored in the helper
value and does not need to be passed in again.

This means that with:

  __string(field, mystring)

Which use to be assigned with __assign_str(field, mystring), no longer
needs the second parameter and it is unused. With this, __assign_str()
will now only get a single parameter.

There's over 700 users of __assign_str() and because coccinelle does not
handle the TRACE_EVENT() macro I ended up using the following sed script:

  git grep -l __assign_str | while read a ; do
      sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
      mv /tmp/test-file $a;
  done

I then searched for __assign_str() that did not end with ';' as those
were multi line assignments that the sed script above would fail to catch.

Note, the same updates will need to be done for:

  __assign_str_len()
  __assign_rel_str()
  __assign_rel_str_len()

I tested this with both an allmodconfig and an allyesconfig (build only for both).

[1] https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org/

Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts.
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #for
Acked-by: Rafael J. Wysocki <rafael@kernel.org> # for thermal
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>	# xfs
Tested-by: Guenter Roeck <linux@roeck-us.net>
2024-05-22 20:14:47 -04:00
..
heaps dma-buf: heaps: Don't track CMA dma-buf pages under RssFile 2024-01-31 19:54:58 +05:30
dma-buf-sysfs-stats.c dma-buf: Fix the typo in DMA-BUF statistics doc 2023-07-27 09:43:33 +02:00
dma-buf-sysfs-stats.h dma-buf: fix dma_buf_export init order v2 2022-12-13 08:31:45 +01:00
dma-buf.c dma-buf: Do not build debugfs related code when !CONFIG_DEBUG_FS 2024-04-15 13:56:32 -03:00
dma-fence-array.c dma-buf/fence-array: Add fence deadline support 2023-03-25 10:55:07 -07:00
dma-fence-chain.c dma-buf/fence-chain: Add fence deadline support 2023-03-28 13:38:52 -07:00
dma-fence-unwrap.c dma-buf: add dma_fence_timestamp helper 2023-10-05 11:05:58 +02:00
dma-fence.c dma-buf/dma-fence: fix spelling 2024-01-12 14:02:29 +01:00
dma-heap.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dma-resv.c Merge drm/drm-next into drm-misc-next 2024-01-29 14:20:23 +01:00
Kconfig
Makefile
selftest.c
selftest.h
selftests.h
st-dma-fence-chain.c dma-buf: Fix NULL pointer dereference in sanitycheck() 2024-03-20 10:15:45 +01:00
st-dma-fence-unwrap.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
st-dma-fence.c kthread: add kthread_stop_put 2023-10-04 10:41:57 -07:00
st-dma-resv.c dma-buf: Enable signaling on fence for selftests 2022-09-16 15:53:25 +02:00
sw_sync.c dma-buf/sw_sync: Add fence deadline support 2023-12-02 01:18:46 +02:00
sync_debug.c
sync_debug.h dma-buf/sw_sync: Add fence deadline support 2023-12-02 01:18:46 +02:00
sync_file.c dma-buf/sync_file: Add SET_DEADLINE ioctl 2023-12-02 01:17:48 +02:00
sync_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
udmabuf.c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00