Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Drop obsolete dependencies on COMPILE_TEST

Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it
is possible to test-build any driver which depends on OF on any
architecture by explicitly selecting OF. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.

It is actually better to always build such drivers with OF enabled,
so that the test builds are closer to how each driver will actually be
built on its intended target. Building them without OF may not test
much as the compiler will optimize out potentially large parts of the
code. In the worst case, this could even pop false positive warnings.
Dropping COMPILE_TEST here improves the quality of our testing and
avoids wasting time on non-existent issues.

As a minor optimization, this also lets us drop of_match_ptr(), as we
now know what it will resolve to, we might as well save cpp some work.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Lee Jones <lee@kernel.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221122154134.58a7a18b@endymion.delvare

authored by

Jean Delvare and committed by
Lee Jones
96836a35 7ef5c577

+9 -9
+8 -8
drivers/mfd/Kconfig
··· 797 797 config MFD_MAX77620 798 798 bool "Maxim Semiconductor MAX77620 and MAX20024 PMIC Support" 799 799 depends on I2C=y 800 - depends on OF || COMPILE_TEST 800 + depends on OF 801 801 select MFD_CORE 802 802 select REGMAP_I2C 803 803 select REGMAP_IRQ ··· 812 812 config MFD_MAX77650 813 813 tristate "Maxim MAX77650/77651 PMIC Support" 814 814 depends on I2C 815 - depends on OF || COMPILE_TEST 815 + depends on OF 816 816 select MFD_CORE 817 817 select REGMAP_I2C 818 818 select REGMAP_IRQ ··· 827 827 config MFD_MAX77686 828 828 tristate "Maxim Semiconductor MAX77686/802 PMIC Support" 829 829 depends on I2C 830 - depends on OF || COMPILE_TEST 830 + depends on OF 831 831 select MFD_CORE 832 832 select REGMAP_I2C 833 833 select REGMAP_IRQ ··· 856 856 config MFD_MAX77714 857 857 tristate "Maxim Semiconductor MAX77714 PMIC Support" 858 858 depends on I2C 859 - depends on OF || COMPILE_TEST 859 + depends on OF 860 860 select MFD_CORE 861 861 select REGMAP_I2C 862 862 help ··· 1013 1013 config MFD_CPCAP 1014 1014 tristate "Support for Motorola CPCAP" 1015 1015 depends on SPI 1016 - depends on OF || COMPILE_TEST 1016 + depends on OF 1017 1017 select MFD_CORE 1018 1018 select REGMAP_SPI 1019 1019 select REGMAP_IRQ ··· 1038 1038 1039 1039 config MFD_NTXEC 1040 1040 tristate "Netronix embedded controller (EC)" 1041 - depends on OF || COMPILE_TEST 1041 + depends on OF 1042 1042 depends on I2C 1043 1043 select REGMAP_I2C 1044 1044 select MFD_CORE ··· 1234 1234 config MFD_SEC_CORE 1235 1235 tristate "Samsung Electronics PMIC Series Support" 1236 1236 depends on I2C=y 1237 - depends on OF || COMPILE_TEST 1237 + depends on OF 1238 1238 select MFD_CORE 1239 1239 select REGMAP_I2C 1240 1240 select REGMAP_IRQ ··· 2082 2082 config MFD_STMFX 2083 2083 tristate "Support for STMicroelectronics Multi-Function eXpander (STMFX)" 2084 2084 depends on I2C 2085 - depends on OF || COMPILE_TEST 2085 + depends on OF 2086 2086 select MFD_CORE 2087 2087 select REGMAP_I2C 2088 2088 help
+1 -1
drivers/mfd/motorola-cpcap.c
··· 294 294 struct cpcap_ddata *cpcap; 295 295 int ret; 296 296 297 - match = of_match_device(of_match_ptr(cpcap_of_match), &spi->dev); 297 + match = of_match_device(cpcap_of_match, &spi->dev); 298 298 if (!match) 299 299 return -ENODEV; 300 300