linux/sound/hda
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
..
ext ALSA: hda: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:42 +02:00
array.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
hda_bus_type.c ALSA: mark all struct bus_type as const 2023-12-30 10:10:41 +01:00
hdac_bus.c ALSA: hda: Skip event processing for unregistered codecs 2022-07-15 16:26:50 +02:00
hdac_component.c ALSA: hda/i915 - fix list corruption with concurrent probes 2020-10-09 16:46:04 +02:00
hdac_controller.c ALSA: hda: hdac_controller: Implement support for use_pio_for_commands mode 2024-04-18 08:38:54 +02:00
hdac_device.c PM: runtime: Simplify pm_runtime_get_if_active() usage 2024-02-12 16:57:47 +01:00
hdac_i915.c ALSA: hda: Skip i915 initialization on CNL/LKF-based platforms 2024-03-04 09:17:02 +01:00
hdac_regmap.c ALSA: hda: Use regcache_reg_cached() rather than open coding 2023-07-18 15:05:12 +01:00
hdac_stream.c ALSA: hda: Downgrade BDL table overflow message 2024-02-21 11:14:16 +01:00
hdac_sysfs.c ALSA: hda: make kobj_type structure constant 2023-02-11 09:37:42 +01:00
hdmi_chmap.c ALSA: hda: Replace runtime->status->state reference to runtime->state 2022-09-27 08:47:33 +02:00
intel-dsp-config.c Merge branch 'topic/hda-nhlt' into for-next 2024-05-09 20:23:32 +02:00
intel-nhlt.c ALSA: hda: intel-nhlt: add intel_nhlt_ssp_device_type() function 2024-03-22 12:40:46 +01:00
intel-sdw-acpi.c ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() 2024-04-29 17:32:27 +02:00
Kconfig ALSA: hda: intel-dsp-config: Switch to ACPI NHLT 2024-05-09 20:23:22 +02:00
local.h ALSA: hda: Unexport some local helper functions 2020-05-16 08:29:49 +02:00
Makefile ALSA: hda: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:42 +02:00
trace.c ALSA: hda - Re-add tracepoints to HD-audio core driver 2015-03-23 13:17:58 +01:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00