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 Mateusz Szafoni
parent e33bdd9e38
commit 7f4f7f293d

View File

@ -1146,7 +1146,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