This is an automated email from the ASF dual-hosted git repository. raiden00 pushed a commit to branch releases/12.7 in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 7f4f7f293ddaecec30b4337eaf84a0668749daac Author: wangyongrong <[email protected]> AuthorDate: Tue Apr 23 19:32:42 2024 +0800 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]> --- drivers/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index cd6eef64fa..1e9aa63d3d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -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
