Commit e815665e authored by Jeff Kirsher's avatar Jeff Kirsher Committed by David S. Miller

i40e: Fix mismatching type for ioremap_len

As pointed out by Ben Hutchings, ioremap uses unsigned long as
its parameter type, so we should be using that instead of u32
or int.
Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0f91938
...@@ -9456,10 +9456,10 @@ static void i40e_print_features(struct i40e_pf *pf) ...@@ -9456,10 +9456,10 @@ static void i40e_print_features(struct i40e_pf *pf)
static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ {
struct i40e_aq_get_phy_abilities_resp abilities; struct i40e_aq_get_phy_abilities_resp abilities;
unsigned long ioremap_len;
struct i40e_pf *pf; struct i40e_pf *pf;
struct i40e_hw *hw; struct i40e_hw *hw;
static u16 pfs_found; static u16 pfs_found;
u32 ioremap_len;
u16 link_status; u16 link_status;
int err = 0; int err = 0;
u32 len; u32 len;
...@@ -9509,7 +9509,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -9509,7 +9509,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw = &pf->hw; hw = &pf->hw;
hw->back = pf; hw->back = pf;
ioremap_len = min_t(int, pci_resource_len(pdev, 0), ioremap_len = min_t(unsigned long, pci_resource_len(pdev, 0),
I40E_MAX_CSR_SPACE); I40E_MAX_CSR_SPACE);
hw->hw_addr = ioremap(pci_resource_start(pdev, 0), ioremap_len); hw->hw_addr = ioremap(pci_resource_start(pdev, 0), ioremap_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment