* [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
@ 2021-06-18 16:02 Jon Hunter
2021-06-18 16:05 ` Jon Hunter
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jon Hunter @ 2021-06-18 16:02 UTC (permalink / raw)
To: Lorenzo Pieralisi, Bjorn Helgaas, Thierry Reding, Vidya Sagar
Cc: linux-pci, linux-tegra, Jon Hunter
The cppcheck tool issues the following warning for the Tegra194 PCIe
driver ...
$ 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);
^
The above warning occurs because the '1' is treated as a signed type
and so fix this by using the 'BIT' macro to ensure that this is defined
as a unsigned type.
Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index 8fc08336f76e..3c1feeab104f 100644
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
@@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
if (unlikely(irq > 31))
return -EINVAL;
- appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
+ appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-18 16:02 [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194 Jon Hunter
@ 2021-06-18 16:05 ` Jon Hunter
2021-06-18 23:04 ` Bjorn Helgaas
2021-06-23 15:23 ` Lorenzo Pieralisi
2 siblings, 0 replies; 8+ messages in thread
From: Jon Hunter @ 2021-06-18 16:05 UTC (permalink / raw)
To: Lorenzo Pieralisi, Bjorn Helgaas, Thierry Reding, Vidya Sagar
Cc: linux-pci, linux-tegra
On 18/06/2021 17:02, Jon Hunter wrote:
> The cppcheck tool issues the following warning for the Tegra194 PCIe
> driver ...
>
> $ 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);
> ^
> The above warning occurs because the '1' is treated as a signed type
> and so fix this by using the 'BIT' macro to ensure that this is defined
> as a unsigned type.
>
> Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
Looks like I messed up the format of the Fixes: tag and it should be ...
Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 8fc08336f76e..3c1feeab104f 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> if (unlikely(irq > 31))
> return -EINVAL;
>
> - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
>
> return 0;
> }
>
--
nvpublic
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-18 16:02 [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194 Jon Hunter
2021-06-18 16:05 ` Jon Hunter
@ 2021-06-18 23:04 ` Bjorn Helgaas
2021-06-23 8:52 ` Lorenzo Pieralisi
2021-06-24 23:01 ` Bjorn Helgaas
2021-06-23 15:23 ` Lorenzo Pieralisi
2 siblings, 2 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2021-06-18 23:04 UTC (permalink / raw)
To: Jon Hunter
Cc: Lorenzo Pieralisi, Bjorn Helgaas, Thierry Reding, Vidya Sagar,
linux-pci, linux-tegra
On Fri, Jun 18, 2021 at 05:02:19PM +0100, Jon Hunter wrote:
> The cppcheck tool issues the following warning for the Tegra194 PCIe
> driver ...
>
> $ 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);
> ^
> The above warning occurs because the '1' is treated as a signed type
> and so fix this by using the 'BIT' macro to ensure that this is defined
> as a unsigned type.
The subject and commit log should describe the problem we're fixing.
The *warning* is not the problem; the problem is the undefined
behavior.
I'll fix this up, no need to repost for this.
> Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 8fc08336f76e..3c1feeab104f 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> if (unlikely(irq > 31))
> return -EINVAL;
>
> - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
>
> return 0;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-18 23:04 ` Bjorn Helgaas
@ 2021-06-23 8:52 ` Lorenzo Pieralisi
2021-06-23 12:04 ` Bjorn Helgaas
2021-06-24 23:01 ` Bjorn Helgaas
1 sibling, 1 reply; 8+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-23 8:52 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jon Hunter, Bjorn Helgaas, Thierry Reding, Vidya Sagar,
linux-pci, linux-tegra
On Fri, Jun 18, 2021 at 06:04:28PM -0500, Bjorn Helgaas wrote:
> On Fri, Jun 18, 2021 at 05:02:19PM +0100, Jon Hunter wrote:
> > The cppcheck tool issues the following warning for the Tegra194 PCIe
> > driver ...
> >
> > $ 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);
> > ^
> > The above warning occurs because the '1' is treated as a signed type
> > and so fix this by using the 'BIT' macro to ensure that this is defined
> > as a unsigned type.
>
> The subject and commit log should describe the problem we're fixing.
> The *warning* is not the problem; the problem is the undefined
> behavior.
>
> I'll fix this up, no need to repost for this.
Hi Bjorn,
I can fix it up myself, just wanted to ask if you merged it already, it
does not look like but I thought I'd check.
Thanks,
Lorenzo
> > Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
> > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > ---
> > drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> > index 8fc08336f76e..3c1feeab104f 100644
> > --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> > @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> > if (unlikely(irq > 31))
> > return -EINVAL;
> >
> > - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> > + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
> >
> > return 0;
> > }
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-23 8:52 ` Lorenzo Pieralisi
@ 2021-06-23 12:04 ` Bjorn Helgaas
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2021-06-23 12:04 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Jon Hunter, Bjorn Helgaas, Thierry Reding, Vidya Sagar,
linux-pci, linux-tegra
On Wed, Jun 23, 2021 at 09:52:14AM +0100, Lorenzo Pieralisi wrote:
> On Fri, Jun 18, 2021 at 06:04:28PM -0500, Bjorn Helgaas wrote:
> > On Fri, Jun 18, 2021 at 05:02:19PM +0100, Jon Hunter wrote:
> > > The cppcheck tool issues the following warning for the Tegra194 PCIe
> > > driver ...
> > >
> > > $ 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);
> > > ^
> > > The above warning occurs because the '1' is treated as a signed type
> > > and so fix this by using the 'BIT' macro to ensure that this is defined
> > > as a unsigned type.
> >
> > The subject and commit log should describe the problem we're fixing.
> > The *warning* is not the problem; the problem is the undefined
> > behavior.
> >
> > I'll fix this up, no need to repost for this.
>
> Hi Bjorn,
>
> I can fix it up myself, just wanted to ask if you merged it already, it
> does not look like but I thought I'd check.
Oops, sorry, I guess I dropped the ball on this one and didn't get it
merged. When you do, can you update the subject as well, e.g.,
s/PCI: tegra/PCI: tegra194/
to differentiate from the other "tegra" driver?
> > > Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
> > > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > > ---
> > > drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> > > index 8fc08336f76e..3c1feeab104f 100644
> > > --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> > > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> > > @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> > > if (unlikely(irq > 31))
> > > return -EINVAL;
> > >
> > > - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> > > + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
> > >
> > > return 0;
> > > }
> > > --
> > > 2.25.1
> > >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-18 16:02 [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194 Jon Hunter
2021-06-18 16:05 ` Jon Hunter
2021-06-18 23:04 ` Bjorn Helgaas
@ 2021-06-23 15:23 ` Lorenzo Pieralisi
2 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-23 15:23 UTC (permalink / raw)
To: Bjorn Helgaas, Thierry Reding, Jon Hunter, Vidya Sagar
Cc: Lorenzo Pieralisi, linux-pci, linux-tegra
On Fri, 18 Jun 2021 17:02:19 +0100, Jon Hunter wrote:
> The cppcheck tool issues the following warning for the Tegra194 PCIe
> driver ...
>
> $ 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]
>
> [...]
Applied to pci/tegra, thanks!
[1/1] PCI: tegra194: Fix shiftTooManyBitsSigned warning for Tegra194
https://git.kernel.org/lpieralisi/pci/c/b1eca3a544
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-18 23:04 ` Bjorn Helgaas
2021-06-23 8:52 ` Lorenzo Pieralisi
@ 2021-06-24 23:01 ` Bjorn Helgaas
2021-06-25 9:08 ` Lorenzo Pieralisi
1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2021-06-24 23:01 UTC (permalink / raw)
To: Jon Hunter
Cc: Lorenzo Pieralisi, Bjorn Helgaas, Thierry Reding, Vidya Sagar,
linux-pci, linux-tegra
On Fri, Jun 18, 2021 at 06:04:28PM -0500, Bjorn Helgaas wrote:
> On Fri, Jun 18, 2021 at 05:02:19PM +0100, Jon Hunter wrote:
> > The cppcheck tool issues the following warning for the Tegra194 PCIe
> > driver ...
> >
> > $ 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);
> > ^
> > The above warning occurs because the '1' is treated as a signed type
> > and so fix this by using the 'BIT' macro to ensure that this is defined
> > as a unsigned type.
>
> The subject and commit log should describe the problem we're fixing.
> The *warning* is not the problem; the problem is the undefined
> behavior.
>
> I'll fix this up, no need to repost for this.
I merged this from Lorenzo's branch, but I updated the commit log like
this because the undefined behavior is the real problem:
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: c57247f940e8 ("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>
> > Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
> > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > ---
> > drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> > index 8fc08336f76e..3c1feeab104f 100644
> > --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> > @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> > if (unlikely(irq > 31))
> > return -EINVAL;
> >
> > - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> > + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
> >
> > return 0;
> > }
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194
2021-06-24 23:01 ` Bjorn Helgaas
@ 2021-06-25 9:08 ` Lorenzo Pieralisi
0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-25 9:08 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jon Hunter, Bjorn Helgaas, Thierry Reding, Vidya Sagar,
linux-pci, linux-tegra
On Thu, Jun 24, 2021 at 06:01:50PM -0500, Bjorn Helgaas wrote:
> On Fri, Jun 18, 2021 at 06:04:28PM -0500, Bjorn Helgaas wrote:
> > On Fri, Jun 18, 2021 at 05:02:19PM +0100, Jon Hunter wrote:
> > > The cppcheck tool issues the following warning for the Tegra194 PCIe
> > > driver ...
> > >
> > > $ 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);
> > > ^
> > > The above warning occurs because the '1' is treated as a signed type
> > > and so fix this by using the 'BIT' macro to ensure that this is defined
> > > as a unsigned type.
> >
> > The subject and commit log should describe the problem we're fixing.
> > The *warning* is not the problem; the problem is the undefined
> > behavior.
I updated the commit log accordingly but I did not change the
subject :-/
> > I'll fix this up, no need to repost for this.
>
> I merged this from Lorenzo's branch, but I updated the commit log like
> this because the undefined behavior is the real problem:
>
> PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift
Yep, I forgot to update the subject, thanks for doing that.
Lorenzo
>
> 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: c57247f940e8 ("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>
>
> > > Fixes: c57247f940e8 PCI: tegra: Add support for PCIe endpoint mode in Tegra194
> > > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > > ---
> > > drivers/pci/controller/dwc/pcie-tegra194.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> > > index 8fc08336f76e..3c1feeab104f 100644
> > > --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> > > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> > > @@ -1826,7 +1826,7 @@ static int tegra_pcie_ep_raise_msi_irq(struct tegra_pcie_dw *pcie, u16 irq)
> > > if (unlikely(irq > 31))
> > > return -EINVAL;
> > >
> > > - appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1);
> > > + appl_writel(pcie, BIT(irq), APPL_MSI_CTRL_1);
> > >
> > > return 0;
> > > }
> > > --
> > > 2.25.1
> > >
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-06-25 9:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 16:02 [PATCH] PCI: tegra: Fix shiftTooManyBitsSigned warning for Tegra194 Jon Hunter
2021-06-18 16:05 ` Jon Hunter
2021-06-18 23:04 ` Bjorn Helgaas
2021-06-23 8:52 ` Lorenzo Pieralisi
2021-06-23 12:04 ` Bjorn Helgaas
2021-06-24 23:01 ` Bjorn Helgaas
2021-06-25 9:08 ` Lorenzo Pieralisi
2021-06-23 15:23 ` Lorenzo Pieralisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).