lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1220390068-6433-1-git-send-email-yanok@emcraft.com>
Date:	Wed,  3 Sep 2008 01:14:28 +0400
From:	Ilya Yanok <yanok@...raft.com>
To:	netdev@...r.kernel.org
Cc:	wd@...x.de, dzu@...x.de, Ilya Yanok <yanok@...raft.com>
Subject: tehuti: use resource_size_t instead of unsigned long and u32

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@...raft.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ