PCI: mvebu: Use fixed-width interrupt masks
Subsystems (3)
PATCH 1/1 PCI: mvebu: Use fixed-width interrupt masks
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.
--- drivers/pci/controller/pci-mvebu.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/pci/controller/pci-mvebu.c +3 -8
@@ -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)
Signature · 1 line
2.54.0
Manivannan Sadhasivam
maintainerQuoted 4 lines · Rosen Penev
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.
Can you share those warnings?
Quoted 3 lines
Drop the unused
sys_to_pcie()helper while touching the same area; it references stale ARMpci_sys_dataglue and has no callers.
This change has no relation to this patch. You should move it to a separate patch.
- Mani
Quoted 38 lines
Assisted-by Codex:GPT-5.5Signed-off-by Rosen Penev <[email protected]>--- drivers/pci/controller/pci-mvebu.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/pci/controller/pci-mvebu.c +3
-8@@ -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)Signature · 1 line
2.54.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்