tehuti: use resource_size_t instead of unsigned long and u32

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <netdev@...>
Cc: <wd@...>, <dzu@...>, Ilya Yanok <yanok@...>
Date: Tuesday, September 2, 2008 - 5:14 pm

Use resource_size_t for pci_resource_start() and pci_resource_len() return
values. Makes tehuti driver work correctly on 32 bit systems with 64 bit
resources.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 drivers/net/tehuti.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 432e837..6e674a5 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1909,8 +1909,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct net_device *ndev;
 	struct bdx_priv *priv;
 	int err, pci_using_dac, port;
-	unsigned long pciaddr;
-	u32 regionSize;
+	resource_size_t pciaddr, regionSize;
 	struct pci_nic *nic;
 
 	ENTER;
@@ -1949,7 +1948,8 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 	if ((regionSize = pci_resource_len(pdev, 0)) < BDX_REGS_SIZE) {
 		err = -EIO;
-		ERR("tehuti: MMIO resource (%x) too small\n", regionSize);
+		ERR("tehuti: MMIO resource (%llx) too small\n",
+				(u64)regionSize);
 		goto err_out_res;
 	}
 
-- 
1.5.6.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
tehuti: use resource_size_t instead of unsigned long and u32, Ilya Yanok, (Tue Sep 2, 5:14 pm)