Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andres Salomon <dilinger@queued.net>,
	linux-geode@lists.infradead.org, Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org,
	Christian Gromm <christian.gromm@microchip.com>,
	Krzysztof Halasa <khc@pm.waw.pl>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Martin Schiller <ms@dev.tdt.de>,
	linux-x25@vger.kernel.org, wireguard@lists.zx2c4.com
Subject: [PATCH 6/6 v2] wireguard: main: rename 'mod_init' & 'mod_exit' functions to be module-specific
Date: Sun, 11 Jul 2021 15:31:48 -0700
Message-ID: <20210711223148.5250-7-rdunlap@infradead.org> (raw)
In-Reply-To: <20210711223148.5250-1-rdunlap@infradead.org>

Rename module_init & module_exit functions that are named
"mod_init" and "mod_exit" so that they are unique in both the
System.map file and in initcall_debug output instead of showing
up as almost anonymous "mod_init".

This is helpful for debugging and in determining how long certain
module_init calls take to execute.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: wireguard@lists.zx2c4.com
Cc: netdev@vger.kernel.org
---
v2: change Subject: prefixes and function names (thanks, Jason)

 drivers/net/wireguard/main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20210708.orig/drivers/net/wireguard/main.c
+++ linux-next-20210708/drivers/net/wireguard/main.c
@@ -17,7 +17,7 @@
 #include <linux/genetlink.h>
 #include <net/rtnetlink.h>
 
-static int __init mod_init(void)
+static int __init wg_mod_init(void)
 {
 	int ret;
 
@@ -60,7 +60,7 @@ err_allowedips:
 	return ret;
 }
 
-static void __exit mod_exit(void)
+static void __exit wg_mod_exit(void)
 {
 	wg_genetlink_uninit();
 	wg_device_uninit();
@@ -68,8 +68,8 @@ static void __exit mod_exit(void)
 	wg_allowedips_slab_uninit();
 }
 
-module_init(mod_init);
-module_exit(mod_exit);
+module_init(wg_mod_init);
+module_exit(wg_mod_exit);
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("WireGuard secure network tunnel");
 MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");

  parent reply	other threads:[~2021-07-11 23:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-11 22:31 [PATCH 0/6 v2] treewide: " Randy Dunlap
2021-07-11 22:31 ` [PATCH 2/6 v2] hw_random: " Randy Dunlap
2021-07-11 22:31 ` [PATCH 3/6 v2] lib: crypto: " Randy Dunlap
2021-07-11 22:31 ` [PATCH 4/6 v2] MOST: cdev: " Randy Dunlap
2021-07-11 22:31 ` [PATCH 5/6 v2] net: hdlc: " Randy Dunlap
2021-07-11 22:31 ` Randy Dunlap [this message]
2021-08-08 20:22   ` [PATCH 6/6 v2] wireguard: main: " Jason A. Donenfeld

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=20210711223148.5250-7-rdunlap@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=Jason@zx2c4.com \
    --cc=arnd@arndb.de \
    --cc=christian.gromm@microchip.com \
    --cc=davem@davemloft.net \
    --cc=dilinger@queued.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=khc@pm.waw.pl \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-geode@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mpm@selenic.com \
    --cc=ms@dev.tdt.de \
    --cc=netdev@vger.kernel.org \
    --cc=wireguard@lists.zx2c4.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

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git