mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] module cleanup (3/5)
Date: Wed, 07 Aug 2002 00:51:49 +0200	[thread overview]
Message-ID: <E17cDB7-0002v5-00@scrub.xs4all.nl> (raw)

Hi,

This patch removes __MODULE_STRING() in favour of __stringify().

diff -ur linux-2.5/include/linux/module.h linux-mod/include/linux/module.h
--- linux-2.5/include/linux/module.h	Thu Aug  1 16:43:07 2002
+++ linux-mod/include/linux/module.h	Thu Aug  1 14:41:01 2002
@@ -10,6 +10,7 @@
 #include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/list.h>
+#include <linux/stringify.h>
 
 #include <asm/atomic.h>
 
@@ -147,11 +141,6 @@
 	(mod_member_present((mod), can_unload) && (mod)->can_unload	\
 	 ? (mod)->can_unload() : atomic_read(&(mod)->uc.usecount))
 
-/* Indirect stringification.  */
-
-#define __MODULE_STRING_1(x)	#x
-#define __MODULE_STRING(x)	__MODULE_STRING_1(x)
-
 /* Generic inter module communication.
  *
  * NOTE: This interface is intended for small amounts of data that are
@@ -221,12 +210,12 @@
 #define MODULE_PARM(var,type)			\
 const char __module_parm_##var[]		\
 __attribute__((section(".modinfo"))) =		\
-"parm_" __MODULE_STRING(var) "=" type
+"parm_" __stringify(var) "=" type
 
 #define MODULE_PARM_DESC(var,desc)		\
 const char __module_parm_desc_##var[]		\
 __attribute__((section(".modinfo"))) =		\
-"parm_desc_" __MODULE_STRING(var) "=" desc
+"parm_desc_" __stringify(var) "=" desc
 
 /*
  * MODULE_DEVICE_TABLE exports information about devices
@@ -392,7 +394,7 @@
  *         #include <linux/modversions.h>
  *         
  *         #define EXPORT_SYMBOL(var) \
- *          __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var)))
+ *          __EXPORT_SYMBOL(var, __stringify(__VERSIONED_SYMBOL(var)))
  *
  *   The first two lines will in essence include
  *
@@ -468,17 +470,17 @@
 #define _set_ver(sym) sym
 #include <linux/modversions.h>
 
-#define EXPORT_SYMBOL(var)  __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var)))
-#define EXPORT_SYMBOL_GPL(var)  __EXPORT_SYMBOL(var, __MODULE_STRING(__VERSIONED_SYMBOL(var)))
+#define EXPORT_SYMBOL(var)  __EXPORT_SYMBOL(var, __stringify(__VERSIONED_SYMBOL(var)))
+#define EXPORT_SYMBOL_GPL(var)  __EXPORT_SYMBOL(var, __stringify(__VERSIONED_SYMBOL(var)))
 
 #else /* !defined (CONFIG_MODVERSIONS) || defined(MODULE) */
 
-#define EXPORT_SYMBOL(var)  __EXPORT_SYMBOL(var, __MODULE_STRING(var))
-#define EXPORT_SYMBOL_GPL(var)  __EXPORT_SYMBOL_GPL(var, __MODULE_STRING(var))
+#define EXPORT_SYMBOL(var)  __EXPORT_SYMBOL(var, __stringify(var))
+#define EXPORT_SYMBOL_GPL(var)  __EXPORT_SYMBOL_GPL(var, __stringify(var))
 
 #endif /* defined(CONFIG_MODVERSIONS) && !defined(MODULE) */
 
-#define EXPORT_SYMBOL_NOVERS(var)  __EXPORT_SYMBOL(var, __MODULE_STRING(var))
+#define EXPORT_SYMBOL_NOVERS(var)  __EXPORT_SYMBOL(var, __stringify(var))
 
 #endif /* __GENKSYMS__ */
 

             reply	other threads:[~2002-08-06 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-06 22:51 Roman Zippel [this message]
2002-08-07 23:50 ` Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17cDB7-0002v5-00@scrub.xs4all.nl \
    --to=zippel@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®