linux-stable/drivers/net/dsa
Peter Zijlstra cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
b53 net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
hirschmann net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
microchip net: dsa: microchip: Add LAN9646 switch support to KSZ DSA driver 2024-11-13 19:54:58 -08:00
mv88e6xxx net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
ocelot module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
qca dsa: qca8k: Use nested lock to avoid splat 2024-11-12 18:25:30 -08:00
realtek module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sja1105 net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
xrs700x net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2_cfp.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2.h net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
dsa_loop_bdinfo.c net: fill in MODULE_DESCRIPTION()s for dsa_loop_bdinfo 2024-02-09 14:12:02 -08:00
dsa_loop.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
dsa_loop.h
Kconfig net: dsa: vsc73xx: Implement the tag_8021q VLAN operations 2024-07-15 06:55:15 -07:00
lan9303_i2c.c net: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-26 07:28:08 -07:00
lan9303_mdio.c dsa: lan9303: consistent naming for PHY address parameter 2024-07-15 08:49:59 -07:00
lan9303-core.c net: dsa: lan9303: ensure chip reset and wait for READY status 2024-10-07 16:38:02 -07:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530-mdio: read PHY address of switch from device tree 2024-04-23 10:32:40 +02:00
mt7530-mmio.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
mt7530.c net: dsa: mt7530: Add TBF qdisc offload support 2024-11-03 12:53:42 -08:00
mt7530.h net: dsa: mt7530: Add TBF qdisc offload support 2024-11-03 12:53:42 -08:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: fix reception from VLAN-unaware bridges 2024-10-15 18:41:52 -07:00
vitesse-vsc73xx-platform.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: implement FDB operations 2024-09-03 10:22:58 +02:00