From: Damien Le Moal Date: Thu, 13 Oct 2022 08:30:34 +0000 (+0900) Subject: ata: sata_gemini: Remove dependency on OF for compile tests X-Git-Tag: v6.6.7~3942^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c4c900b7397365c1c1559fce90a50f1937921ee;p=platform%2Fkernel%2Flinux-starfive.git ata: sata_gemini: Remove dependency on OF for compile tests If CONFIG_OF is disabled, then using the macro of_match_ptr() results in the gemini_sata_of_match variable being unused, which generates a compilation warning and a compilation error if CONFIG_WERROR is enabled. Removing the use of this macro by directly assigning the gemini_sata_of_match match table to the .of_match_table field in the platform driver definition allows removing the dependency on OF for compile tests, thus improving compile test coverage. Fixes: f7220eac752f ("ata: Kconfig: fix sata gemini compile test condition") Signed-off-by: Damien Le Moal Reviewed-by: Linus Walleij --- diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 36833a8..37e0651 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -295,7 +295,7 @@ config SATA_FSL config SATA_GEMINI tristate "Gemini SATA bridge support" - depends on ARCH_GEMINI || (OF && COMPILE_TEST) + depends on ARCH_GEMINI || COMPILE_TEST select SATA_HOST default ARCH_GEMINI help diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c index b729e99..c42cc9b 100644 --- a/drivers/ata/sata_gemini.c +++ b/drivers/ata/sata_gemini.c @@ -421,7 +421,7 @@ static const struct of_device_id gemini_sata_of_match[] = { static struct platform_driver gemini_sata_driver = { .driver = { .name = DRV_NAME, - .of_match_table = of_match_ptr(gemini_sata_of_match), + .of_match_table = gemini_sata_of_match, }, .probe = gemini_sata_probe, .remove = gemini_sata_remove,