linux/drivers/pci/controller/dwc
Jon Hunter f67092eff2 PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift
tegra_pcie_ep_raise_msi_irq() shifted a signed 32-bit value left by 31
bits.  The behavior of this is implementation-defined.

Replace the shift by BIT(), which is well-defined.

Found by cppcheck:

  $ cppcheck --enable=all drivers/pci/controller/dwc/pcie-tegra194.c
  Checking drivers/pci/controller/dwc/pcie-tegra194.c ...

  drivers/pci/controller/dwc/pcie-tegra194.c:1829:23: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1826.  [shiftTooManyBitsSigned]

  appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
                     ^

[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20210618160219.303092-1-jonathanh@nvidia.com
Fixes: c57247f940 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2021-06-28 18:26:46 -05:00
..
Kconfig Merge branch 'remotes/lorenzo/pci/tegra' 2021-05-04 10:43:29 -05:00
Makefile Merge branch 'pci/tegra' 2021-05-04 10:43:32 -05:00
pci-dra7xx.c PCI: pci-dra7xx: Prepare for deferred probe with module_platform_driver 2021-03-10 14:01:00 +02:00
pci-exynos.c PCI: dwc: exynos: Rework the driver to support Exynos5433 variant 2020-12-01 10:22:30 +00:00
pci-imx6.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pci-keystone.c Merge branch 'remotes/lorenzo/pci/dwc' 2021-05-04 10:43:26 -05:00
pci-layerscape-ep.c PCI: layerscape: Correct syntax by changing comma to semicolon 2021-03-22 17:24:19 +00:00
pci-layerscape.c PCI: layerscape: Convert to builtin_platform_driver() 2021-02-24 11:08:48 -06:00
pci-meson.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-al.c PCI: al: Remove useless dw_pcie_ops 2021-02-24 11:09:50 -06:00
pcie-armada8k.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-artpec6.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-designware-ep.c PCI: dwc: Move iATU detection earlier 2021-04-29 17:05:59 +01:00
pcie-designware-host.c PCI: dwc: Move iATU detection earlier 2021-04-29 17:05:59 +01:00
pcie-designware-plat.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-designware.c PCI: dwc: Move iATU detection earlier 2021-04-29 17:05:59 +01:00
pcie-designware.h PCI: dwc: Move iATU detection earlier 2021-04-29 17:05:59 +01:00
pcie-fu740.c PCI: fu740: Add SiFive FU740 PCIe host controller driver 2021-05-04 14:58:22 +01:00
pcie-hisi.c PCI: Unify ECAM constants in native PCI Express drivers 2020-12-10 14:55:49 -06:00
pcie-histb.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-intel-gw.c PCI: dwc/intel-gw: Remove unused function 2021-04-29 17:05:59 +01:00
pcie-kirin.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-qcom.c PCI: qcom: Use PHY_REFCLK_USE_PAD only for ipq8064 2021-02-24 14:38:49 -06:00
pcie-spear13xx.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-tegra194.c PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift 2021-06-28 18:26:46 -05:00
pcie-uniphier-ep.c PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code 2020-11-19 10:51:40 +00:00
pcie-uniphier.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00