pci.c: fix pci 32bit warning

pci/pci.c:863:66: warning: right shift count >= width of type [-Wshift-count-overflow]
  863 |       pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI, (mar >> 32));

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
wangyongrong 2024-04-23 19:32:42 +08:00 committed by Xiang Xiao
parent 97740fca2c
commit e4be747cf5

View file

@ -1154,7 +1154,8 @@ static int pci_enable_msi(FAR struct pci_device_s *dev, FAR int *irq,
if ((flags & PCI_MSI_FLAGS_64BIT) != 0)
{
pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI, (mar >> 32));
pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI,
((uint64_t)mar >> 32));
pci_write_config_dword(dev, msi + PCI_MSI_DATA_64, mdr);
}
else