From d0976f193bda0e20d0cf1962011ccbe8fc81e8bd Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Thu, 9 Sep 2021 17:49:11 -0700 Subject: [PATCH] Use correct type --- modules/mqnic/mqnic.h | 2 +- modules/mqnic/mqnic_dev.c | 2 +- modules/mqnic/mqnic_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mqnic/mqnic.h b/modules/mqnic/mqnic.h index 787708592..146f90058 100644 --- a/modules/mqnic/mqnic.h +++ b/modules/mqnic/mqnic.h @@ -81,7 +81,7 @@ struct mqnic_dev { struct device *dev; struct pci_dev *pdev; - size_t hw_regs_size; + resource_size_t hw_regs_size; phys_addr_t hw_regs_phys; u8 __iomem *hw_addr; u8 __iomem *phc_hw_addr; diff --git a/modules/mqnic/mqnic_dev.c b/modules/mqnic/mqnic_dev.c index 2593a1e5d..2b7fe705d 100644 --- a/modules/mqnic/mqnic_dev.c +++ b/modules/mqnic/mqnic_dev.c @@ -59,7 +59,7 @@ static int mqnic_map_registers(struct mqnic_dev *mqnic, struct vm_area_struct *v if (map_size > mqnic->hw_regs_size) { - dev_err(mqnic->dev, "mqnic_map_registers: Tried to map registers region with wrong size %lu (expected <=%zu)", vma->vm_end - vma->vm_start, mqnic->hw_regs_size); + dev_err(mqnic->dev, "mqnic_map_registers: Tried to map registers region with wrong size %lu (expected <= %llu)", vma->vm_end - vma->vm_start, mqnic->hw_regs_size); return -EINVAL; } diff --git a/modules/mqnic/mqnic_main.c b/modules/mqnic/mqnic_main.c index 325be6c01..d10a350c7 100644 --- a/modules/mqnic/mqnic_main.c +++ b/modules/mqnic/mqnic_main.c @@ -249,7 +249,7 @@ static int mqnic_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent if (mqnic->if_count*mqnic->if_stride > mqnic->hw_regs_size) { ret = -EIO; - dev_err(dev, "Invalid BAR configuration (%d IF * 0x%x > 0x%lx)", mqnic->if_count, mqnic->if_stride, mqnic->hw_regs_size); + dev_err(dev, "Invalid BAR configuration (%d IF * 0x%x > 0x%llx)", mqnic->if_count, mqnic->if_stride, mqnic->hw_regs_size); goto fail_map_bars; }