linux/net/batman-adv
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
..
bat_algo.c
bat_algo.h
bat_iv_ogm.c batman-adv: Drop per algo GW section class code 2023-08-14 18:01:21 +02:00
bat_iv_ogm.h
bat_v_elp.c batman-adv: Do not get eth header before batadv_check_management_packet 2023-07-28 15:39:38 +02:00
bat_v_elp.h
bat_v_ogm.c batman-adv: Fix batadv_v_ogm_aggr_send memory leak 2023-08-09 17:33:03 +02:00
bat_v_ogm.h
bat_v.c batman-adv: Drop per algo GW section class code 2023-08-14 18:01:21 +02:00
bat_v.h
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: Switch to linux/sprintf.h 2023-11-14 08:16:34 +01:00
bridge_loop_avoidance.h batman-adv: Remove the repeated declaration 2021-05-30 13:38:27 +02:00
distributed-arp-table.c batman-adv: Return directly after a failed batadv_dat_select_candidates() in batadv_dat_forward_data() 2024-01-27 09:13:59 +01:00
distributed-arp-table.h
fragmentation.c batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
fragmentation.h
gateway_client.c batman-adv: Switch to linux/sprintf.h 2023-11-14 08:16:34 +01:00
gateway_client.h batman-adv: Check ptr for NULL before reducing its refcnt 2021-08-08 20:21:40 +02:00
gateway_common.c batman-adv: Drop per algo GW section class code 2023-08-14 18:01:21 +02:00
gateway_common.h batman-adv: Drop per algo GW section class code 2023-08-14 18:01:21 +02:00
hard-interface.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
hard-interface.h batman-adv: Check ptr for NULL before reducing its refcnt 2021-08-08 20:21:40 +02:00
hash.c
hash.h batman-adv: Fix spelling mistakes 2021-06-02 08:46:03 +02:00
Kconfig This feature/cleanup patchset is an updated version of the pull request 2021-02-08 11:32:40 -08:00
log.c isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
log.h
main.c genetlink: remove linux/genetlink.h 2024-04-01 21:44:34 -07:00
main.h batman-adv: Start new development cycle 2024-03-29 20:18:21 +01:00
Makefile batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
multicast_forw.c batman-adv: mcast: shrink tracker packet after scrubbing 2023-11-14 08:16:34 +01:00
multicast.c batman-adv: mcast: fix memory leak on deleting a batman-adv interface 2024-01-27 09:13:39 +01:00
multicast.h batman-adv: mcast: implement multicast packet generation 2023-11-14 08:16:34 +01:00
netlink.c genetlink: remove linux/genetlink.h 2024-04-01 21:44:34 -07:00
netlink.h batman-adv: Keep batadv_netlink_notify_* static 2023-08-14 18:01:21 +02:00
network-coding.c batman-adv: tvlv: prepare for tvlv enabled multicast packet type 2023-01-21 19:01:59 +01:00
network-coding.h
originator.c batman-adv: bypass empty buckets in batadv_purge_orig_ref() 2024-03-31 10:13:36 +02:00
originator.h batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
routing.c batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
routing.h batman-adv: mcast: implement multicast packet reception and forwarding 2023-11-14 08:16:34 +01:00
send.c batman-adv: Migrate to linux/container_of.h 2022-03-02 09:00:13 +01:00
send.h batman-adv: bcast: queue per interface, if needed 2021-05-17 12:00:44 +02:00
soft-interface.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
soft-interface.h batman-adv: Check ptr for NULL before reducing its refcnt 2021-08-08 20:21:40 +02:00
tp_meter.c batman-adv: Migrate to linux/container_of.h 2022-03-02 09:00:13 +01:00
tp_meter.h
trace.c
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
translation-table.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-11 14:23:47 -07:00
translation-table.h batman-adv: Check ptr for NULL before reducing its refcnt 2021-08-08 20:21:40 +02:00
tvlv.c batman-adv: tvlv: prepare for tvlv enabled multicast packet type 2023-01-21 19:01:59 +01:00
tvlv.h batman-adv: tvlv: prepare for tvlv enabled multicast packet type 2023-01-21 19:01:59 +01:00
types.h batman-adv: mcast: implement multicast packet generation 2023-11-14 08:16:34 +01:00