linux/drivers/crypto/marvell/octeontx2
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
..
Makefile crypto: octeontx2 - Fix objects shared between several modules 2023-02-14 13:39:33 +08:00
cn10k_cpt.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cn10k_cpt.h crypto: octeontx2 - add ctx_val workaround 2023-12-29 11:25:39 +08:00
otx2_cpt_common.h crypto: octeontx2 - support setting ctx ilen for inline CPT LF 2023-12-29 11:25:55 +08:00
otx2_cpt_devlink.c devlink: extend devlink_param *set pointer 2024-04-22 13:05:19 -07:00
otx2_cpt_devlink.h crypto: octeontx2 - parameters for custom engine groups 2021-12-11 16:49:17 +11:00
otx2_cpt_hw_types.h crypto: octeontx2 - support setting ctx ilen for inline CPT LF 2023-12-29 11:25:55 +08:00
otx2_cpt_mbox_common.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
otx2_cpt_reqmgr.h crypto: octeontx2 - add ctx_val workaround 2023-12-29 11:25:39 +08:00
otx2_cptlf.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
otx2_cptlf.h crypto: octeontx2 - support setting ctx ilen for inline CPT LF 2023-12-29 11:25:55 +08:00
otx2_cptpf.h crypto: octeontx2 - register error interrupts for inline cptlf 2023-12-29 11:25:55 +08:00
otx2_cptpf_main.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
otx2_cptpf_mbox.c crypto: octeontx2 - support setting ctx ilen for inline CPT LF 2023-12-29 11:25:55 +08:00
otx2_cptpf_ucode.c crypto: octeontx2 - update CPT inbound inline IPsec mailbox 2023-12-29 11:25:39 +08:00
otx2_cptpf_ucode.h crypto: octeontx2 - add SGv2 support for CN10KB or CN10KA B0 2023-12-29 11:25:38 +08:00
otx2_cptvf.h crypto: octeontx2 - add SGv2 support for CN10KB or CN10KA B0 2023-12-29 11:25:38 +08:00
otx2_cptvf_algs.c crypto: octeontx2 - Fix authenc setkey 2024-08-24 21:39:15 +08:00
otx2_cptvf_algs.h crypto: octeontx2 - add ctx_val workaround 2023-12-29 11:25:39 +08:00
otx2_cptvf_main.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
otx2_cptvf_mbox.c crypto: octeontx2 - add LF reset on queue disable 2023-12-29 11:25:38 +08:00
otx2_cptvf_reqmgr.c crypto: octeontx2 - add ctx_val workaround 2023-12-29 11:25:39 +08:00