[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 3 Mar 2010 11:01:07 +1100
From: imunsie@....ibm.com
To: linux-kernel@...r.kernel.org
Cc: Ian Munsie <imunsie@....ibm.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Matthew Wilcox <matthew@....cx>, Alex Chiang <achiang@...com>,
Bjorn Helgaas <bjorn.helgaas@...com>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
linux-pci@...r.kernel.org
Subject: [PATCH] Avoid implicit constant truncation
From: Ian Munsie <imunsie@...ibm.com>
When building on 64 bit platforms, the compiler throws the following
warning:
drivers/pci/probe.c:197: warning: large integer implicitly truncated to unsigned type
This patch adds an explicit truncation to silence the compiler warning.
Signed-off-by: Ian Munsie <imunsie@...ibm.com>
---
drivers/pci/probe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 2a94309..c5d9668 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -195,7 +195,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN;
if (type == pci_bar_io) {
l &= PCI_BASE_ADDRESS_IO_MASK;
- mask = PCI_BASE_ADDRESS_IO_MASK & IO_SPACE_LIMIT;
+ mask = (u32)(PCI_BASE_ADDRESS_IO_MASK & IO_SPACE_LIMIT);
} else {
l &= PCI_BASE_ADDRESS_MEM_MASK;
mask = (u32)PCI_BASE_ADDRESS_MEM_MASK;
--
1.6.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists