mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
RDMA/hns: Use named initializer for pci_device_id array
While being more verbose using a named initializer yields easier to understand code and doesn't rely on the two hidden zeros in the PCI_VDEVICE macro. While at it, also drop the explicit zero in the terminating entry. This doesn't introduce any changes to the compiled result of the array, which was confirmed on x86 and arm64. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20260507075437.2669363-2-u.kleine-koenig@baylibre.com Reviewed-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
c620705561
commit
cd31340419
|
|
@ -7303,16 +7303,30 @@ static const struct hns_roce_hw hns_roce_hw_v2 = {
|
|||
};
|
||||
|
||||
static const struct pci_device_id hns_roce_hw_v2_pci_tbl[] = {
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA), 0},
|
||||
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
|
||||
HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
|
||||
{
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA),
|
||||
.driver_data = 0,
|
||||
}, {
|
||||
PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
|
||||
.driver_data = HNAE3_DEV_SUPPORT_ROCE_DCB_BITS,
|
||||
},
|
||||
/* required last entry */
|
||||
{0, }
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, hns_roce_hw_v2_pci_tbl);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user