diff mbox

[3/9] powerpc/powernv: Specify proper data type for PCI_SLOT_ID_PREFIX

Message ID 1470111037-18531-4-git-send-email-gwshan@linux.vnet.ibm.com (mailing list archive)
State Accepted
Headers show

Commit Message

Gavin Shan Aug. 2, 2016, 4:10 a.m. UTC
This fixes the warning reported from sparse:

  gwshan@gwshan:~/sandbox/l$ make C=2 CF=-D__CHECK_ENDIAN__ \
                             arch/powerpc/platforms/powernv/eeh-powernv.o
        :
  arch/powerpc/platforms/powernv/eeh-powernv.c:875:23: \
  warning: constant 0x8000000000000000 is so big it is unsigned long

Fixes: ebe225312739 ("powerpc/powernv: Support PCI slot ID")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/pnv-pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Ellerman Oct. 5, 2016, 2:36 a.m. UTC | #1
On Tue, 2016-02-08 at 04:10:31 UTC, Gavin Shan wrote:
> This fixes the warning reported from sparse:
> 
>   gwshan@gwshan:~/sandbox/l$ make C=2 CF=-D__CHECK_ENDIAN__ \
>                              arch/powerpc/platforms/powernv/eeh-powernv.o
>         :
>   arch/powerpc/platforms/powernv/eeh-powernv.c:875:23: \
>   warning: constant 0x8000000000000000 is so big it is unsigned long
> 
> Fixes: ebe225312739 ("powerpc/powernv: Support PCI slot ID")
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/066bcd785aac9c10e5f9b873f9bd2e

cheers
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/pnv-pci.h b/arch/powerpc/include/asm/pnv-pci.h
index 0cbd813..62a36ed 100644
--- a/arch/powerpc/include/asm/pnv-pci.h
+++ b/arch/powerpc/include/asm/pnv-pci.h
@@ -15,7 +15,7 @@ 
 #include <misc/cxl-base.h>
 #include <asm/opal-api.h>
 
-#define PCI_SLOT_ID_PREFIX	0x8000000000000000
+#define PCI_SLOT_ID_PREFIX	(1UL << 63)
 #define PCI_SLOT_ID(phb_id, bdfn)	\
 	(PCI_SLOT_ID_PREFIX | ((uint64_t)(bdfn) << 16) | (phb_id))