diff options
author | dim <dim@FreeBSD.org> | 2013-11-09 20:09:02 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-11-09 20:09:02 +0000 |
commit | 2fd21fb1fe1a82d3b2787dd0ffa56efe77a301d5 (patch) | |
tree | c3b8b2e1ccb677177cb76a5c1b6e4c40543bc7f9 /sys/x86 | |
parent | db34ef9ff7885214df9b48601718381a6fc71a16 (diff) | |
download | FreeBSD-src-2fd21fb1fe1a82d3b2787dd0ffa56efe77a301d5.zip FreeBSD-src-2fd21fb1fe1a82d3b2787dd0ffa56efe77a301d5.tar.gz |
Fix gcc warnings about casting away const in sys/x86/iommu/intel_drv.c.
Reviewed by: kib
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/iommu/intel_drv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index c4f14ce..781b009 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -900,12 +900,12 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) (uintmax_t)resmem->EndAddress); } - ptr = (char *)resmem + sizeof(*resmem); - ptrend = (char *)resmem + resmem->Header.Length; + ptr = (const char *)resmem + sizeof(*resmem); + ptrend = (const char *)resmem + resmem->Header.Length; for (;;) { if (ptr >= ptrend) break; - devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; + devscope = (const ACPI_DMAR_DEVICE_SCOPE *)ptr; ptr += devscope->Length; /* XXXKIB bridge */ if (devscope->EntryType != ACPI_DMAR_SCOPE_TYPE_ENDPOINT) @@ -914,11 +914,11 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dmarh, void *arg) dmar_print_path(iria->dmar->dev, "RMRR scope", devscope->Bus, (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, - (ACPI_DMAR_PCI_PATH *)(devscope + 1)); + (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); } dev = dmar_path_dev(resmem->Segment, (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, devscope->Bus, - (ACPI_DMAR_PCI_PATH *)(devscope + 1)); + (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); if (dev == NULL) { if (dmar_match_verbose) printf("null dev\n"); |