提交 8a6f0b47 编写于 作者: V Valentin Rothberg 提交者: Linus Torvalds

lib: rename TEST_MODULE to TEST_LKM

The "_MODULE" suffix is reserved for tristates compiled as loadable kernel
modules (LKM).  The "TEST_MODULE" feature thereby violates this
convention.  The feature is used to compile the lib/test_module.c kernel
module.

Sadly this convention is not made explicit, but the Kconfig code documents
it.  The following code (./scripts/kconfig/confdata.c) is used to generate
the autoconf.h header file during the build process.  When a feature is
selected as a kernel module ('m'), it is suffixed with "_MODULE" to
indicate it.

	switch (*value) {
	case 'n':
		break;
	case 'm':
		suffix = "_MODULE";
		/* fall through */

This causes problems for static code analysis, which assumes a consistent
use of the "_MODULE" suffix.

This patch renames the feature and its reference in a Makefile to
"TEST_LKM", which still expresses the test of a LKM.
Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6de8ab68
...@@ -1648,7 +1648,7 @@ config DMA_API_DEBUG ...@@ -1648,7 +1648,7 @@ config DMA_API_DEBUG
If unsure, say N. If unsure, say N.
config TEST_MODULE config TEST_LKM
tristate "Test module loading with 'hello world' module" tristate "Test module loading with 'hello world' module"
default n default n
depends on m depends on m
......
...@@ -31,7 +31,7 @@ obj-y += string_helpers.o ...@@ -31,7 +31,7 @@ obj-y += string_helpers.o
obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
obj-y += kstrtox.o obj-y += kstrtox.o
obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
obj-$(CONFIG_TEST_MODULE) += test_module.o obj-$(CONFIG_TEST_LKM) += test_module.o
obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
obj-$(CONFIG_TEST_BPF) += test_bpf.o obj-$(CONFIG_TEST_BPF) += test_bpf.o
obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册