linux-stable/drivers/usb/misc
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
..
sisusbvga USB: sisusbvga: Add endpoint checks 2023-04-20 11:43:22 +02:00
adutux.c usb: misc: adutux: use swap() 2021-08-05 12:31:34 +02:00
apple-mfi-fastcharge.c USB: apple-mfi-fastcharge: Fix use after free in probe 2020-12-04 16:48:07 +01:00
appledisplay.c USB: appledisplay: close race between probe and completion handler 2024-09-13 07:54:23 +02:00
brcmstb-usb-pinmap.c usb: misc: brcmstb-usb-pinmap: fix module autoloading 2024-08-25 13:45:56 +02:00
chaoskey.c USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-10-13 14:02:47 +02:00
cypress_cy7c63.c USB: misc: cypress_cy7c63: check for short transfer 2024-09-13 07:54:50 +02:00
cytherm.c USB: misc: Remove unnecessary NULL values 2023-08-04 14:48:55 +02:00
ehset.c usb: misc: ehset: fix wrong if condition 2023-07-27 10:37:30 +02:00
emi26.c USB: misc: Remove redundant license text 2017-11-04 11:55:38 +01:00
emi62.c USB: misc: Remove redundant license text 2017-11-04 11:55:38 +01:00
ezusb.c usb: misc: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:24 +02:00
idmouse.c usb: idmouse: fix an uninit-value in idmouse_open 2022-09-27 10:37:09 +02:00
iowarrior.c usb: yurex: make waiting on yurex_write interruptible 2024-10-04 15:16:17 +02:00
isight_firmware.c usb: misc: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:24 +02:00
Kconfig usb: misc: onboard_usb_dev: introduce new config symbol for usb5744 SMBus support 2024-10-04 15:36:51 +02:00
ldusb.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
legousbtower.c USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
lvstest.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
Makefile usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
onboard_usb_dev_pdevs.c usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
onboard_usb_dev.c Merge 6.12-rc3 into usb-next 2024-10-14 08:03:44 +02:00
onboard_usb_dev.h usb: misc: onboard_dev: extend platform data to add power on delay field 2024-09-11 15:36:25 +02:00
qcom_eud.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
trancevibrator.c USB: trancevibrator: fix control-request direction 2021-05-21 20:10:43 +02:00
usb251xb.c of: remove internal arguments from of_property_for_each_u32() 2024-07-25 06:53:47 -05:00
usb3503.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
usb4604.c usb: misc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:18:57 +02:00
usb-ljca.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
usblcd.c USB: usblcd: Remove the superfluous break 2020-08-28 09:48:33 +02:00
usbsevseg.c USB: misc: Remove unnecessary NULL values 2023-08-04 14:48:55 +02:00
usbtest.c drivers/usb/misc: refactor min with min_t 2024-11-13 15:09:51 +01:00
uss720.c usb: misc: uss720: check for incompatible versions of the Belkin F5U002 2024-04-04 17:07:48 +02:00
yurex.c Merge 6.12-rc3 into usb-next 2024-10-14 08:03:44 +02:00