Skip to content

Commit e4be747

Browse files
wyr-7xiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent 97740fc commit e4be747

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pci/pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,8 @@ static int pci_enable_msi(FAR struct pci_device_s *dev, FAR int *irq,
11541154

11551155
if ((flags & PCI_MSI_FLAGS_64BIT) != 0)
11561156
{
1157-
pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI, (mar >> 32));
1157+
pci_write_config_dword(dev, msi + PCI_MSI_ADDRESS_HI,
1158+
((uint64_t)mar >> 32));
11581159
pci_write_config_dword(dev, msi + PCI_MSI_DATA_64, mdr);
11591160
}
11601161
else

0 commit comments

Comments
 (0)