Skip to content

Commit

Permalink
powerpc/40x: Use {upper,lower}_32_bits for msi_phys
Browse files Browse the repository at this point in the history
Fix a build error when -Werror is set:
	arch/powerpc/sysdev/ppc4xx_msi.c: In function ‘ppc4xx_setup_pcieh_hw’:
	arch/powerpc/sysdev/ppc4xx_msi.c:178:2: error: right shift count >= width of type [-Werror]

Signed-off-by: Josh Boyer <jwboyer@gmail.com>
  • Loading branch information
Josh Boyer committed May 4, 2012
1 parent 9c6b235 commit dce4c92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/sysdev/ppc4xx_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev,
msi_virt = dma_alloc_coherent(&dev->dev, 64, &msi_phys, GFP_KERNEL);
if (!msi_virt)
return -ENOMEM;
msi->msi_addr_hi = (u32)(msi_phys >> 32);
msi->msi_addr_lo = (u32)(msi_phys & 0xffffffff);
msi->msi_addr_hi = upper_32_bits(msi_phys);
msi->msi_addr_lo = lower_32_bits(msi_phys & 0xffffffff);
dev_dbg(&dev->dev, "PCIE-MSI: msi address high 0x%x, low 0x%x\n",
msi->msi_addr_hi, msi->msi_addr_lo);

Expand Down

0 comments on commit dce4c92

Please sign in to comment.