Commit cdd30eb
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def84 ("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>1 parent e70140b commit cdd30eb
File tree
876 files changed
+2189
-2196
lines changed- Documentation
- core-api
- translations
- it_IT/core-api
- zh_CN/core-api
- arch
- arm64/crypto
- powerpc/crypto
- s390/crypto
- x86/mm/pat
- crypto
- drivers
- accel
- habanalabs/common
- qaic
- acpi
- apei
- numa
- auxdisplay
- base/firmware_loader
- builtin
- cdx
- controller
- clk
- meson
- microchip
- sunxi-ng
- counter
- crypto
- inside-secure
- intel
- iaa
- qat
- qat_420xx
- qat_4xxx
- qat_c3xxxvf
- qat_c3xxx
- qat_c62xvf
- qat_c62x
- qat_common
- qat_dh895xccvf
- qat_dh895xcc
- marvell/octeontx2
- cxl
- core
- dax
- dma-buf
- dma/idxd
- firmware
- cirrus
- efi
- fpga
- gpio
- gpu/drm
- amd/amdgpu
- armada
- exynos
- i915
- gem
- gvt
- imagination
- omapdrm
- solomon
- tegra
- vmwgfx
- xe
- tests
- hid
- hwmon
- peci
- pmbus
- i2c
- busses
- iio
- accel
- adc
- addac
- afe
- buffer
- chemical
- common
- hid-sensors
- inv_sensors
- ms_sensors
- ssp_sensors
- st_sensors
- dac
- gyro
- humidity
- imu
- bmi160
- bmi270
- bmi323
- bno055
- inv_icm42600
- inv_mpu6050
- st_lsm6dsx
- st_lsm9ds0
- light
- magnetometer
- orientation
- position
- pressure
- proximity
- temperature
- test
- infiniband
- core
- hw/mana
- iommu
- arm/arm-smmu-v3
- iommufd
- leds
- flash
- mcb
- media
- common/videobuf2
- i2c
- pci/intel
- ipu3
- ipu6
- ivsc
- platform/nvidia/tegra-vde
- mfd
- misc
- mei
- net
- dsa
- ocelot
- realtek
- ethernet
- intel
- i40e
- iavf
- ice
- idpf
- libeth
- libie
- microsoft/mana
- wireless
- broadcom/brcm80211/brcmfmac
- bca
- cyw
- wcc
- intel/iwlwifi
- dvm
- mvm
- tests
- tests
- nvdimm
- nvme
- host
- target
- pci/pcie
- peci
- controller
- perf
- pinctrl/intel
- platform
- chrome
- x86
- amd/hsmp
- intel
- pmc
- pmt
- speed_select_if
- uncore-frequency
- powercap
- pwm
- reset
- amlogic
- rtc
- soundwire
- spi
- staging
- iio/accel
- media/atomisp/pci
- thermal
- intel
- int340x_thermal
- tty/serial
- 8250
- usb
- gadget/function
- host
- misc
- storage
- vfio
- cdx
- pci
- mlx5
- pds
- qat
- video/backlight
- virtio
- watchdog
- xen
- fs/efivarfs
- include
- kunit
- linux
- kernel
- module
- lib
- kunit
- mm/kasan
- net
- handshake
- mac80211/tests
- sunrpc/auth_gss
- wireless/tests
- samples/vfio-mdev
- scripts/coccinelle/misc
- security/apparmor
- sound
- hda
- pci/hda
- soc
- amd
- acp
- ps
- codecs
- intel
- boards
- common
- sdca
- sdw_utils
- sof
- amd
- imx
- intel
- mediatek
- mt8186
- mt8195
- xtensa
- tools/testing/cxl
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
876 files changed
+2189
-2196
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
1051 | | - | |
| 1051 | + | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | 1054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | | - | |
| 1171 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
0 commit comments