Hi, On 02/01/2019 18:28, Andrey Smirnov wrote: > On Wed, Dec 26, 2018 at 7:19 AM Gustavo Pimentel > <[email protected]> wrote: >> >> Hi, >> >> On 21/12/2018 07:27, Andrey Smirnov wrote: >>> Avoid using explicit left shifts and convert various definitions to >>> use BIT() instead. No functional change intended. >>> >>> Cc: Lorenzo Pieralisi <[email protected]> >>> Cc: Bjorn Helgaas <[email protected]> >>> Cc: Fabio Estevam <[email protected]> >>> Cc: Chris Healy <[email protected]> >>> Cc: Lucas Stach <[email protected]> >>> Cc: Leonard Crestez <[email protected]> >>> Cc: "A.s. Dong" <[email protected]> >>> Cc: Richard Zhu <[email protected]> >>> Cc: [email protected] >>> Cc: [email protected] >>> Cc: [email protected] >>> Cc: [email protected] >>> Signed-off-by: Andrey Smirnov <[email protected]> >>> --- >>> drivers/pci/controller/dwc/pcie-designware.c | 2 +- >>> drivers/pci/controller/dwc/pcie-designware.h | 18 +++++++++--------- >>> 2 files changed, 10 insertions(+), 10 deletions(-) >>> >>> diff --git a/drivers/pci/controller/dwc/pcie-designware.c >>> b/drivers/pci/controller/dwc/pcie-designware.c >>> index d123ac290b9e..086e87a40316 100644 >>> --- a/drivers/pci/controller/dwc/pcie-designware.c >>> +++ b/drivers/pci/controller/dwc/pcie-designware.c >>> @@ -300,7 +300,7 @@ void dw_pcie_disable_atu(struct dw_pcie *pci, int index, >>> } >>> >>> dw_pcie_writel_dbi(pci, PCIE_ATU_VIEWPORT, region | index); >>> - dw_pcie_writel_dbi(pci, PCIE_ATU_CR2, ~PCIE_ATU_ENABLE); >>> + dw_pcie_writel_dbi(pci, PCIE_ATU_CR2, (u32)~PCIE_ATU_ENABLE); >> >> This is unrelated with the patch description purpose. >> > > This is a direct result of converting PCIE_ATU_ENABLE to BIT(31). > BIT(31) expands to (1UL << 31) so, without that cast I get > > drivers/pci/controller/dwc/pcie-designware.c: In function > ‘dw_pcie_disable_atu’: > drivers/pci/controller/dwc/pcie-designware.c:303:40: warning: large > integer implicitly truncated to unsigned type [-Woverflow] > dw_pcie_writel_dbi(pci, PCIE_ATU_CR2, ~PCIE_ATU_ENABLE); > > on AArch64. I am guessing that original definition of (1 << 31) avoids > this problem by being an "int" instead of "unsigned long".
Ok, understood. Acked-by: Gustavo Pimentel <[email protected]> > > Thanks, > Andrey Smirnov >

