* [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks
@ 2026-05-26 4:40 Rosen Penev
2026-06-11 7:20 ` Manivannan Sadhasivam
2026-06-11 16:17 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2026-05-26 4:40 UTC (permalink / raw)
To: linux-pci
Cc: Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi, linusw,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas,
moderated list:PCI DRIVER FOR MVEBU (Marvell Armada 370 and Ar...),linusw@kernel.org,
open list
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.
Fixes this and similar warnings:
drivers/pci/controller/pci-mvebu.c:316:21: error: implicit conversion from
'unsigned long' to 'u32' (aka 'unsigned int') changes value from
18446744069414584320 to 0 [-Werror,-Wconstant-conversion]
316 | mvebu_writel(port, ~PCIE_INT_ALL_MASK, PCIE_INT_UNMASK_OFF);
Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
v2: remove sys_to_pcie change
drivers/pci/controller/pci-mvebu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index e568528bad85..f5a3f7370552 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)
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks
2026-05-26 4:40 [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks Rosen Penev
@ 2026-06-11 7:20 ` Manivannan Sadhasivam
2026-06-11 16:17 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-06-11 7:20 UTC (permalink / raw)
To: linux-pci, Rosen Penev
Cc: Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi, linusw,
Krzysztof Wilczyński, Rob Herring, Bjorn Helgaas,
linux-arm-kernel, linux-kernel
On Mon, 25 May 2026 21:40:16 -0700, Rosen Penev wrote:
> 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.
>
> Fixes this and similar warnings:
>
> drivers/pci/controller/pci-mvebu.c:316:21: error: implicit conversion from
> 'unsigned long' to 'u32' (aka 'unsigned int') changes value from
> 18446744069414584320 to 0 [-Werror,-Wconstant-conversion]
> 316 | mvebu_writel(port, ~PCIE_INT_ALL_MASK, PCIE_INT_UNMASK_OFF);
>
> [...]
Applied, thanks!
[1/1] PCI: mvebu: Use fixed-width interrupt masks
commit: c525508c1854e72b080b49e6ff7074913dc1905d
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks
2026-05-26 4:40 [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks Rosen Penev
2026-06-11 7:20 ` Manivannan Sadhasivam
@ 2026-06-11 16:17 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2026-06-11 16:17 UTC (permalink / raw)
To: Rosen Penev
Cc: linux-pci, Thomas Petazzoni, Pali Rohár, Lorenzo Pieralisi,
linusw, Krzysztof Wilczyński, Manivannan Sadhasivam,
Rob Herring, Bjorn Helgaas,
moderated list:PCI DRIVER FOR MVEBU (Marvell Armada 370 and Ar...),linusw@kernel.org,
open list
On Mon, May 25, 2026 at 09:40:16PM -0700, Rosen Penev wrote:
> 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.
>
> Fixes this and similar warnings:
>
> drivers/pci/controller/pci-mvebu.c:316:21: error: implicit conversion from
> 'unsigned long' to 'u32' (aka 'unsigned int') changes value from
> 18446744069414584320 to 0 [-Werror,-Wconstant-conversion]
> 316 | mvebu_writel(port, ~PCIE_INT_ALL_MASK, PCIE_INT_UNMASK_OFF);
>
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> v2: remove sys_to_pcie change
> drivers/pci/controller/pci-mvebu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
> index e568528bad85..f5a3f7370552 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)
This looks like something that could be an issue in dozens of drivers.
Is it? If so, I'd prefer to fix them all at once in a single patch
instead of a slow trickle.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-11 16:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 4:40 [PATCHv2] PCI: mvebu: Use fixed-width interrupt masks Rosen Penev
2026-06-11 7:20 ` Manivannan Sadhasivam
2026-06-11 16:17 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox