Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321635
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Duplicated module names |
| Date | 2016-01-29 11:30 +0100 |
| Message-ID | <qWets-1lS-9@gated-at.bofh.it> (permalink) |
| References | <qWaga-6C8-15@gated-at.bofh.it> |
| Organization | Core |
Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> I think we could rename it to crypto_crc32, but I don't think it's the
> only one. Marco, I think depmod should probably FAIL if two modules
> have the same name, which would at least find such problems.
This patch renames it to crc32_generic.
---8<---
Subject: crypto: crc32 - Rename generic implementation
The generic crc32 implementation is currently called crc32. This
is a problem because it clashes with the lib implementation of crc32.
This patch renames the crypto crc32 to crc32_generic so that it is
consistent with crc32c. An alias for the driver is also added.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/crypto/Makefile b/crypto/Makefile
index ffe18c9..059de1b 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -100,7 +100,7 @@ obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o
-obj-$(CONFIG_CRYPTO_CRC32) += crc32.o
+obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o
obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o
obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
obj-$(CONFIG_CRYPTO_LZO) += lzo.o
diff --git a/crypto/crc32.c b/crypto/crc32_generic.c
similarity index 98%
rename from crypto/crc32.c
rename to crypto/crc32_generic.c
index 187ded2..aa2a25f 100644
--- a/crypto/crc32.c
+++ b/crypto/crc32_generic.c
@@ -131,7 +131,7 @@ static struct shash_alg alg = {
.digestsize = CHKSUM_DIGEST_SIZE,
.base = {
.cra_name = "crc32",
- .cra_driver_name = "crc32-table",
+ .cra_driver_name = "crc32-generic",
.cra_priority = 100,
.cra_blocksize = CHKSUM_BLOCK_SIZE,
.cra_ctxsize = sizeof(u32),
@@ -157,3 +157,4 @@ MODULE_AUTHOR("Alexander Boyko <alexander_boyko@xyratex.com>");
MODULE_DESCRIPTION("CRC32 calculations wrapper for lib/crc32");
MODULE_LICENSE("GPL");
MODULE_ALIAS_CRYPTO("crc32");
+MODULE_ALIAS_CRYPTO("crc32-generic");
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: modinfo crc32 broken after fd44a98ae2eb Lucas De Marchi <lucas.de.marchi@gmail.com> - 2016-01-29 02:40 +0100
Duplicated module names Rusty Russell <rusty@rustcorp.com.au> - 2016-01-29 07:00 +0100
Re: Duplicated module names Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-01-29 08:10 +0100
Re: Duplicated module names Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-29 11:30 +0100
Re: Duplicated module names Sudeep Holla <sudeep.holla@arm.com> - 2016-01-29 17:00 +0100
Re: Duplicated module names Lucas De Marchi <lucas.de.marchi@gmail.com> - 2016-01-29 20:10 +0100
csiph-web