linux-stable/drivers/iio
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
..
accel module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
adc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
addac module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
afe module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
amplifiers IIO: 1st set of fixes for the 6.12 cycle. 2024-10-13 17:23:47 +02:00
buffer module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cdc iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
chemical module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
common module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dac module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dummy iio: dummy: use specialized event code macros 2024-11-03 20:33:45 +00:00
filter drivers: iio: filter: admv8818: add bypass mode 2023-08-08 09:51:06 +01:00
frequency Merge 6.12-rc4 into char-misc-next 2024-10-21 08:42:22 +02:00
gyro module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
health move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
humidity module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
imu module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
light module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
magnetometer module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
multiplexer iio: multiplexer: Remove an unused field in struct mux 2024-05-27 09:48:56 +01:00
orientation module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
position module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
potentiometer iio: potentiometer: max5487: Drop ACPI_PTR() usage 2024-01-23 22:06:55 +00:00
potentiostat iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
pressure module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
proximity module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
resolver iio: resolver: ad2s1210: add missing select (TRIGGERED_)BUFFER in Kconfig 2024-10-06 16:30:38 +01:00
temperature module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
test module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
trigger iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
iio_core.h iio: Add iio_read_channel_label to inkern API 2024-06-28 20:06:56 +01:00
industrialio-acpi.c iio: acpi: Add iio_get_acpi_device_name_and_data() helper function 2024-10-28 20:04:11 +00:00
industrialio-backend.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
industrialio-buffer.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c iio: Add channel type for attention 2024-11-03 20:33:43 +00:00
industrialio-event.c iio: event: use sizeof(*pointer) instead of sizeof(type) 2024-06-13 19:19:23 +01:00
industrialio-gts-helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
industrialio-sw-device.c iio: Don't use bare "unsigned" 2022-07-01 11:19:08 +01:00
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-11-12 17:53:35 +00:00
industrialio-trigger.c iio: trigger: allow devices to suspend/resume theirs associated trigger 2024-08-10 11:19:36 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c IIO: 3rd set of fixes for the 6.12 cycle 2024-11-08 16:46:34 +01:00
Kconfig iio: core: Add new DMABUF interface infrastructure 2024-06-30 11:29:17 +01:00
Makefile iio: core: Add iio_read_acpi_mount_matrix() helper function 2024-04-29 20:53:25 +01:00
TODO iio: core: move 'mlock' to 'struct iio_dev_opaque' 2022-11-23 19:44:00 +00:00