Skip to contentSkip to conversation

iio: test: fix missing MODULE_LICENSE for IIO_RESCALE=m

PATCH Applied Liam Beguin 2 participants 2 messages Jun 1, 2022 – Jun 3, 2022 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: test: fix missing MODULE_LICENSE for IIO_RESCALE=m

When IIO_RESCALE_KUNIT_TEST=y and IIO_RESCALE=m, drivers/iio/afe/iio-rescale.o is built twice causing the MODULE_LICENSE() to be lost, as shown by:

ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o

Rework the build configuration to have the dependency specified in the Kconfig.

Fixes 8e74a48d17d5 ("iio: test: add basic tests for the iio-rescale driver")
---
 drivers/iio/test/Kconfig  | 2 +-
 drivers/iio/test/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/test/Kconfig +1 -1
index 56ca0ad7e77a..4c66c3f18c34 100644
@@ -6,7 +6,7 @@
 # Keep in alphabetical order
 config IIO_RESCALE_KUNIT_TEST
 	bool "Test IIO rescale conversion functions"
-	depends on KUNIT=y && !IIO_RESCALE
+	depends on KUNIT=y && IIO_RESCALE=y
 	default KUNIT_ALL_TESTS
 	help
 	  If you want to run tests on the iio-rescale code say Y here.
drivers/iio/test/Makefile +1 -1
index f15ae0a6394f..880360f8d02c 100644
@@ -4,6 +4,6 @@
 #
 
 # Keep in alphabetical order
-obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o ../afe/iio-rescale.o
+obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o
 obj-$(CONFIG_IIO_TEST_FORMAT) += iio-test-format.o
 CFLAGS_iio-test-format.o += $(DISABLE_STRUCTLEAK_PLUGIN)
Signature · 1 line
2.35.1.4.g5d01301f2b86
maintainer Applied
#1 lore raw
Quoted 9 lines · On Wed, 1 Jun 2022 10:21:38 -0400 Liam Beguin <[email protected]> wrote:

When IIO_RESCALE_KUNIT_TEST=y and IIO_RESCALE=m, drivers/iio/afe/iio-rescale.o is built twice causing the MODULE_LICENSE() to be lost, as shown by:

ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o

Rework the build configuration to have the dependency specified in the Kconfig.

Quoted 6 lines
Fixes 8e74a48d17d5 ("iio: test: add basic tests for the iio-rescale driver")

Applied to the fixes-togreg branch of iio.git.

Thanks all for chasing this down and coming up with a resolution.

Jonathan

Quoted 30 lines
---
 drivers/iio/test/Kconfig  | 2 +-
 drivers/iio/test/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/test/Kconfig +1 -1
index 56ca0ad7e77a..4c66c3f18c34 100644
@@ -6,7 +6,7 @@
 # Keep in alphabetical order
 config IIO_RESCALE_KUNIT_TEST
 	bool "Test IIO rescale conversion functions"
-	depends on KUNIT=y && !IIO_RESCALE
+	depends on KUNIT=y && IIO_RESCALE=y
 	default KUNIT_ALL_TESTS
 	help
 	  If you want to run tests on the iio-rescale code say Y here.
drivers/iio/test/Makefile +1 -1
index f15ae0a6394f..880360f8d02c 100644
@@ -4,6 +4,6 @@
 #
 
 # Keep in alphabetical order
-obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o ../afe/iio-rescale.o
+obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o
 obj-$(CONFIG_IIO_TEST_FORMAT) += iio-test-format.o
 CFLAGS_iio-test-format.o += $(DISABLE_STRUCTLEAK_PLUGIN)