Skip to content

Commit 17cc1ee

Browse files
author
Damien Le Moal
committed
ata: ahci_st: Fix compilation warning
If CONFIG_OF is disabled and the ahci_st driver is builtin (or CONFIG_MODULES is disabled), then using the macro of_match_ptr() results in the st_ahci_match variable being unused, which generates a compilation warning and a compilation error if CONFIG_WERROR is enabled. Fix this by directly assigning st_ahci_match to .of_match_table in the st_ahci_driver platform driver definition. Reported-by: kernel test robot <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
1 parent 1e41e69 commit 17cc1ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/ahci_st.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
236236
.driver = {
237237
.name = DRV_NAME,
238238
.pm = &st_ahci_pm_ops,
239-
.of_match_table = of_match_ptr(st_ahci_match),
239+
.of_match_table = st_ahci_match,
240240
},
241241
.probe = st_ahci_probe,
242242
.remove = ata_platform_remove_one,

0 commit comments

Comments
 (0)