summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2022-07-01 15:54:25 +0300
committerYury Norov <yury.norov@gmail.com>2022-07-15 16:35:54 +0300
commit4dea97f8636d0514befc9fc5cf342b351b7d0e20 (patch)
tree229c6eb22cd7c99bbe8d942a8f1b84465199a2fa /drivers/iommu
parente2863a78593d638d3924a6f67900c4820034f349 (diff)
downloadlinux-4dea97f8636d0514befc9fc5cf342b351b7d0e20.tar.xz
lib/bitmap: change type of bitmap_weight to unsigned long
bitmap_weight() doesn't return negative values, so change it's type to unsigned long. It may help compiler to generate better code and catch bugs. Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 44016594831d..2f1b09f34706 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -3946,7 +3946,7 @@ static ssize_t domains_used_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct intel_iommu *iommu = dev_to_intel_iommu(dev);
- return sprintf(buf, "%d\n", bitmap_weight(iommu->domain_ids,
+ return sprintf(buf, "%ld\n", bitmap_weight(iommu->domain_ids,
cap_ndoms(iommu->cap)));
}
static DEVICE_ATTR_RO(domains_used);