summaryrefslogtreecommitdiff
path: root/drivers/of/device.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2024-04-19 17:54:40 +0100
committerJoerg Roedel <jroedel@suse.de>2024-04-26 12:07:22 +0200
commit0c3457926e7e65710f32e02920c7d423417c93a2 (patch)
treeac3d2181713e7c940e792d4b605b16df6767acc1 /drivers/of/device.c
parentd2f85a263883b679f87ed8f911746105658e9c47 (diff)
downloadlwn-0c3457926e7e65710f32e02920c7d423417c93a2.tar.gz
lwn-0c3457926e7e65710f32e02920c7d423417c93a2.zip
OF: Retire dma-ranges mask workaround
The fixup adding 1 to the dma-ranges size may have been for the benefit of some early AMD Seattle DTs, or may have merely been a just-in-case, but either way anyone who might have deserved to get the message has hopefully seen the warning in the 9 years we've had it there. The modern dma_range_map mechanism should happily handle odd-sized ranges with no ill effect, so there's little need to care anyway now. Clean it up. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/26620039901fdae52079ec1c8a4b2b324964a13e.1713523152.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r--drivers/of/device.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c
index de89f9906375..a988bee2ee5a 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -129,22 +129,6 @@ int of_dma_configure_id(struct device *dev, struct device_node *np,
dma_end = r->dma_start + r->size;
}
size = dma_end - dma_start;
-
- /*
- * Add a work around to treat the size as mask + 1 in case
- * it is defined in DT as a mask.
- */
- if (size & 1) {
- dev_warn(dev, "Invalid size 0x%llx for dma-range(s)\n",
- size);
- size = size + 1;
- }
-
- if (!size) {
- dev_err(dev, "Adjusted size 0x%llx invalid\n", size);
- kfree(map);
- return -EINVAL;
- }
}
/*