* [PATCH] PCI: mvebu: Use fixed-width interrupt masks
@ 2026-05-12 20:44 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-05-12 20:44 UTC (permalink / raw)
To: linux-pci
Cc: Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas
Use u32-typed BIT and GENMASK helpers for PCIe interrupt register
masks. This keeps inverted masks in the same width as the registers
and avoids truncation warnings on 64-bit compile-test builds.
Drop the unused sys_to_pcie() helper while touching the same area; it
references stale ARM pci_sys_data glue and has no callers.
Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/pci/controller/pci-mvebu.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index e568528bad85..da43661792e8 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -57,9 +57,9 @@
#define PCIE_CONF_DATA_OFF 0x18fc
#define PCIE_INT_CAUSE_OFF 0x1900
#define PCIE_INT_UNMASK_OFF 0x1910
-#define PCIE_INT_INTX(i) BIT(24+i)
-#define PCIE_INT_PM_PME BIT(28)
-#define PCIE_INT_ALL_MASK GENMASK(31, 0)
+#define PCIE_INT_INTX(i) BIT_U32(24 + (i))
+#define PCIE_INT_PM_PME BIT_U32(28)
+#define PCIE_INT_ALL_MASK GENMASK_U32(31, 0)
#define PCIE_CTRL_OFF 0x1a00
#define PCIE_CTRL_X1_MODE 0x0001
#define PCIE_CTRL_RC_MODE BIT(1)
@@ -950,11 +950,6 @@ static int mvebu_pci_bridge_emul_init(struct mvebu_pcie_port *port)
return pci_bridge_emul_init(bridge, bridge_flags);
}
-static inline struct mvebu_pcie *sys_to_pcie(struct pci_sys_data *sys)
-{
- return sys->private_data;
-}
-
static struct mvebu_pcie_port *mvebu_pcie_find_port(struct mvebu_pcie *pcie,
struct pci_bus *bus,
int devfn)
--
2.54.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-12 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 20:44 [PATCH] PCI: mvebu: Use fixed-width interrupt masks Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox