]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-6.1/ata-sata_mv-fix-pci-device-id-table-declaration-comp.patch
6.1-stable patches
[thirdparty/kernel/stable-queue.git] / queue-6.1 / ata-sata_mv-fix-pci-device-id-table-declaration-comp.patch
CommitLineData
84b52de0
SL
1From fefbad93571e9ed3c39297c11fb7b7d582cc27cc Mon Sep 17 00:00:00 2001
2From: Sasha Levin <sashal@kernel.org>
3Date: Wed, 3 Apr 2024 10:06:48 +0200
4Subject: ata: sata_mv: Fix PCI device ID table declaration compilation warning
5
6From: Arnd Bergmann <arnd@arndb.de>
7
8[ Upstream commit 3137b83a90646917c90951d66489db466b4ae106 ]
9
10Building with W=1 shows a warning for an unused variable when CONFIG_PCI
11is diabled:
12
13drivers/ata/sata_mv.c:790:35: error: unused variable 'mv_pci_tbl' [-Werror,-Wunused-const-variable]
14static const struct pci_device_id mv_pci_tbl[] = {
15
16Move the table into the same block that containsn the pci_driver
17definition.
18
19Fixes: 7bb3c5290ca0 ("sata_mv: Remove PCI dependency")
20Signed-off-by: Arnd Bergmann <arnd@arndb.de>
21Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
22Signed-off-by: Sasha Levin <sashal@kernel.org>
23---
24 drivers/ata/sata_mv.c | 63 +++++++++++++++++++++----------------------
25 1 file changed, 31 insertions(+), 32 deletions(-)
26
27diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
28index 17f9062b0eaa5..9cf540017a5e5 100644
29--- a/drivers/ata/sata_mv.c
30+++ b/drivers/ata/sata_mv.c
31@@ -787,37 +787,6 @@ static const struct ata_port_info mv_port_info[] = {
32 },
33 };
34
35-static const struct pci_device_id mv_pci_tbl[] = {
36- { PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
37- { PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
38- { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
39- { PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
40- /* RocketRAID 1720/174x have different identifiers */
41- { PCI_VDEVICE(TTI, 0x1720), chip_6042 },
42- { PCI_VDEVICE(TTI, 0x1740), chip_6042 },
43- { PCI_VDEVICE(TTI, 0x1742), chip_6042 },
44-
45- { PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
46- { PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
47- { PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
48- { PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
49- { PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
50-
51- { PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
52-
53- /* Adaptec 1430SA */
54- { PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
55-
56- /* Marvell 7042 support */
57- { PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
58-
59- /* Highpoint RocketRAID PCIe series */
60- { PCI_VDEVICE(TTI, 0x2300), chip_7042 },
61- { PCI_VDEVICE(TTI, 0x2310), chip_7042 },
62-
63- { } /* terminate list */
64-};
65-
66 static const struct mv_hw_ops mv5xxx_ops = {
67 .phy_errata = mv5_phy_errata,
68 .enable_leds = mv5_enable_leds,
69@@ -4301,6 +4270,36 @@ static int mv_pci_init_one(struct pci_dev *pdev,
70 static int mv_pci_device_resume(struct pci_dev *pdev);
71 #endif
72
73+static const struct pci_device_id mv_pci_tbl[] = {
74+ { PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
75+ { PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
76+ { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
77+ { PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
78+ /* RocketRAID 1720/174x have different identifiers */
79+ { PCI_VDEVICE(TTI, 0x1720), chip_6042 },
80+ { PCI_VDEVICE(TTI, 0x1740), chip_6042 },
81+ { PCI_VDEVICE(TTI, 0x1742), chip_6042 },
82+
83+ { PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
84+ { PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
85+ { PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
86+ { PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
87+ { PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
88+
89+ { PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
90+
91+ /* Adaptec 1430SA */
92+ { PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
93+
94+ /* Marvell 7042 support */
95+ { PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
96+
97+ /* Highpoint RocketRAID PCIe series */
98+ { PCI_VDEVICE(TTI, 0x2300), chip_7042 },
99+ { PCI_VDEVICE(TTI, 0x2310), chip_7042 },
100+
101+ { } /* terminate list */
102+};
103
104 static struct pci_driver mv_pci_driver = {
105 .name = DRV_NAME,
106@@ -4313,6 +4312,7 @@ static struct pci_driver mv_pci_driver = {
107 #endif
108
109 };
110+MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
111
112 /**
113 * mv_print_info - Dump key info to kernel log for perusal.
114@@ -4485,7 +4485,6 @@ static void __exit mv_exit(void)
115 MODULE_AUTHOR("Brett Russ");
116 MODULE_DESCRIPTION("SCSI low-level driver for Marvell SATA controllers");
117 MODULE_LICENSE("GPL v2");
118-MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
119 MODULE_VERSION(DRV_VERSION);
120 MODULE_ALIAS("platform:" DRV_NAME);
121
122--
1232.43.0
124