Commit c1ddcf1c authored by YueHaibing's avatar YueHaibing Committed by Joerg Roedel

iommu/amd: Add missed 'tag' to error msg in iommu_print_event

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iommu/amd_iommu.c: In function 'iommu_print_event':
drivers/iommu/amd_iommu.c:550:33: warning:
 variable 'tag' set but not used [-Wunused-but-set-variable]

It was introduced in
  e7f63ffc ("iommu/amd: Update logging information for new event type")

seems just missed in the error message, add it as suggested by Joerg.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 2dbbcce1
...@@ -631,9 +631,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt) ...@@ -631,9 +631,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
pasid = ((event[0] >> 16) & 0xFFFF) pasid = ((event[0] >> 16) & 0xFFFF)
| ((event[1] << 6) & 0xF0000); | ((event[1] << 6) & 0xF0000);
tag = event[1] & 0x03FF; tag = event[1] & 0x03FF;
dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%llx flags=0x%04x]\n", dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%llx flags=0x%04x tag=0x%03x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid), PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
pasid, address, flags); pasid, address, flags, tag);
break; break;
default: default:
dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n", dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",
......
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